-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please add a "shebang" into script #65
Comments
I'm afraid I can't do this one atm
1) Shebangs mess up the Windows interpeter when you're using py to run
multiple versions. Since I primarily use Windows this is a hard stop for
me in terms of the local copy I use.
2) The *nix python exec isn't currently consistent across distros (whether
it's python / python2 / python 3 and if it's just python whether that's 2
or 3 )
…On Mon, 4 Apr 2022, 5:00 pm Nikolay O. Zabrodotskiy, < ***@***.***> wrote:
Calling script in linux shell as simple executable leads to some
unpredictable results, since shebang is missing
#!/usr/bin/env python3 for example.
./gogrepoc.py fails
python3 ./gogrepoc.py works
—
Reply to this email directly, view it on GitHub
<#65>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABKZ337RXWHFFST3CCEZEHLVDKHRTANCNFSM5SOQ2XQA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Thanks for reply. |
Yeah, that sounds like a good idea.
…On Mon, 4 Apr 2022, 5:47 pm Nikolay O. Zabrodotskiy, < ***@***.***> wrote:
Thanks for reply.
Ok, fine, but may be to just add a note into readme for correct linux call
?
—
Reply to this email directly, view it on GitHub
<#65 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABKZ33ZUNMOVXZVGR7SBBPTVDKNAJANCNFSM5SOQ2XQA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Maybe a stupid comment to an old post but it might be useful for others: Why not just create your own shortcut once? Just go in to your gogrepoc directory (replace cd ${YOUR_DIRECTORY_OF_GOGREPOC} Then do soemthing like this: echo "cd \$(dirname \"\$0\") && python3 ./gogrepoc.py" > gogrepoc
chmod +x gogrepoc This way you could even save three characters (.py) when starting the tool: ./gogrepoc You could even go one step further and add the gogrepoc directory to your PATH variable afterwards like this echo "export PATH=\"${PWD}:\$PATH\"" >> ~/.bashrc This saves you yet another two characters with the benefit of starting it from everywhere and whenever you want: gogrepoc |
Calling script in linux shell as simple executable leads to some unpredictable results, since shebang is missing
#!/usr/bin/env python3
for example../gogrepoc.py
failspython3 ./gogrepoc.py
worksThe text was updated successfully, but these errors were encountered: