Created
April 24, 2017 15:26
-
-
Save billiepander/43699a83a26d41aa9dd767fe280da678 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os, sys | |
| os.execv(sys.executable, ['python'] + sys.argv) | |
| # sys.executable: the python path you are using which will auto know if you are using virtualenv | |
| # e.g: /home/pd/.virtualenvs/competehunt_main/bin/python' [so if it not what you want, write it manually] | |
| # of course, sys.argv is the current file name if you donnot add extra params [yes, add it if need to] | |
| # so ['python'] + sys.argv ==> ["python", "current.py"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment