[Pythonmac-SIG] Help with path settings

2008-01-21 Thread George Wright

I'm having trouble with PYTHONPATH ..

george-g5:~ georgewright$ env
TERM_PROGRAM=Apple_Terminal
...
PYTHONDOCS=/Users/georgewright/Python_stuff/Python-Docs-2.4.2/
PATH=/usr/local/bin:/usr/local/sbin:/usr/local/:/usr/local/mysql/bin:/ 
opt/local/bin/:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/mysql/bin:/ 
opt/local/bin/:/usr/local/include/:/System/Library/Frameworks/ 
Python.framework/Versions/Current/bin/

...
PYTHONPATH =/usr/local/Zope-3.3.0/lib/python

I want to change this to PYTHONPATH=''
I can't find where I set it to the current value. I know I set it  
that way some months ago so I could do zope things in interactive  
python - but I don't recall how!
I have changed .bash_profile to what I want and searched for .pth  
files that might help but to no avail.

I have changed .profile too

Also the PATH=... :/System/Library/Frameworks/Python.framework/ 
Versions/Current/bin/
points to a 2.3 installation and I want to change that to ... / 
Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/
and I don't know how to do it. (I actually get python 2.4 when I  
start it in terminal!)


Can anyone help me sort out this mess?

George Wright
http://users.bigpond.net.au/George.Wright/
http://www.labyrinth.net.au/~gwright



___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] py2app 0.4.2 recipe errors

2008-01-21 Thread Edward Hartley


Edward Hartley wrote:
 **
 *From: *michael ferraro michael at possibleworlds.com
 mailto:michael at possibleworlds.com
 *Date: *13 January 2008 17:27:12 GMT
 *To: *Ronald Oussoren ronaldoussoren at mac.com
 mailto:ronaldoussoren at mac.com
 *Cc: *pythonmac-sig at python.org mailto:pythonmac-sig at  
python.org,

 michael ferraro michael at possibleworlds.com
 mailto:michael at possibleworlds.com, Edward Hartley  
ed_hartley at mac.com

 mailto:ed_hartley at mac.com
 *Subject: **Re: [Pythonmac-SIG] py2app 0.4.2 recipe errors*


 thanks for your efforts

 m


 On Jan 13, 2008, at 9:28 AM, Ronald Oussoren wrote:

 On 12 Jan, 2008, at 19:35, Edward Hartley wrote:
 Hi Ronald,
 further to my previous on py2app modulegraph

 With these changes  py2app is not  to working at all.

 Arghh I guess my merge of the version of py2app and friends  
from
 Leopard wasn't complete. I'm currently working on some cleanups  
in the

 pyobjc repository and a port of pyobjc to 64-bit PPC and will look
 into this issue when that's  finished. With some luck that will be
 later today.

 BTW.  Thank's for mentioning that the PyAvenger sample is broken as
 well, that will make it a lot easier to debug the problem.

 Yes thanks for your efforts and a further calibration point in  
all of this:


 I downloaded the latest wxPython 2.8.7.1 for OS X 10.4 an update  
on my

 previous 2.8.0.1 version installed IIRC
 sometime after I upgraded to 2.5.
 The demo package for version 2.8.7.1 has a bundled demo.app   
which has a

 working demo of the wxPython glcanvas.
 So I conclude that building apps with OpenGL and wxPython presumably
 with py2app?
 If that's the case could anyone comment on which versions of py2app,
 setuptools etc.?


wxPython's demo.app uses the old bundlebuilder.py tool in such a way
that it is not bundling wxPython or anything else other than the demo
code itself, and is using the installed Python, wxPython, PyOpenGL and
any other packages it needs, all from the sys.path.



OK thanks for this information. Its a useful piece of input.
Sorry for the delay in replying, a few mails I was sent seem to have  
got dropped

somewhere.
Best
Ed Hartley

--
Robin Dunn
Software Craftsman
http://wxPython.org  Java give you jitters?  Relax with wxPython!

___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] Pystone numbers for different Macs...

2008-01-21 Thread skip
Daniel ... the benchmark wasn't written to take advantage of multi-core
Daniel machines--silly me I thought any good benchmark would be. 

