I want to find the command line arguments that my program was called with, i.e. sys.argv
, but I want to do that before Python makes sys.argv
available. This is because I'm running code in usercustomize.py
which is imported by the site
module, which is imported before Python populates sys.argv
. (If you're curious, the reason I'm doing this is to start my debugger without changing my program code.)
Is there any way to find the command line arguments without sys.argv
?
Also: The solution needs to work for Python 2.6 :(