[Pythonmac-SIG] virtualenv problems
Gidday again I am having trouble getting a virtualenv to use the python version I want on my OSX 10.5.4. • I have installed Python 2.5.2 and used ~/.bash_profile to export PATH so that this one comes up when I type python at the shell prompt. (I haven't made a ~/.profile entry. I wonder if that would help?) • I have installed the latest "virtualenv" • When I create a virtualenv from the command line like this: $ virtualenv ENV that works but the python available after activating is the OSX installed global version 2.5.1 and not the 2.5.2 I hoped for. ?? • The virtualenv docs suggest you can call it like this: $ python virtualenv.py ENV Which might ensure that 252 came up - But I get this error message: /Library/Frameworks/Python.framework/Versions/2.5/Resources/Python.app/ Contents/MacOS/Python: can't open file 'virtualenv.py': [Errno 2] No such file or directory AND I can't find a virtualenv.py anywhere • The docs (http://pypi.python.org/pypi/virtualenv#id2) suggest that one can 'name a python' but there is no indication as to how that is done. • I have tried the no_site-packages option too. Any suggestions? George Wright ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig
[Pythonmac-SIG] Build Tkinter against custom tcl/tk?
I'm trying to build a non-framework python on MacOS X 10.5 using a custom tcl/tk that lives in an arbitrary directory. (For complicated reasons we don't want the system tcl/tk). It is easy to build an X11 tcl/tk this way (and we are content with X11) so I did that. Unfortunately I can't seem to build Python in such a way that it sees this tcl/tk. The only documented way to do this I found was to edit Modules/Setup or Setup.local, so I did the following: $ /configure --prefix=/Users/rowen/TestBuild/pythonroot/ --disable-framework Edit Modules/Setup.local to add this text (based on comments in Modules/Setup): _tkinter _tkinter.c tkappinit.c -DWITH_APPINIT \ -L/Users/rowen/TestBuild/tcltkroot/lib \ -I/Users/rowen/TestBuild/tcltkroot/include \ -ltk8.4 -ltcl8.4 \ -I/usr/X11R6/include \ -L/usr/X11R6/lib \ -lX11 $ make $ make install This builds, but the resulting python is missing the _tkinter library. I tried setting CFLAGS: $ export CFLAGS="-I/Users/rowen/TestBuild/tcltkroot/include -L/Users/rowen/TestBuild/tcltkroot/bin" before running configure, but that didn't help. So...any advice? Any obvious mistake? (I did double-check each path in the text I added to Setup.local) Is there some way to convince configure to use my tcl/tk (that would potentially be simpler than editing Modules/Setup.local). -- Russell ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig
[Pythonmac-SIG] appscript -- Getting 1708 Error on count command for word 2008
Not sure if this is user error or a bug, but I can't seem to send the count command to Word 2008 via appscript. >>> word.documents.count() Traceback (most recent call last): File "", line 1, in File "/Library/Python/2.5/site-packages/appscript-0.18.1-py2.5-macosx-10.5-i386.egg/appscript/reference.py", line 439, in __call__ appscript.reference.CommandError: CommandError -1708: Application could not handle this command. Failed command: app(u'/Applications/Microsoft Office 2008/Microsoft Word.app').documents.count() I can call help on the count command via the same path so I think I'm calling count() from the right place: >>> word.documents.count.help() == Help (-t) Reference: app(u'/Applications/Microsoft Office 2008/Microsoft Word.app').documents.count -- Description of reference Terminology for count command [...] And Word seems to support the count command since this works from the script editor: tell application "Microsoft Word" display dialog (get count of documents) end tell And finally, I tried doing a count with TextEdit and that seems to work fine: >>> te = app('TextEdit') >>> te.activate() >>> te.documents.count() 3 Any help would be appreciated. _Travis_Caldwell_ ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig