[Pythonmac-SIG] Trouble

2011-03-10 Thread Felicia Betancourt
Hi,

Apologies for having to reach out to you like this, but I made a quick trip to 
London,United Kingdom and had my bag stolen from me with my passport and credit 
cards in it. The embassy is willing to help by authorizing me to fly without my 
passport, I just have to pay for a ticket and settle Hotel bills. 
Unfortunately, I can't have access to funds without my credit card, I've made 
contact with my bank but they need more time to come up with a new one. I was 
thinking of asking you to lend me some quick funds that I can give back as soon 
as I get in. I really need to be on the next available flight.
 
I can forward you details on how you can get money to me. You can reach me via 
email or the hotel's help desk, 08715046355. I hope to hear from you soon.

Thanks

Felicia Betancourt


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


[Pythonmac-SIG] py2app 0.5.2 fails to copy main-i386 file

2011-03-10 Thread Brendan Simon (eTRIX)
I upgraded to py2app 0.5.2 and now my app does not build :(
I'm using OS X 10.6 and Python 2.5.4 from python.org.

  File
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/shutil.py,
line 51, in copyfile
fsrc = open(src, 'rb')
IOError: [Errno 2] No such file or directory:

'/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/py2app/apptemplate/prebuilt/main-i386'


/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/shutil.py(58)copyfile()
- fsrc.close()
(Pdb) interrupted
make: *** [dist/SureAnalysis.app] Error 1


I thought I read that this was fixed in 0.5.2 (from 0.5.1) but it does
not seem to be the case.

I did see a message to copy main-fat to main-i386.  I tried that and the
app builds ok.
I note that there is also main-intel, main-universal, etc.  I presume
main-fat is the one to use ??

My app does not parse the command line arguments anymore when invoked
with 'open'
e.g. $ open myurl:mycommand

I remember modifying something with argv emulation quite a while ago (1
or 2 years ago).  Is this still expected with py2app 0.5.2 ??

Thanks, Brendan.

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


[Pythonmac-SIG] py2app os.getenv and path not working

2011-03-10 Thread Prashant Saxena
Hi,

Mac Leopard 10.5.5 Intel
python 2.6.6
wxpython 2.8.11.0
py2app 0.5.2

My program is working fine in source environment. In source environment 
'os.getenv' is working fine. When deploying .app using
py2app 'os.getenv' is returning none. I am also facing problems when executing 
external program using wx.Process. These programs
are available on path and there is no problem when executing them using 
terminal 
or running from my script in source environment.
I tried using full path of these external programs but they are also 
complaining 
about their own environment vars missing.
I am new to mac and absolutely node idea why .app is not able to access 
environment variables.

Cheers

Prashant



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


Re: [Pythonmac-SIG] py2app 0.5.2 fails to copy main-i386 file

2011-03-10 Thread Ronald Oussoren

On 10 Mar, 2011, at 9:04, Ronald Oussoren wrote:

 
 On 10 Mar, 2011, at 7:05, Brendan Simon (eTRIX) wrote:
 
 I upgraded to py2app 0.5.2 and now my app does not build :(
 I'm using OS X 10.6 and Python 2.5.4 from python.org.
 
   File 
 /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/shutil.py, 
 line 51, in copyfile
 fsrc = open(src, 'rb')
 IOError: [Errno 2] No such file or directory: 
 '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/py2app/apptemplate/prebuilt/main-i386'
  /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/shutil.py(58)copyfile()
 - fsrc.close()
 (Pdb) interrupted
 make: *** [dist/SureAnalysis.app] Error 1
 
 I thought I read that this was fixed in 0.5.2 (from 0.5.1) but it does not 
 seem to be the case.
 
 I did see a message to copy main-fat to main-i386.  I tried that and the app 
 builds ok.
 I note that there is also main-intel, main-universal, etc.  I presume 
 main-fat is the one to use ??
 
 My app does not parse the command line arguments anymore when invoked with 
 'open'
 e.g. $ open myurl:mycommand
 
 I remember modifying something with argv emulation quite a while ago (1 or 2 
 years ago).  Is this still expected with py2app 0.5.2 ??
 
 There is a problem with the source package of py2app. I want to do a new 
 release later this week that fixes the issue.
 
 (The problem is that not all files are included in the sdist archive because 
 our setup.py relied on setuptools including all files that are in the 
 repository, and that no longer works because we switched to mercurial).

That was a bit too optimistic:  I installed an Xcode4 prerelease on my machine 
and that not only doesn't ship with the OSX 10.4u SDK, the compiler also 
crashes when trying to build the -ppc and -fat variants of the application 
loader.

As I'm at Pycon I'll probably won't be able to do a release until I return from 
the conference (which means after the 20th). 

Ronald
 
 Ronald
 
 
 Thanks, Brendan.
 
 ___
 Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
 http://mail.python.org/mailman/listinfo/pythonmac-sig
 unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG
 
 ___
 Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
 http://mail.python.org/mailman/listinfo/pythonmac-sig
 unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG

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


[Pythonmac-SIG] Framework Python and X11

2011-03-10 Thread Ben McClure
The group I work with needs a Python with tkinter over X11 as well as
wxPython.  wxPython requires a framework build of Python on Mac, and
the current one I have is non-framework, using X11.  Is there a way of
building a framework Python that still supports X11 tkinter?

Thanks,
-Ben

-- 
Ben McClure
Structural Biology Grid
Harvard Medical School
www.sbgrid.org
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG


Re: [Pythonmac-SIG] py2app 0.5.2 and argv emulation with URLs/URIs

2011-03-10 Thread Brendan Simon (eTRIX)


On 11/03/11 1:04 AM, Ronald Oussoren wrote:

 On 10 Mar, 2011, at 7:05, Brendan Simon (eTRIX) wrote:

 I upgraded to py2app 0.5.2 and now my app does not build :(
 I'm using OS X 10.6 and Python 2.5.4 from python.org http://python.org.

 My app does not parse the command line arguments anymore when invoked
 with 'open'
 e.g. $ open myurl:mycommand

 I remember modifying something with argv emulation quite a while ago
 (1 or 2 years ago).  Is this still expected with py2app 0.5.2 ?? 
 i.e. should opening URLs/URIs work out of the box ??

 There is a problem with the source package of py2app. I want to do a
 new release later this week that fixes the issue.

 (The problem is that not all files are included in the sdist archive
 because our setup.py relied on setuptools including all files that are
 in the repository, and that no longer works because we switched to
 mercurial).

Any feedback on the argv_emulation issue when open URLs/URIs ??

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


Re: [Pythonmac-SIG] Framework Python and X11

2011-03-10 Thread Ned Deily
In article 
AANLkTiks=y9z2omufspejwnb-araivoxg1bvvy_jz...@mail.gmail.com,
 Ben McClure mccl...@hkl.hms.harvard.edu wrote:
 The group I work with needs a Python with tkinter over X11 as well as
 wxPython.  wxPython requires a framework build of Python on Mac, and
 the current one I have is non-framework, using X11.  Is there a way of
 building a framework Python that still supports X11 tkinter?

The python.org installers for Mac OS X do not support linking to an X11 
tkinter.  The simplest solution might be to install a Python from 
MacPorts.  The current MacPorts Tk is an X11 Tk, its Pythons are 
framework builds, and it has its own wxPython ports.  (I have no 
personal experience with wxPython.)

If you install the base MacPorts, one command might install all you need:

$ sudo port py27-wxpython # or py26-wxpython or ..

http://www.macports.org/ports.php?by=namesubstr=wxpython

-- 
 Ned Deily,
 n...@acm.org

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


Re: [Pythonmac-SIG] Framework Python and X11

2011-03-10 Thread Christopher Barker

On 3/10/11 12:22 PM, Ned Deily wrote:

The python.org installers for Mac OS X do not support linking to an X11
tkinter.  The simplest solution might be to install a Python from
MacPorts.


probably so, but



 The current MacPorts Tk is an X11 Tk, its Pythons are
framework builds, and it has its own wxPython ports.


I looked, and the wxPython ports are wxmac, not wxGTK, which I think 
is what the OP wants.


The fact that macports has done it means it can be done, so the OP would 
compile his own python as well. I think he's got it working with TK the 
way they want, so could he just add the framework flag and be done?


-Chris


--
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115   (206) 526-6317   main reception

chris.bar...@noaa.gov
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG


Re: [Pythonmac-SIG] Framework Python and X11

2011-03-10 Thread Lou Pecora


- Original Message 
From: Christopher Barker chris.bar...@noaa.gov
To: pythonmac-sig@python.org
Sent: Thu, March 10, 2011 4:13:01 PM
Subject: Re: [Pythonmac-SIG] Framework Python and X11

On 3/10/11 12:22 PM, Ned Deily wrote:
 The python.org installers for Mac OS X do not support linking to an X11
 tkinter.  The simplest solution might be to install a Python from
 MacPorts.

probably so, but


  The current MacPorts Tk is an X11 Tk, its Pythons are
 framework builds, and it has its own wxPython ports.

I looked, and the wxPython ports are wxmac, not wxGTK, which I think is what 
the OP wants.

The fact that macports has done it means it can be done, so the OP would 
compile 
his own python as well. I think he's got it working with TK the way they want, 
so could he just add the framework flag and be done?

-Chris


-- Christopher Barker, Ph.D.


--

When I was building Sage which has Python 2.6 in it I kept getting X11 windows, 
not the Apple Aqua version.  I found out using otool on the  _tkinter.so in 
sage 
that I was building against a tk/tcl library that was 
in /Library/Frameworks/Tk.framework/Versions/8.5/Tk and apparently was an X11 
library.  When I removed those libraries and rebuilt Sage it automatically 
built 
against the Apple tk/tcl libraries in /System/Library/Frameworks/Tk.framework/. 
Then I got the Aqua windows.  Might this be the case here?

 -- Lou Pecora, my views are my own.



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


[Pythonmac-SIG] [patch] GetURL argv emulation for py2app 0.5.2

2011-03-10 Thread Brendan Simon (eTRIX)
Below is my patch to get URLs/URIs to be added to sys.argv when an app
is opened via the Launcher.

It should be applied to:

/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/py2app/bootstrap/argv_emulation.py

Can this patch *please* be integrated (please modify if necessary) in to
0.5.3 release !!

eg.  You can test with open myapp myurl:test

The sys.argv attribute should include myurl:test :)

NOTE: for some reason the AppleEvent constants kAEInternetSuite and
kAEISGetURL does not work as they are set to 'gurl' (lowercase). 
However using 'GURL' does work :)

Cheers, Brendan.


--- argv_emulation_orig.py2011-03-11 08:49:13.0 +1100
+++ argv_emulation.py2011-03-11 09:47:00.0 +1100
@@ -7,7 +7,8 @@
 import traceback
 from Carbon import AE
 from Carbon.AppleEvents import kCoreEventClass, kAEOpenApplication, \
-kAEOpenDocuments, keyDirectObject, typeAEList, typeAlias
+kAEOpenDocuments, keyDirectObject, typeAEList, typeAlias, \
+kAEInternetSuite, kAEISGetURL, typeChar
 from Carbon import Evt
 from Carbon import File
 from Carbon.Events import highLevelEventMask, kHighLevelEvent
@@ -23,10 +24,14 @@
 self.__runapp)
 AE.AEInstallEventHandler(kCoreEventClass, kAEOpenDocuments,
 self.__openfiles)
