Skip to main content
2 votes
2 answers
126 views

I'm using VS Code on Windows 10 and have a fresh installation of the latest Python version (downloaded from python.org). I completely removed any older Python installations before reinstalling. When I ...
MerkMerk's user avatar
0 votes
1 answer
81 views

This test program parses a single text argument, which could be a URL: #!/usr/bin/env python import argparse def parse_input(): parser = argparse.ArgumentParser( description='Program ...
Mister Smith's user avatar
  • 28.2k
3 votes
1 answer
210 views

With Python primarily being used in virtual environments now, my shebang lines for python scripts can vary depending on the location of the particular virtual environment I'm working in. This causes ...
CyberSimon's user avatar
-2 votes
1 answer
97 views

I like to run my python scripts directly in bash like so $ ./script.py But sometimes I forget the shebang line #!/usr/bin/env python3, and it has the potential to overwrite a file named np if the ...
user1537366's user avatar
  • 1,217
-2 votes
1 answer
174 views

I'm trying to standardize some of my bin scripts and i'm going without extensions. However this is proving difficult to see programming language of all my scripts. Some of these are bash, some of ...
ThomasReggi's user avatar
  • 60.4k
0 votes
0 answers
42 views

I don't know how to better title the behaviour I just experienced. I arrived from this answer because I'm trying to read the contents of a file into a string. I have the following script which I made ...
MoRe's user avatar
  • 1,558
0 votes
2 answers
113 views

I have read Does shebang overwrite the python interpreter path, and it seems the given answer does not apply to me. Some context: I am on Windows using C:\Program Files\Git\bin\bash.exe and having two ...
coincoin's user avatar
  • 4,695
1 vote
1 answer
79 views

Doing some tests, I discovered that setting the bash shebang in a script would cancel the $BASH_SUBSHELL behavior. # in the terminal $ echo $BASH_SUBSHELL 0 $ (echo $BASH_SUBSHELL) 1 ...
Top Dawn's user avatar
0 votes
1 answer
72 views

This c-preprocessor (cpp) input: #define hash # #define not_hash x hash not_hash produces the following output when run through cpp -P: # x Is there any input to cpp capable of outputting a line ...
smeg's user avatar
  • 1
0 votes
1 answer
761 views

I have a file named kong like this: #!/usr/bin/env /usr/local/openresty/bin/resty setmetatable(_G, nil) pcall(require, "luarocks.loader") package.path = "./?.lua;./?/init.lua;" ....
Yongqi Z's user avatar
  • 661
1 vote
1 answer
61 views

I just started using dockutil and what to write a script that does the following. Checks if the item exists on the dock. if it doesn't exist add it. if it does do nothing. so do to check if item exist ...
Albert Chan's user avatar
-1 votes
1 answer
63 views

I have this bash script that restarts/monitors myscript while { myscript; rc=$?; true; }; do echo "'myscript' crashed with exit code $rc. Restarting..." >&2 sleep 1 done ...
supra's user avatar
  • 1
-1 votes
1 answer
82 views

Please actually read my post instead of just the title. This is a larger system issue, not a typo or a file permissions issue. I am attempting to run my script without having to type in 'python3' ...
Binsky734's user avatar
0 votes
0 answers
157 views

I'm trying to make a runnable Python script with a custom virtual environment. Instead of activating the virtual environment or specifying the full path I tried to use ~ in the shebang line. Does not ...
algonell's user avatar
  • 185
0 votes
1 answer
187 views

I want to add a shebang at the beginning of my file.py script using sed in Mac. My file.py starts like this: import os import sys import shutil I have tried: sed -i '.bak' '1 s|^.*$|#!/usr/bin/env ...
user9328894's user avatar

15 30 50 per page
1
2 3 4 5
33