[Tutor] sound implementation problems
Jim Mooney
cybervigilante at gmail.com
Fri Jun 14 05:55:25 CEST 2013
Alan Gauld <alan.gauld at btinternet.com>
That's a dodgy way to solve the problem since if you change IDE or run the
> program outside the IDE that startup script will likely get forgotten and
> not be used. Remember you are not expected to use
> an IDE for anything other than developing the code, its not
> intended to be a runtime environment. Relying on the IDE is
> a bad habit to develop.
>
Got me already ;') I reinstalled Py2.7 since there are too many things not
available yet for Py3.3 - but I know which one is loading at the command
line since I specify Python2.7 or Python3.3 (The Activestate dist copies
and renames one of the Pys so that's clear - I just went and copied and
renamed the other - along with pip) My IDE startup script has been changed
to also go to the proper working directory.
BUT - Py 3.3 at the command prompt uses my 3.3 working directory, and Py
2.7 ALSO uses the 3.3 working directory, which is not what I want,
obviously. Those are two different sets of scripts that won't always play
together.
Is there a way to set up each different interpreter, either Py 3.3 or Py
2.2, to automatically change to a particular working directory when you
call it - with a command line switch for instance? I can os.chdir after it
starts, of course, but that's a drag and I'll forget to do it at some
point. If I can do that from the call to Python I can make a batch file for
each one, with two different names - and easy typing ones like Py27 and
Py33 ;')
I see one possible candidate in python --help
-c cmd : program passed in as string (terminates option list)
But what does "program passed in as a string(terminates option list)" mean?
How do I stringify import os > os.chdir('my directory') ? That's unclear to
me.
Speaking of Py distributions I used ActiveState for various reasons, but I
looked at Enthought Canopy and was really annoyed. You can go over their
entire website and they don't tell you which Python version it's for - 2.7
and 3.3 being a bit different. It's almost like they hide it. ActiveState
makes it clear so I used them. I'm pretty sure Canopy is for 2.7 but I'm
not going to do a huge download on a slow connection when they don't tell
you.
--
Jim
A noun is just a verb with the hiccups
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20130613/4bda1341/attachment-0001.html>
More information about the Tutor
mailing list