A little bit of pystone history.  Python's pystone benchmark is a
translation of the Dhrystone benchmark, which was originally written in Ada
in the mid 80s, then translated to C.  I'm pretty sure Guido used the C
version as the basis for pystone.  There is no multithreading in Dhrystone,
so it's understandable that pystone is thread-free as well.

One value of a benchmark is its stability over time.  Since its addition to
Python in 1995 it has had just two bug fixes to the implementation.  You
could certainly fork pystone to create a version that did use multiple
threads, but you'd have to call it something else, pystone-t perhaps.  It
would be a different benchmark.

The only other changes of note to the benchmark are due to the speed of
modern CPUs.  The number of passes of the algorithm to run by default has
grown over the years as processor speeds have increased.  When first
included in Python in 1995 it ran 1000 passes of the main loop.  Today it
defaults to 50,000 to get reasonable runtimes on modern CPUs.  Even so, on
most current 2-3 GHz CPUs it will run in about a second, so it's probably
time to increase the number of passes again.

More detail about the Dhrystone benchmark, including a floating point
predecessor, the Whetstone benchmark, and a couple versions of the C source
you can build and run, are on Wikipedia:

http://en.wikipedia.org/wiki/Dhrystone

For the history of the pystone benchmark, UTSL:

http://svn.python.org/view/python/trunk/Lib/test/pystone.py

Skip
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] Pystone numbers for different Macs...

2008-01-21 Thread Kent Johnson
Daniel Lord wrote:
 My point was that, as I understand it, thanks to the GIL--Python  
 cannot easily take advantage of multi-cores period even when the  
 program uses multiple threads--it it is a limitation of the  
 implementation of the language interpreter. I guess that tells us we  
 ought to write multi-core code in C/C++/ObjC instead. Either that or  
 Python's implementation needs to embrace threading more expansively.  

Or don't use threading for multiprocessing. Current best practice seems 
to be to use a multiprocessing model to distribute Python programs. 
There are quite a few add-on packages which support this:
http://wiki.python.org/moin/ParallelProcessing

Kent
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


[Pythonmac-SIG] illegal instruction while connecting to PostgresDB

2008-01-21 Thread Anke
Hi,

unfortunately, I am not sure if I picked he right list...

My working environment is a Power PC G5, Tiger 10.4.11, Python 2.5.1. and of 
course I am fighting with a python script :-).

In fact I am nearly sure that its a simple problem, but I am new on the 
Mac-System and using Ubuntu I never had those problems

The aim of the script is to connect to postgres-Database...The beginning of the 
code - which already produces problems is:

import string
from pyPgSQL import PgSQL as pg
import psyco
import sys
import re
import os.path as path
import time
print hallo1
psyco.full()
print hallo2
con = pg.connect(host='localhost', user='dbuser', password='dbuser', 
database='DB_SNP_RECEPTOR_GENE')
print hallo3

After hallo2 the program stops with Illegal instruction.

I found a log file which says the following:

Date/Time:  2008-01-21 14:33:48.617 +0100
OS Version: 10.4.11 (Build 8S165)
Report Version: 4

Command: Python
Path:
/Library/Frameworks/Python.framework/Versions/2.5/Resources/Python.app/Contents/MacOS/Python
Parent:  bash [632]

Version: 2.5a0 (2.5alpha0)

PID:698
Thread: 0

Exception:  EXC_BAD_INSTRUCTION (0x0002)
Code[0]:0x0002
Code[1]:0x0200801c


Thread 0 Crashed:
0   0x0200801c 0 + 33587228
1   org.python.python   0x002ae7f8 PyEval_EvalFrameEx + 424 (ceval.c:3223)
2   org.python.python   0x002b4e10 PyEval_EvalCodeEx + 2096 (ceval.c:2831)
3   org.python.python   0x002b2f08 PyEval_EvalFrameEx + 18616 (ceval.c:3660)
4   org.python.python   0x002b4e10 PyEval_EvalCodeEx + 2096 (ceval.c:2831)
5   org.python.python   0x002b4fb0 PyEval_EvalCode + 48 (ceval.c:500)
6   org.python.python   0x002dacbc PyRun_FileExFlags + 300 (pythonrun.c:1272)
7   org.python.python   0x002daf00 PyRun_SimpleFileExFlags + 448 
(pythonrun.c:877)
8   org.python.python   0x002ea8bc Py_Main + 3052 (main.c:523)
9   org.python.python   0x19bc 0x1000 + 2492
10  org.python.python   0x16c0 0x1000 + 1728

