"Rance Hall" wrote
osname = os.name
pathtocfg = os.path.dirname(sys.argv[0])
configfileloc = os.path.abspath(pathtocfg)
os.chdir(configfileloc)
to set the directory of all subsequent file lookups in a script.
This is not the most user friendly thing to do. Some sys admins
require config file
On Mon, Mar 28, 2011 at 6:43 PM, Rance Hall wrote:
> I had been doing this under windows:
>
> import os
> import sys
>
> osname = os.name
> pathtocfg = os.path.dirname(sys.argv[0])
> configfileloc = os.path.abspath(pathtocfg)
> os.chdir(configfileloc)
>
> to set the directory of all subsequent fi
I had been doing this under windows:
import os
import sys
osname = os.name
pathtocfg = os.path.dirname(sys.argv[0])
configfileloc = os.path.abspath(pathtocfg)
os.chdir(configfileloc)
to set the directory of all subsequent file lookups in a script.
It worked underwindows because the shortcuts ha