+#AE.AEInstallEventHandler(kAEInternetSuite, kAEISGetURL,
self.__geturl)
+AE.AEInstallEventHandler('GURL', 'GURL', self.__geturl)
 
 def close(self):
 AE.AERemoveEventHandler(kCoreEventClass, kAEOpenApplication)
 AE.AERemoveEventHandler(kCoreEventClass, kAEOpenDocuments)
+#AE.AERemoveEventHandler(kAEInternetSuite, kAEISGetURL)
+AE.AERemoveEventHandler('GURL', 'GURL')
 
 def mainloop(self, mask = highLevelEventMask, timeout = 1*60):
 # Note: this is not the right way to run an event loop in
OSX or
@@ -91,6 +96,20 @@
 
 self._quit()
 
+def __geturl(self, requestevent, replyevent):
+try:
+listdesc = requestevent.AEGetParamDesc(keyDirectObject,
typeAEList)
+for i in range(listdesc.AECountItems()):
+desc = listdesc.AEGetNthDesc(i+1, typeChar)[1]
+url = desc.data.decode('utf8')
+sys.argv.append(url)
+except Exception, e:
+print argvemulator.py warning: can't unpack a GetURL
event
+import traceback
+traceback.print_exc()
+
+self._quit()
+
 return ArgvCollector()
 
 def _argv_emulation():


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