Re: Starting Python in specified directory

"Ingmar Steen" <[email protected]>
Newsgroups gmane.comp.python.windows-ce
Message-ID <[email protected]>
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 <[email protected]> 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
> [email protected]
> http://mail.python.org/mailman/listinfo/pythonce
>

_______________________________________________
PythonCE mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pythonce
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.