Thread 0 crashed with PPC Thread State 64:
  srr0: 0x0200801c srr1: 0x1208f030
vrsave: 0x
cr: 0x88224242  xer: 0x   lr: 0x01065124  
ctr: 0x02008000
r0: 0x00624298   r1: 0xbfffef40   r2: 0x02008000   
r3: 0x02008070
r4: 0x006242c0   r5: 0x00624298   r6: 0xbfffef78   
r7: 0x0a80
r8: 0x   r9: 0x0001  r10: 0x007bca60  
r11: 0x0001
   r12: 0x02008000  r13: 0x  r14: 0x006242d0  
r15: 0x0079830c
   r16: 0x003445f4  r17: 0x  r18: 0x000a  
r19: 0xef298001ef21
   r20: 0x00624160  r21: 0x01054e80  r22: 0x00624160  
r23: 0x
   r24: 0x0001  r25: 0x007bc2e0  r26: 0x  
r27: 0x007afed0
   r28: 0x00785bf0  r29: 0x  r30: 0x007bca60  
r31: 0x

Binary Images Description:
0x1000 - 0x1fff org.python.python 2.5a0 (2.5alpha0) 
/Library/Frameworks/Python.framework/Versions/2.5/Resources/Python.app/Contents/MacOS/Python
   0x44000 -0x44fff _weakref.so 
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload/_weakref.so
   0xa2000 -0xa5fff strop.so
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload/strop.so
   0xb1000 -0xbefff mxDateTime.so   
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/mx/DateTime/mxDateTime/mxDateTime.so
   0xd5000 -0xd7fff time.so 
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload/time.so
   0xe -0xe1fff math.so 
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload/math.so
   0xe8000 -0xedfff array.so
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload/array.so
  0x205000 -   0x322fff org.python.python 2.5a0 (2.5)   
/Library/Frameworks/Python.framework/Versions/2.5/Python
  0x745000 -   0x75cfff libpq.5.dylib   /usr/local/pgsql/lib/libpq.5.dylib
 0x1008000 -  0x101cfff libpqmodule.so  
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/pyPgSQL/libpq/libpqmodule.so
 0x1051000 -  0x10a9fff _psyco.so   
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/psyco/_psyco.so
0x8fe0 - 0x8fe52fff dyld 46.16  /usr/lib/dyld
0x9000 - 0x901bcfff libSystem.B.dylib   /usr/lib/libSystem.B.dylib
0x90214000 - 0x90219fff libmathCommon.A.dylib   
/usr/lib/system/libmathCommon.A.dylib
0x907bb000 - 0x90895fff com.apple.CoreFoundation 6.4.9 (368.31) 
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
0x908de000 - 0x908defff com.apple.CoreServices 10.4 (???)   
/System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices
0x908e - 

[Pythonmac-SIG] Illustrator no_color_info problem

2008-01-21 Thread Grzegorz Laszczyk
Hi.
I have a little problem working with Illustrator objects color.
When I have a list with 4 elements, I can make cmyk_color_info, 3 - 
rgb_color_info.
I'm trying to make no_color_info, but I can't.
It's interesting, because I tried to use example from AI CS3 apple 
script reference, pasted into AS_Translate.
It makes CMYK, RGB but shows error when uses no_color_inf.

This is a code I paste into AS_Translate

tell application Adobe Illustrator
activate
make new document with properties {color space:RGB}
make new rectangle in document 1 with properties {position:{200, 500},
width:300, height:100}
set the fill color of the result to {class:RGB color info, red:255,
green:0, blue:0}
make new rectangle in document 1 with properties {position:{150, 550},
width:200, height:100}
set the fill color of the result to {class:RGB color info, red:0,
green:255, blue:0}
delay 1
set the fill color of path item 1 of document 1 to {class:no color info}
end tell

It's an error or I made mistake?

Could you check, does it works?

Greetings
Grzesiek


--
Sprawdz, ktore komorki sa najmodniejsze!
Kliknij  http://link.interia.pl/f1cd4

___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig