Re: [Pythonmac-SIG] New to Python - how to get Py2App to work?

2008-07-30 Thread altern

Chris Mills(e)k dio:

Greetings,

I am new to Python, have never developed tools with C++ (I have 
extensive MEL scripting experience with Autodesk's Maya), and am faced 
with needing to develop tools to deploy into a Mac OSX 10.5 environment.


I've downloaded and installed py2app with ez-install and now am faced 
with getting it to work.


I have a simple python script which runs from inside the IDE and does 
what it is supposed to do, but I can not figure out how to get py2app to 
work. I've seen a number of setup.py references about, but what I would 
really like is a step by step procedure for getting a simple hello 
world app to be built so that I can have some contextual reference and 
from there I can probably iterate my way to a successful solution.


Is there a basic guide out there? The docs on:
http://undefined.org/python/py2app.html
do not make sense to me.


I would try to use the Python built in help system by running this on 
the terminal

$ python setup.py py2app --help
that should give you a description of all available options in py2app.
This example below explores some basic ideas, i hope it is not too old. 
I have not used mac so much for the last year or so.



#!/usr/bin/env python
from distutils.core import setup
import py2app

py2app_options = dict(
argv_emulation = True,
iconfile = 'pathtomyicon.icns',
packages = ['anyextrapackageshere', 'pyglet', 'twister'],
resources = [(stuff, [stuff/file.txt, stuff/file2.wav])]
# there are few more options here i never had to use
)

setup(
app=['MyApplication.py'],
options=dict(
py2app=py2app_options,
)
)
#

this is an example with some of the options you will find with the 
python console help above. The resources option allows to specify 
files and folders that have to included in the standalone.


Anyway there must be some better documentation. Ah here it is something
http://svn.pythonmac.org/py2app/py2app/trunk/doc/index.html

good luck!

enrike


Thanking you in advance for your patience and guidance.

Kind regards,
Chris Mills

Lizard Lounge Graphics, LTD.
Wellington, NZ
http://lizardlounge.com

Int'l:  +644-977-5400 / +642-174-8770
NZ local: 04-977-5400 /   021-748-770




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


[Pythonmac-SIG] was : py2app: how to include the entire standard library of modules?

2007-10-03 Thread altern
hi Nick

did you finally manage to include the entire standard library into an 
executable app? I am pretty interested to know about this, I had an idea 
where I needed to achieve this and I want to try again.

thanks!

enrike

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


Re: [Pythonmac-SIG] py2app?

2007-10-03 Thread altern

hi

there was a gui version for py2exe (windows equivalent of py2app) but i 
dont know any for py2app. Anyway if what you are doing is simple you can 
easily deal with the setup.py script.


this is the py2app documentation
http://svn.pythonmac.org/py2app/py2app/trunk/doc/index.html
the option reference
http://svn.pythonmac.org/py2app/py2app/trunk/doc/index.html#option-reference

Attached there is an example of a setup.py script that uses pygame, i 
think it should work, you just need to edit the name variable and run it 
like this

$ python setup.py py2app

However if you have assets like images, sounds etc... you need to make 
sure that they are also included, check the extra_file variable. IN that 
example it will put a file data/slicer_pd.pd into a folder called 
data inside the app. Otherwise keep extra_files = []


Please anyone correct if there is anything wrong, i just quickly put 
this together from another more complex script.


good luck

enrike

jack rothwell(e)k dio:

hi.
can anyone tell me how to use py2app? im just a novice python  
programmer and i have no idea how to use it. does anyone know if  
theres a gui version around? i have no idea what distutils or  
anything like that even MEANS. i just want to be able to send pygame  
games to friends.

please help! give me a push in the right direction!
una.x
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig




py2app build script.
Usage : $ python setup.py py2app


from distutils.core import setup
import sys, shutil, os

name = 'yourmainscriptname.py' # put your main script name here
extra_files = [  (data, [data/slicer_pd.pd,
		 data/sampler.pd, 
		 data/flower2.wav ]
  ) ]


import py2app

options = dict( py2app = dict( packages = [ 'pygame'], 
		  resources = extra_files, 
		) 
	)

setup( app = [ name ], )

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


Re: [Pythonmac-SIG] py2app error with /usr/bin/strip

2007-02-06 Thread altern
Ronald Oussoren wrote:
 
 On 5 Feb, 2007, at 22:04, altern wrote:
 
 Ronald Oussoren wrote:
 On 5 Feb, 2007, at 18:30, Chris Van Bael wrote:
 Hi,

 I'm getting essentially the same error for some time now.
 Could anybody please explain what is going wrong here exactly, because
 me and some other people are having the same error and re-installing
 py2app doesn't fix the problem.

 See:
 http://mail.python.org/pipermail/pythonmac-sig/2007-January/ 
 018645.html
 http://mail.python.org/pipermail/pythonmac-sig/2006-October/ 
 018390.html
 http://mail.python.org/pipermail/pythonmac-sig/2006-October/ 
 018391.html

 It would be a shame that I cannot provide a universal OS X version of
 our program because of this problem..
 Could you please try to provide an example that demonstrates te  
 problem? Without such an example there's little chance that I'll 
 look  into this unless I happen to run into this problem myself.

 in my computer something as simple as just

 while 1: print 'looping'

 causes the error when trying to create an app. I also tried with some 
 other basic scripts with same results
 
 What are the versions of py2app, macholib, altgraph, modulegraph on your 
 machine? Likewise for python itself.
 
 Just in case this is important: what version of OSX are you using, is it 
 an Intel or PPC system and do you have the Developer Tools installed?

from my first mail:
 I am working on an old G3 ppc ibook, I am running OS 10.4.8 and python 2.4.4, 
 Py2app version is 0.3.5 .

and on top of that :
i have Xcode tools for 10.4, macholib-1.1-py2.4, altgraph-0.6.7-py2.4, 
modulegraph-0.7-py2.4




 Ronald

 enrike


 Ronald
 Chris

 On 2/5/07, Bob Ippolito [EMAIL PROTECTED] wrote:
 When you see an error like that, it means there's a bug in macholib
 that caused it to produce a bogus file. Turning strip off doesn't
 really fix anything...

 -bob

 On 2/5/07, altern [EMAIL PROTECTED] wrote:
 hi again

 I solved the problem by doing
 $ python setup.py py2app --no-strip

 I read this about strip
 --strip (-S)strip debug and local symbols from output  
 (on by
  default, for compatibility)

 could anyone explain a bit more about what this is? or maybe  
 point to
 somewhere i can read about it. I am interested because last time  
 i used
 this machine i did not need to use this (only use it every now  
 and then
 for testing on OSX), so I am trying to find out what is the  
 difference
 from last time.

 thanks

 enrike


 altern wrote:
 Hi

 I am getting this error when trying to use py2app.

 $ py2applet --make-setup glut_opengl.py
 $ python setup.py py2app
 ...
 ...
 stripping bz2.so
 stripping zlib.so
 stripping _codecs_tw.so
 stripping umath.so
 stripping binascii.so
 /usr/bin/strip: for architecture i386 object:
 /Users/xxx/ixi/python/dist/glut_opengl.app/Contents/MacOS/python
 malformed object (unknown flavor for flavor number 0 in  
 LC_UNIXTHREAD
 command 13 can't byte swap it)
 /usr/bin/strip: for architecture i386 object:
 /Users/xxx/ixi/python/dist/glut_opengl.app/Contents/MacOS/ 
 glut_opengl
 malformed object (unknown flavor for flavor number 0 in  
 LC_UNIXTHREAD
 command 10 can't byte swap it)
 stripping saved 8991796 bytes (7898608 / 16890404)


 I also tried with
 $ python setup.py py2app --prefer-ppc
 but i got the same error. Because of the '/usr/bin/strip: for
 architecture i386 object' I thought it might be a problem with my
 processor, note that I am working on an old G3 ppc ibook, I am  
 running
 OS 10.4.8 and python 2.4.4, Py2app version is 0.3.5 .

 Later I tried with another script, one that does not use  
 pyOpengl, same
 error again.

 thanks

 enrike

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

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

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

 
 

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


[Pythonmac-SIG] py2app error with /usr/bin/strip

2007-02-05 Thread altern
Hi

I am getting this error when trying to use py2app.

$ py2applet --make-setup glut_opengl.py
$ python setup.py py2app
...
...
stripping bz2.so
stripping zlib.so
stripping _codecs_tw.so
stripping umath.so
stripping binascii.so
/usr/bin/strip: for architecture i386 object: 
/Users/xxx/ixi/python/dist/glut_opengl.app/Contents/MacOS/python 
malformed object (unknown flavor for flavor number 0 in LC_UNIXTHREAD 
command 13 can't byte swap it)
/usr/bin/strip: for architecture i386 object: 
/Users/xxx/ixi/python/dist/glut_opengl.app/Contents/MacOS/glut_opengl 
malformed object (unknown flavor for flavor number 0 in LC_UNIXTHREAD 
command 10 can't byte swap it)
stripping saved 8991796 bytes (7898608 / 16890404)


I also tried with
$ python setup.py py2app --prefer-ppc
but i got the same error. Because of the '/usr/bin/strip: for 
architecture i386 object' I thought it might be a problem with my 
processor, note that I am working on an old G3 ppc ibook, I am running 
OS 10.4.8 and python 2.4.4, Py2app version is 0.3.5 .

Later I tried with another script, one that does not use pyOpengl, same 
error again.

thanks

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


Re: [Pythonmac-SIG] py2app error with /usr/bin/strip

2007-02-05 Thread altern
hi again

I solved the problem by doing
$ python setup.py py2app --no-strip

I read this about strip
--strip (-S)strip debug and local symbols from output (on by
 default, for compatibility)

could anyone explain a bit more about what this is? or maybe point to 
somewhere i can read about it. I am interested because last time i used 
this machine i did not need to use this (only use it every now and then 
for testing on OSX), so I am trying to find out what is the difference 
from last time.

thanks

enrike


altern wrote:
 Hi
 
 I am getting this error when trying to use py2app.
 
 $ py2applet --make-setup glut_opengl.py
 $ python setup.py py2app
 ...
 ...
 stripping bz2.so
 stripping zlib.so
 stripping _codecs_tw.so
 stripping umath.so
 stripping binascii.so
 /usr/bin/strip: for architecture i386 object: 
 /Users/xxx/ixi/python/dist/glut_opengl.app/Contents/MacOS/python 
 malformed object (unknown flavor for flavor number 0 in LC_UNIXTHREAD 
 command 13 can't byte swap it)
 /usr/bin/strip: for architecture i386 object: 
 /Users/xxx/ixi/python/dist/glut_opengl.app/Contents/MacOS/glut_opengl 
 malformed object (unknown flavor for flavor number 0 in LC_UNIXTHREAD 
 command 10 can't byte swap it)
 stripping saved 8991796 bytes (7898608 / 16890404)
 
 
 I also tried with
 $ python setup.py py2app --prefer-ppc
 but i got the same error. Because of the '/usr/bin/strip: for 
 architecture i386 object' I thought it might be a problem with my 
 processor, note that I am working on an old G3 ppc ibook, I am running 
 OS 10.4.8 and python 2.4.4, Py2app version is 0.3.5 .
 
 Later I tried with another script, one that does not use pyOpengl, same 
 error again.
 
 thanks
 
 enrike
 

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


[Pythonmac-SIG] weird pygame problem on 10.4

2006-12-05 Thread altern
hi all

I just upgraded my old mac laptop to 10.4.8 from 10.3.9. I am running 
pygame + pyopengl scripts and I find this weird error that did not 
happen on 10.3.9. The 'canvas', the surface were the drawing happens it 
is misplaced within the window by 100 px to the right and 100 px to the 
top. So I get a 100 px wide empty band on the left bottom of the window.

If I run the same script using wxPython instead of pygame to handle the 
window events there is no problem at all.

The funny thing is that neither the pygame or the pyOpenGL examples have 
this problem, so it must be my code. But I dont really know where to 
start debugging from.

I am running python 2.4 and i installed all the stuff from
http://www.pythonmac.org/packages/py24-fat/index.html
including :
python-2.4.4-macosx2006-10-18.dmg
pygame-1.8.0pre-py2.4-macosx10.4.zip
PyOpenGL-2.0.2.01-py2.4-macosx10.4.zip

any hints would be very much appreciated

thanks!

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


Re: [Pythonmac-SIG] Support for live audio I/O via Python on Mac?

2006-10-18 Thread altern
kevin parks escribió:
 altern wrote:
 there are also some python interface to Supercollider programming 
 language. I think it is http://www.patrickkidd.com/
 
 That is AWESOME~ wow... Can't wait to try it. I used Supercollider about 
 10 years ago and did a lot of work in 1.x
 and 2.x and then just got discouraged as i HATE the syntax with a fiery 
 passion. It is nasty brackets braces parens
 and semicolons everywhere.  Makes purl look clean. Plus it was a moving 
 target patches you wrote under 1.x had
 to be rewritten in 2.x and then 3.x came out and that was abandoned for 
 Supercollider server or some nonsense.
 I through my arms up and RAN back to csound and cmix. ... But iffin i 
 get get to those amazing unit generators (SC
 has great great great sounding filters, oscils, etc. just amazing 
 sounding stuff) without having to put up with macho
 SC programmers and buttugly and confusing code, I am there. I am pumped 
 for this. I really want to try it.

you read my mind :)
I never really used supercollider but everytime i give it a try i get 
put off by the syntax. I am habituated to python and this makes getting 
into sc syntax pretty difficult, i always give up.

I heard that james mcartney is planning to do version 4 and there might 
be some big changes again ... oh well ... this is what i heard, maybe it 
wont be as bad as the changes from sc2 to sc3.

But yes the quality of the sound processing is really good and this 
makes sc a very appealing tool. I have been always dreaming about a sc 
in python. I discovered www.patrickkidd.com very recently and i was 
going to explore this together with rtcmix next month and make a 
decision soon. For me it is also very important that the system is 
totally cross platform.

I have been using puredata up to now, i patch on puredata and then run 
it as a process in the background with the -nogui flag from python. It 
works quite ok on all platforms but because i use several externals, it 
is a bit tricky on linux because they must be compiled.

 I havent used it myself so i cannot really say much about it.
 
 lemme know if you do.

sure.

 btw, kevin, how do you find RTCmix? have you tried in other platforms 
 than osx?
 I have used in on Linux quite a bit and on OS X. It also runs inside of 
 Max/MSP.
 RTcmix is great, and has a nice but small following. It is good if you 
 like the precompiled instruments.
 But it is not easy to make your own, nor is it easy to do any virtual 
 instrument design in it
 since everything that is precompiled i too high level already... 
 additionally the mixer bus-config
 metaphor for making a signal chain is awkward. But i have done a bunch 
 of stuff in RTcmix
 and also have had much success reusing Python code inside it. If the 
 python interface for SC
 is not ready for prime time, i would say give RTcmix a try. It is easy 
 to compile and lots of folks
 are using it on OS X and Linux.

ok, thanks for the overview.

 enrike


 kevin parks escribió:
 I use RTCmix to do real time audio on a Mac w/ Python

 http://rtcmix.org/

 Subject:
 Re: [Pythonmac-SIG] Support for live audio I/O via Python on Mac?
 From:
 Bob Ippolito [EMAIL PROTECTED]
 Date:
 Thu, 12 Oct 2006 20:04:25 -0700
 To:
 Jeff Rodman [EMAIL PROTECTED]

 To:
 Jeff Rodman [EMAIL PROTECTED]
 CC:
 pythonmac-sig@python.org


 On 10/12/06, Jeff Rodman [EMAIL PROTECTED] wrote:
   is there a simple, current Python module for controlling the audio
 in/out devices on Mac OSX (Python 2.5, OSX 10.4.8, PowerMac at the
 moment but Intel is possible), preferably in/out simultaneously?
 I've visited the main sites and lists, I think, but not found a basic
 answer.  audioop in the Standard Library manipulates files but does
 not play/record, ossaudiodev does not seem to be included in the
 actual Python install although documented in the Standard Library
 manual, and I can't find a mac-targeted form of the OSS module over
 at 4Front.  Just want to play and record short files, (I'll take any
 format, .raw data or wav is fine) in real time for a acoustic
 application.

 I'm sure there's a straightforward answer, I'm just missing it.
 Thanks for any help!
 ___
 Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
 http://mail.python.org/mailman/listinfo/pythonmac-sig


 
 

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


Re: [Pythonmac-SIG] Support for live audio I/O via Python on Mac?

2006-10-17 Thread altern
there are also some python interface to Supercollider programming 
language. I think it is http://www.patrickkidd.com/
I havent used it myself so i cannot really say much about it.

btw, kevin, how do you find RTCmix? have you tried in other platforms 
than osx?

enrike


kevin parks escribió:
 I use RTCmix to do real time audio on a Mac w/ Python
 
 http://rtcmix.org/
 
 Subject:
 Re: [Pythonmac-SIG] Support for live audio I/O via Python on Mac?
 From:
 Bob Ippolito [EMAIL PROTECTED]
 Date:
 Thu, 12 Oct 2006 20:04:25 -0700
 To:
 Jeff Rodman [EMAIL PROTECTED]

 To:
 Jeff Rodman [EMAIL PROTECTED]
 CC:
 pythonmac-sig@python.org


 On 10/12/06, Jeff Rodman [EMAIL PROTECTED] wrote:
   is there a simple, current Python module for controlling the audio
 in/out devices on Mac OSX (Python 2.5, OSX 10.4.8, PowerMac at the
 moment but Intel is possible), preferably in/out simultaneously?
 I've visited the main sites and lists, I think, but not found a basic
 answer.  audioop in the Standard Library manipulates files but does
 not play/record, ossaudiodev does not seem to be included in the
 actual Python install although documented in the Standard Library
 manual, and I can't find a mac-targeted form of the OSS module over
 at 4Front.  Just want to play and record short files, (I'll take any
 format, .raw data or wav is fine) in real time for a acoustic
 application.

 I'm sure there's a straightforward answer, I'm just missing it.
 Thanks for any help!
 ___
 Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
 http://mail.python.org/mailman/listinfo/pythonmac-sig
 

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


[Pythonmac-SIG] indentation problem

2006-03-10 Thread altern
hi all

i have been developing some tutorials with PyOxide and now i find that 
when i open them on Smultron the indentation is wrong. Students are vey 
likely to be using Smultron (no need to insatall pyObjC).

It tried to fix the indentation in one but there is something wrong 
under the hood because then it complains at end of lines, it says the 
syntax is wrong, and i have to remove the line end, hit return again and 
save. This for each line in blocks that had indentation wrong.

I was wondering if there is some way to automatically fix this or if i 
have to go file by file fixing the indentation and line breaks.

The funny thing is that when i open them in Kate under debian they look ok.

thanks!

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


Re: [Pythonmac-SIG] indentation problem

2006-03-10 Thread altern
Jan Erik Moström(e)k dio:
 altern [EMAIL PROTECTED] 2006-03-10 11:31:
 
 It tried to fix the indentation in one but there is something wrong 
 under the hood because then it complains at end of lines, it says the 
 syntax is wrong, and i have to remove the line end, hit return again and 
 save. This for each line in blocks that had indentation wrong.
 
 Without knowing anything about Smultron or PyOxide I would say that one of
 them is saving documents using Windows new line conventions and the other
 Unix (or Mac/Unix).
 
 You can easily write a Python script that fixes this and I think there are
 number of small apps on versiontracker that handles stuff like this (or
 perhaps Smulton/PyOxide can be scripted to do it)

hi jan

After reading your email i have been checking the preferences of both 
Smultron and PyOxide trying to find some configuration option.
I also read some old posts on the list about tabs vs spaces regarding 
python indentation problems.

Basically looks like the problem lies on that PyOxide does the 
indentation with tabs by default. I changed this to spaces 
(Preferences/editing/tabsfont), saved the files and now they get opened 
ok in Smultron.

but now it is working, i just have to save all files again.

thanks for your tips!

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


Re: [Pythonmac-SIG] indentation problem

2006-03-10 Thread altern
Stewart Midwinter(e)k dio:
 From: altern [EMAIL PROTECTED]
 Subject: [Pythonmac-SIG] indentation problem
 hi all

 i have been developing some tutorials with PyOxide and now i find that
 when i open them on Smultron the indentation is wrong.
 
 I use Smultron as well.  What do you mean, the indentation is wrong?
  Too much indentation, not enough?
 
 It tried to fix the indentation in one but there is something wrong
 under the hood because then it complains at end of lines, it says the
 syntax is wrong,
 
 What complains, Smultron?  What's the exact error message?

sorry. the exact problem was that something like this in pyoxide

def a():
if x:
pass

would look like this in smultron

def a():
if x:
pass

if i indented the pass line, then when running the code i got an error 
saying there was wrong syntax at the line return after if x:

But i solved this by changing the default option to save tabs as spaces 
in PyOxide, now Smultron opens them ok.

thanks for the tips

 I was wondering if there is some way to automatically fix this or if i
 have to go file by file fixing the indentation and line breaks.
 
 The most common source of problems with indentation is mixed use of
 tabs and space.  You should do one or other, preferably spaces.
 
 In Preferences  Advanced, check Indent with spaces not tabs
 In View, select Show Invisible Characters.
 
 This should help you track down the problem
 
 If you do have to change the indentation of a file, you don't need to
 edit lines individually. Select all lines in a block, then use
 Option-L to indent by 4 chars, or Option-K to outdent one char at a
 time.
 
 The funny thing is that when i open them in Kate under debian they look ok.
 
 Kate is not a programming editor, so that proves nothing.
 
 cheers
 Stewart
 

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


Re: [Pythonmac-SIG] Fwd: Preferred IDE

2005-12-01 Thread altern
[EMAIL PROTECTED](e)k dio:
 On Nov 29, 2005, at 1:03 PM, David M. Cooke wrote:
 
 
 
I've submitted a patch for Smultron that does this when indent with
spaces is turned on:
http://sourceforge.net/tracker/index.php? 
func=detailaid=1356887group_id=110857atid=657594

 
 
 Smultron looks quite nice, but I don't see a way to submit files for  
 execution, or to get console output back. Does it require switching  
 to Terminal or the like, or am I missing something?

as far as i know there is no way to do that in Smultron, but i might be 
wron. This is a pitty but i guess smultron it is a general editor. Thats 
actually the only thing that keeps me away from using it with python. 
In pyoxide you can open a console with python from within the editor and 
this is very handy to try things out.

 Jerry

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


Re: [Pythonmac-SIG] opening an application from python

2005-09-02 Thread altern
Bob Ippolito(e)k dio:
 
 On Sep 2, 2005, at 1:29 AM, altern wrote:
 
 hi

 I am trying to launch a sound application (Pure Data) from a python
 program. For this I am using this code:
 #
 execdir = os.path.dirname(sys.argv[0])
 pdexc = os.path.join(execdir,
 /Pd-0.38-4-extended-RC1.app/Contents/MacOS/Pd)
 arg = os.path.join(execdir, audio.pd)
 os.spawnl(os.P_NOWAIT, pdexc, arg)
 # etc ...

 i need to pass arguments to the application, PD is a command line
 application so it can be run from the terminal and several start up
 flags can be passed.

 My problem is that it kind of runs but not properly. I get the process
 running, it is there if i do 'top' on the terminal. But the  application
 never fully opens. I was wondering if there is some problem with doing
 this from Python, or if i should be using some other command.
 
 
 You should be using LaunchServices to launch the process with an open  
 document event, directly or indirectly.  You can do that with PyObjC,  
 or with Python 2.4's LaunchServices module, or with /usr/bin/open  (man 
 open).
 
 -bob


quite obvious, of course. sometimes it is difficult to see in front of 
oneself :)
thanks bob, i will try all this


-- 
altern


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


[Pythonmac-SIG] macpython on future apple's intel processors?

2005-06-06 Thread altern
hi

I just read about plans of apple to switch to intel processors in less 
than two years. I was wondering what this means for macpython. Maybe not 
much, they claim that it is pretty easy to port applications but it 
would be nice to hear some comments from someone in the list with 
experience on theses issues.

thanks!

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


Re: [Pythonmac-SIG] PyOXIDE wishes?

2005-05-28 Thread altern
hi

maybe a bit late but there it goes.
I have been doing some Ruby recently and i used the 30 days demo of an 
editor called TextMate. I found nice that when you type ( or [ or { or ' 
it automaticly gives you the closing simbol ' ] } ) on the right side of 
you cursor, then you just type the stuff in between and dont have to 
bother closing it.
I am not sure yet if this is useful or might cause some problems, so far 
it has been very nice, i am not good at typing and all those symbols in 
spanish keybpard are not that straight forward to get. Maybe this could 
be switched on or off from preferences?

hope this helps,

best


-- 
enrike

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


[Pythonmac-SIG] changging inheritance on the fly?

2005-04-17 Thread altern
hi
probably a bit offtopic since it is nothing mac specific but i didnt 
know where to ask.

is it possible to change the superclass a class inherits from on the fly?
for example i have this class inheriting from Top but i want it to 
inherit later on the fly from another class living in another module. I 
am doing this below but it doesnt work, 'm' doesnt change. Maybe i have 
to define the class Test on the fly to achive this? but i dont like much 
to do that. any other suggestions? thanks

#this is what i am doing now:
import mymodule as m
def start():
import othermodule as m

class Test(m.Top):
def __init__(self):
pass
thanks!!
--
enrike
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] changging inheritance on the fly?

2005-04-17 Thread altern
Michael Hudson wrote:
altern [EMAIL PROTECTED] writes:

hi
probably a bit offtopic since it is nothing mac specific but i didnt
know where to ask.

python-list?

is it possible to change the superclass a class inherits from on the fly?

You can assign to __bases__.

for example i have this class inheriting from Top but i want it to
inherit later on the fly from another class living in another
module. I am doing this below but it doesnt work, 'm' doesnt
change. Maybe i have to define the class Test on the fly to achive
this? but i dont like much to do that. any other suggestions? thanks
#this is what i am doing now:
import mymodule as m
def start():
import othermodule as m

class Test(m.Top):
def __init__(self):
pass

The way you ask the question suggests you don't know Python especially
well.  As Bob says, there are likely better ways to acheive your goal.
any tips about those other ways? i am reading pattern design books tring 
to find some way to do what i need, i know there must be some way but i 
am not a computer programmer myself, i keep learning...
thanks!

Cheers,
mwh

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


Re: [Pythonmac-SIG] PyOXIDE wishes?

2005-04-12 Thread altern
hi
probaly stupid request, but just wanted to say that on my spanish mac i 
cannot get the [ at all, so i am always copying and pasting from 
somewhere else.

thanks.

[EMAIL PROTECTED] wrote:
Sometime between now and WWDC, I'm planning on coming out with a major 
update for PyOXIDE http://projects.gandreas.com/pyoxide, and was 
wondering what sort of functionality others have been hoping for.  Right 
now the list is largely bug fix related:
Folding improvements
Better tracking of breakpoints  during editing
A few crashes on initial saves/quits
Update the PyOXIDE homepage

and only a few new features:
Out of process interactive interpreter support (which should allow 
interactive interpreters using a different version of python)
Non Blocking debugger (hopefully - this is the big ugly since it 
requires some interesting threading support)

So if you're looking for features/support, now's the time to ask...
Glenn Andreas  [EMAIL PROTECTED] 
 http://www.gandreas.com/ oh my!
quadrium | build, mutate, evolve | images, textures, backgrounds, art
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


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


Re: [Pythonmac-SIG] Audio I/O

2005-04-02 Thread altern
J. Devaney wrote:
Hello,
I'm working on a python project that requires audio I/O (via the
soundcard) - I basically just need a stream that can be analyzed in
real-time and stored to a file.  I've looked into various options -
such as portaudio using a python wrapper - but since portability
isn't really I issue I was wondering if there was a more direct
(and simpler approach).
Any suggestions or advice would be greatly appreciated.
Thanks,
Johanna
maybe this is not what you are looking for but you could use something 
like PureData or SuperCollider to analise the sound real time and then 
pass the info to python via OpenSoundControl protocol, there is a python 
implementation and runs pretty well.

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


[Pythonmac-SIG] pygtk

2005-03-07 Thread altern
hi all
i was wondering if it is possible to use pyGTK to program crossplarform 
python apps. I have been it checking, downloaded the installer from 
pygtk website but i cannot compile it so far. I have been trying to 
install it with packman but i cannot see it.
I want it to create a opengl window. So far i have been using wxpython 
but as i want to do something simple somebody suggested me that GTK 
might be good solution.

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