[PythonCE] Starting Python in specified directory

Ingmar Steen iksteen at gmail.com
Mon Sep 25 12:04:56 CEST 2006


Hi Jeffrey

Windows CE doesn't have the concept of a 'current directory' (so a starting
directory makes no sense either) but python for windows ce emulates it
internally, so there's no direct way of doing this. iirc, python defaults to
a) the directory where the script you start resides (if you start \my
documents\myprog\myprog.py, it'll start in \my documents\myprog) or b) the
default path of the interpreter when started without any options in \tmp (or
something similar). You could create a small dummy script in that path that
just contains 'pass' and starting that using the python interpreter with the
-i option (make a shortcut 'python -i "\My Documents\myprog\dummy.py"').

Hope this helps (and works! haven't actually tried it myself).

Ingmar

On 9/24/06, Jeffrey Barish <jeff_barish at earthlink.net> wrote:
>
> I start Python from the Start Menu.  Is there a way to get it to start in
> a
> specified directory (e.g., '\My Documents\myprog') everytime it starts?
> --
> Jeffrey Barish
>
> _______________________________________________
> PythonCE mailing list
> PythonCE at python.org
> http://mail.python.org/mailman/listinfo/pythonce
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/pythonce/attachments/20060925/1f67840f/attachment.htm 


More information about the PythonCE mailing list