From cko@chyden.net Mon Aug 3 22:31:17 1998 From: cko@chyden.net (Charles Evans) Date: Mon, 03 Aug 1998 17:31:17 -0400 Subject: [Pythonmac-SIG] FaceSpan Message-ID: <35C62C1A.540F6248@chyden.net> If someone has experience using Python as the scripting language within FaceSpan, can they direct me to a cookbook/bootstrap set of instructions? Thanks! Sincerely, Charles Evans President, Chyden.Net Home of the World's First BeOS ISP http://www.chyden.net From jpaint@serv.net Tue Aug 4 23:39:28 1998 From: jpaint@serv.net (Jay Painter) Date: Tue, 4 Aug 1998 15:39:28 -0700 (PDT) Subject: [Pythonmac-SIG] Fixing up OSAm Message-ID: I'm working on clearing some memory leaks up in OSAm and fixing it so it doesn't eat events. I ran into a optimization I'd like to try, but it requires a module-destrcutror. Is there such a thing like initOSAm but destructOSAm? ----------------------------------------------------------------------- Jay Painter -- jpaint@serv.net -- jpaint@gimp.org -- jpaint@real.com http://www.serv.net/~jpaint From jpaint@serv.net Wed Aug 5 23:25:16 1998 From: jpaint@serv.net (Jay Painter) Date: Wed, 5 Aug 1998 15:25:16 -0700 (PDT) Subject: [Pythonmac-SIG] Simple AppleScript Class Message-ID: I've written a very simple convinence class for writing AppleScript with the OSAm module. I'm sure it could be better, but here's the class and a quick example. Suggestions are greatly appreshated... class AppleScript: def __init__(self, *args): self.script_list = [] for i in range(len(args)): self.script_list.append(args[i]) def Append(self, *args): for i in range(len(args)): self.script_list.append(args[i]) def AppendScript(self, applescript): self.script_list = self.script_list + applescript.script_list def Clear(self): self.script_list = [] def Text(self): return string.join(self.script_list, '\n') + '\n' def CompileAndExecute(self): import OSAm return OSAm.CompileAndExecute(string.join(self.script_list, '\r')) def CompileAndSave(self, path): import OSAm return OSAm.CompileAndSave(string.join(self.script_list, '\r'),path) Examples... script = AppleScript( 'tell application "Finder"', ' empty trash', 'end tell' ) script.CompileAndExecute() # executes it script.CompileAndSave(os.path.join(os.getcwd(), 'trashscript')) ... emptys the trash. I've had problems with the ExecuteCompiledScript method in OSAm that I'm trying to fix, so I have to use a small script to launch the saved applescript from above: launch_script = AppleScript( 'set scriptobj to (load script file "%s")' % (os.path.join(os.getcwd(), 'trashscript')), 'tell scriptobj', ' run', 'end tell' ) launch_script.CompileAndExecute() # runs the saved/compiled applescript This should probably be part of the applescript class, but I'm hoping to get RunCompiledScript working in OSAm so I don't have to do this anymore. ----------------------------------------------------------------------- Jay Painter -- jpaint@serv.net -- jpaint@gimp.org -- jpaint@real.com http://www.serv.net/~jpaint From Jack.Jansen@cwi.nl Tue Aug 18 10:06:10 1998 From: Jack.Jansen@cwi.nl (Jack Jansen) Date: Tue, 18 Aug 1998 11:06:10 +0200 Subject: [Pythonmac-SIG] RealBasic Message-ID: I just had a quick look at RealBasic (www.realbasic.com), a sort of VB clone for the Mac. I suggest that anyone looking for a really interesting (but big:-) Python project have a look at it too (hint, hint). It's a really slick interface builder with the code hanging off the various interface elements. The result can be saved as a standalone Mac application, and it's got lots of nifty features like builtin documentation, code browser, etc. Something like this would be really really neat to have for Python, sigh.... -- Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++ Jack.Jansen@cwi.nl | ++++ if you agree copy these lines to your sig ++++ http://www.cwi.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm From A.M.INGRALDI@larc.nasa.gov Tue Aug 18 17:15:46 1998 From: A.M.INGRALDI@larc.nasa.gov (Anthony M. Ingraldi) Date: Tue, 18 Aug 1998 12:15:46 -0400 Subject: [Pythonmac-SIG] Python for MPW? Message-ID: Hello, Does anyone know where I might be able to download a version of python that will run in the MPW environment (as an MPW tool)? I don't need the latest version of python or loads of extensions. Just the basic interpreter and things like the os and string modules would be sufficient. I may attempt to produce an MPW version of python myself if there isn't one already available. -- Tony Ingraldi | e-mail: A.M.INGRALDI@LaRC.NASA.GOV NASA Langley Research Center | Mail Stop 267 | Phone : (757) 864-3039 Hampton, VA 23681-2199 | Fax : (757) 864-7892 From patrick@swdev.com Tue Aug 18 19:55:59 1998 From: patrick@swdev.com (Patrick Curtain) Date: Tue, 18 Aug 1998 10:55:59 -0800 Subject: [Pythonmac-SIG] Python for MPW? References: Message-ID: <35D9CE29.AFDAD07C@swdev.com> Tony, haven't seen one, but i for one would certainly use it! --p ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Patrick Curtain, Husband & Father (I also write Software) patrick@swdev.com, http://www.swdev.com/ From patrick@swdev.com Tue Aug 18 19:59:20 1998 From: patrick@swdev.com (Patrick Curtain) Date: Tue, 18 Aug 1998 10:59:20 -0800 Subject: [Pythonmac-SIG] database modules Message-ID: <35D9CEF2.340C15A8@swdev.com> Hello everyone! What do the rest of you use for coding database functionality on your mac? I'm thinking here of coding applications that will eventually reside on Linux web servers and use MySQL or another opensource sql for it's db storage. I'd like to be able to do that work on my powerbook even when I'm away from the network. Any ideas, pointers, site, anything... MUCH appreciated! --p ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Patrick Curtain, Husband & Father (I also write Software) patrick@swdev.com, http://www.swdev.com/ From patrick@swdev.com Tue Aug 18 23:43:19 1998 From: patrick@swdev.com (Patrick Curtain) Date: Tue, 18 Aug 1998 14:43:19 -0800 Subject: [Pythonmac-SIG] Mac web servers for Python CGI Message-ID: <35DA037B.A9657FDE@swdev.com> Howdy All! I'm checking into what web server might work best at integrating Python as a CGI tool. What's everyone else using? AppleShare IP looks promising. NetPresenz looks solid (and gets a mention in the MacPython CGI info), but also looks out of date. Any input? --p ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Patrick Curtain, Husband & Father (I also write Software) patrick@swdev.com, http://www.swdev.com/ From aa126@fan1.fan.nb.ca Tue Aug 18 21:36:36 1998 From: aa126@fan1.fan.nb.ca (William Burrow) Date: Tue, 18 Aug 1998 17:36:36 -0300 Subject: [Pythonmac-SIG] CGI slow? Message-ID: <19980818173636.54643@fan.nb.ca> Has anyone done CGI with Python on the Mac here? Starting the Python applets certainly seemed slow. Aside from running them without quitting are there any other solutions? -- William Burrow, VE9WIL We've heard that a million monkeys at a million keyboards could produce the Complete Works of Shakespeare; now, thanks to the Internet, we know this is not true. --Robert Wilensky, University of California From aa126@fan1.fan.nb.ca Tue Aug 18 21:34:59 1998 From: aa126@fan1.fan.nb.ca (William Burrow) Date: Tue, 18 Aug 1998 17:34:59 -0300 Subject: [Pythonmac-SIG] database modules In-Reply-To: <35D9CEF2.340C15A8@swdev.com>; from Patrick Curtain on Tue, Aug 18, 1998 at 10:59:20AM -0800 References: <35D9CEF2.340C15A8@swdev.com> Message-ID: <19980818173459.41319@fan.nb.ca> On Tue, Aug 18, 1998 at 10:59:20AM -0800, Patrick Curtain wrote: > What do the rest of you use for coding database functionality on your > mac? > > I'm thinking here of coding applications that will eventually reside on > Linux web servers and use MySQL or another opensource sql for it's db > storage. I'd like to be able to do that work on my powerbook even when > I'm away from the network. > > Any ideas, pointers, site, anything... MUCH appreciated! I just got through a project using Gadfly. Unfortunately, Gadfly's client/ server model doesn't work too well under the mac. Perhaps some investigation would have found a solution, but my client went with Filemaker instead. If you somehow manage to hook up to mysql or other databases running on a unix server, I'd be interested for information's sake. -- William Burrow, VE9WIL We've heard that a million monkeys at a million keyboards could produce the Complete Works of Shakespeare; now, thanks to the Internet, we know this is not true. --Robert Wilensky, University of California From Jack.Jansen@cwi.nl Wed Aug 19 09:25:01 1998 From: Jack.Jansen@cwi.nl (Jack Jansen) Date: Wed, 19 Aug 1998 10:25:01 +0200 Subject: [Pythonmac-SIG] Python for MPW? In-Reply-To: Message by "Anthony M. Ingraldi" , Tue, 18 Aug 1998 12:15:46 -0400 , Message-ID: > Hello, > > Does anyone know where I might be able to download a version of python that > will run in the MPW environment (as an MPW tool)? I don't need the latest > version of python or loads of extensions. Just the basic interpreter and > things like the os and string modules would be sufficient. > > I may attempt to produce an MPW version of python myself if there isn't one > already available. Python ran under MPW many many years ago, but it hasn't been tried in ages. I you do try to build it I would be interested in the results. There are #ifdef MPW sprinkled through the code, but (1) definitely not in all places they're needed, (2) they're both for compiler dependencies (and I assume you'll be using the MW compilers, not the old Apple compilers) and for runtime dependencies and (3) the code inside the MPW ifdefs hasn't been looked at for ages. I think the best starting place would be the PythonStandSmall project, which builds a "minimal useful" Python. You may have to get rid of GUSI (not sure whether that works under MPW) and you'll probably have to compile with MPW newlines. It would probably also be a good idea to immedeately change the version string (an STR in one of the resource files, I think pythonpath.rsrc), as you want a different preferences file for sys.path initialisation because you can't share dynamic modules (and, if you use MPW newlines, not even .py files either). I think the project would definitely be doable, but not trivial. -- Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++ Jack.Jansen@cwi.nl | ++++ if you agree copy these lines to your sig ++++ http://www.cwi.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm From Jack.Jansen@cwi.nl Wed Aug 19 09:28:28 1998 From: Jack.Jansen@cwi.nl (Jack Jansen) Date: Wed, 19 Aug 1998 10:28:28 +0200 Subject: [Pythonmac-SIG] database modules In-Reply-To: Message by Patrick Curtain , Tue, 18 Aug 1998 10:59:20 -0800 , <35D9CEF2.340C15A8@swdev.com> Message-ID: > What do the rest of you use for coding database functionality on your > mac? The gdbm module is available, but that hardly counts as a database... > I'm thinking here of coding applications that will eventually reside on > Linux web servers and use MySQL or another opensource sql for it's db > storage. I'd like to be able to do that work on my powerbook even when > I'm away from the network. I would also have use for some sort of odbc or sql interface, so if anyone has it and is willing to contribute it I'd be most grateful... -- Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++ Jack.Jansen@cwi.nl | ++++ if you agree copy these lines to your sig ++++ http://www.cwi.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm From Jack.Jansen@cwi.nl Wed Aug 19 09:40:38 1998 From: Jack.Jansen@cwi.nl (Jack Jansen) Date: Wed, 19 Aug 1998 10:40:38 +0200 Subject: [Pythonmac-SIG] CGI slow? In-Reply-To: Message by William Burrow , Tue, 18 Aug 1998 17:36:36 -0300 , <19980818173636.54643@fan.nb.ca> Message-ID: > Has anyone done CGI with Python on the Mac here? Starting the Python applets > certainly seemed slow. Aside from running them without quitting are there > any other solutions? A lot of the slowness is in the initial importing. 1.5.2 will feature macfreeze, which can turn Python scripts into fullblown applications, so then there are two choices of turning a script into an application: - BuildApplet, which creates a minimal executable with the __main__ module in a resource - BuildApplication, which includes all modules in resources, and also includes all shared libraries in the application This scheme should be easily extendable to create a "big applet", which contains the minimal executable (like an ordinary applet) but all the needed modules in resources (like an application). I think that this would start up quickly, and still not be too huge. -- Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++ Jack.Jansen@cwi.nl | ++++ if you agree copy these lines to your sig ++++ http://www.cwi.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm From Anthony Baxter Wed Aug 19 10:28:48 1998 From: Anthony Baxter (Anthony Baxter) Date: Wed, 19 Aug 1998 19:28:48 +1000 Subject: [Pythonmac-SIG] database modules In-Reply-To: Your message of "Wed, 19 Aug 1998 10:28:28 +0200." Message-ID: <199808190928.TAA28305@koro.off.connect.com.au> >>> Jack Jansen wrote > I would also have use for some sort of odbc or sql interface, so if anyone has > it and is willing to contribute it I'd be most grateful... I think Sam Rushing's npstruct code has an example module that talks msql. Anthony From just@letterror.com Wed Aug 19 10:55:30 1998 From: just@letterror.com (Just van Rossum) Date: Wed, 19 Aug 1998 11:55:30 +0200 Subject: [Pythonmac-SIG] CGI slow? In-Reply-To: References: Message by William Burrow , Tue, 18 Aug 1998 17:36:36 -0300 , <19980818173636.54643@fan.nb.ca> Message-ID: At 10:40 AM +0200 8/19/98, Jack Jansen wrote: >> Has anyone done CGI with Python on the Mac here? Starting the Python >>applets >> certainly seemed slow. Aside from running them without quitting are there >> any other solutions? > >A lot of the slowness is in the initial importing. 1.5.2 will feature >macfreeze, which can turn Python scripts into fullblown applications, so then >there are two choices of turning a script into an application: >- BuildApplet, which creates a minimal executable with the __main__ module in > a resource >- BuildApplication, which includes all modules in resources, and also includes > all shared libraries in the application > >This scheme should be easily extendable to create a "big applet", which >contains the minimal executable (like an ordinary applet) but all the needed >modules in resources (like an application). I think that this would start up >quickly, and still not be too huge. I'm not sure whether this falls under "running them without quitting": I once created a Python server applet, and configured the webserver to execute .py scripts by sending AppleEvents to the server applet, which would then execute the script. That seemed to be pretty speedy. I don't have that server applet around anymore, but I think my collegue still uses it on his internal web server. Let me know, I can dig it up for you. (Hm: I remember promising the same thing to someone else, but I think I forgot...) Just From just@letterror.com Wed Aug 19 10:59:52 1998 From: just@letterror.com (Just van Rossum) Date: Wed, 19 Aug 1998 11:59:52 +0200 Subject: [Pythonmac-SIG] Python for MPW? In-Reply-To: References: Message by "Anthony M. Ingraldi" , Tue, 18 Aug 1998 12:15:46 -0400 , Message-ID: At 10:25 AM +0200 8/19/98, Jack Jansen wrote: >You may have to get rid of GUSI (not sure whether that works under MPW) FWIW, Matthias Neeracher has an MPW version of GUSI on his web page: http://www.iis.ee.ethz.ch/~neeri/macintosh/gusi-qa.html#Q1 Just From aa126@fan1.fan.nb.ca Wed Aug 19 14:42:16 1998 From: aa126@fan1.fan.nb.ca (William Burrow) Date: Wed, 19 Aug 1998 10:42:16 -0300 Subject: [Pythonmac-SIG] Mac web servers for Python CGI In-Reply-To: <35DA037B.A9657FDE@swdev.com>; from Patrick Curtain on Tue, Aug 18, 1998 at 02:43:19PM -0800 References: <35DA037B.A9657FDE@swdev.com> Message-ID: <19980819104216.15109@fan.nb.ca> On Tue, Aug 18, 1998 at 02:43:19PM -0800, Patrick Curtain wrote: > Howdy All! > > I'm checking into what web server might work best at integrating Python > as a CGI tool. What's everyone else using? AppleShare IP looks > promising. NetPresenz looks solid (and gets a mention in the MacPython > CGI info), but also looks out of date. > > Any input? Python works fine with WebSTAR. A little slow starting up, but probably so with all Mac web servers. -- William Burrow, VE9WIL We've heard that a million monkeys at a million keyboards could produce the Complete Works of Shakespeare; now, thanks to the Internet, we know this is not true. --Robert Wilensky, University of California From just@letterror.com Thu Aug 20 11:03:26 1998 From: just@letterror.com (Just van Rossum) Date: Thu, 20 Aug 1998 12:03:26 +0200 Subject: [Pythonmac-SIG] Python CGI server Message-ID: My friend Erik retrieved the old CGI Python server I mentioned yesterday. I added some comments and changed a few things without testing it. I don't know much about CGI, let alone CGI on the Mac, so if this thing appears simple-minded: well, it is. If you can use it, please do, if you make any improvements, please let me know. If it works well enough, maybe we should put it in the cgi demo folder in the next distribution. Poissibly this script could be expanded so it puts the arguments/parameters from the http request in the proper places, so they are accessible from the CGI module. Then *maybe* unix CGI's could "just work" on the Mac. Let me know if you have any ideas about this. Just --- pythoncgislave.py --- """pythoncgislave - A minimal Python server for CGI scripts.""" import MacOS # It seems sometimes AE's get lost if we don't do this. # Not sure if this is still true. MacOS.EnableAppswitch(-1) import os import string import StringIO import sys import traceback __version__ = '2.1' # fiddle with the next bit so _root becomes the root http directory # I guess that if this applet lives in the http root directory # it would be enough to write: # _root = os.path.dirname(sys.argv[0]) _thisapplethome = os.getcwd() _root = os.path.dirname(_thisapplethome) from MiniAEFrame import AEServer, MiniApplication class CGIslave(AEServer, MiniApplication): def __init__(self): MiniApplication.__init__(self) AEServer.__init__(self) self.installaehandler('aevt', 'oapp', self.open_app) self.installaehandler('aevt', 'quit', self.quit) self.installaehandler('WWW\275', 'sdoc', self.cgihandler) print 'ready.' print "python cgislave " + __version__ # dict for some semi-persistent things. self.lib = {} def quit(self, **args): self.quitting = 1 def open_app(self, **args): pass def cgihandler(self, pathargs, **args): path = args['scnm'] # convert unix path to mac path, prepend http root dir. path = string.join(string.split(path, '/'), ':') path = os.path.join(_root, path) # Reroute stdout and stderr. Rerouting stderr may be handy # when debugging, but not advisable for a final product. saveout = sys.stdout out = sys.stderr = sys.stdout = StringIO.StringIO() try: # 'args' will be visible as a global variable for # the CGI script. It might be possible to wrap # them in a way so they become accessible through # the CGI module, as they should... execfile(path, {'args': args, 'lib': self.lib, '__name__': '__main__', '__file__': path} ) except: print '
'
			traceback.print_exc()
			print '
' sys.stderr = sys.stdout = saveout return out.getvalue() cgislave = CGIslave() cgislave.mainloop() From doug@sonosphere.com Sun Aug 23 10:08:24 1998 From: doug@sonosphere.com (Doug Wyatt) Date: Sun, 23 Aug 1998 05:08:24 -0400 Subject: [Pythonmac-SIG] aetypes bug? In-Reply-To: <199706210421.OAA09690@shara.off.connect.com.au> References: Your message of "Fri, 20 Jun 1997 12:20:06 -0400." Message-ID: I just updated from Python 1.5a2 to 1.5.1 and have a new stack overflow in aetypes.py, from code that used to work fine. What's happening is that self._elemdict.has_key(name) is causing __getattr__ to recurse infinitely. def __getattr__(self, name): if self._elemdict.has_key(name): cls = self._elemdict[name] return DelayedComponentItem(cls, self) if self._propdict.has_key(name): cls = self._propdict[name] return cls(self) raise AttributeError, name 1.5a2's aetypes.py doesn't have this code ... reverting to all of 1.5a2's AppleEvent stuff makes things work again. I'd appreciate any help. Doug -- Doug Wyatt doug@sonosphere.com Sonosphere (electric/improv music) http://www.sonosphere.com/ "Accidental Beauties" CD release: http://www.sonosphere.com/wyatt/ available from CMC, 1-800-882-4262 http://www.MusicDiscoveries.com/ From doug@sonosphere.com Mon Aug 24 01:00:30 1998 From: doug@sonosphere.com (Doug Wyatt) Date: Sun, 23 Aug 1998 20:00:30 -0400 Subject: [Pythonmac-SIG] ftplib.storbinary problem Message-ID: Hi all, Here's another problem that has come up in my switch from Python 1.5a2 to 1.5.1. I'm using ftplib.storbinary to transfer a file to a server. I'm using a 16K blocksize. The file I'm transferring is 364494 bytes in size, but the server is only receiving 360448 bytes. 360448 is a multiple of 16K. I tweaked ftplib.storbinary to show its progress... def storbinary(self, cmd, fp, blocksize): '''Store a file in binary mode.''' self.voidcmd('TYPE I') conn = self.transfercmd(cmd) totalSize = 0 while 1: buf = fp.read(blocksize) if not buf: break conn.send(buf) l = len(buf) totalSize = totalSize + l print l conn.close() print 'totalSize=',totalSize return self.voidresp() It looks like conn.send() might now be asynchronous and thus conn.close() is getting called before the transfer is complete? I don't know how else to explain this. [10 minutes later] Indeed, yes, if I change it to: conn.send(buf, socket.MSG_WAITALL) # WAITALL - dsw it works!!! Am I reporting this to the right place? Doug -- Doug Wyatt doug@sonosphere.com Sonosphere (electric/improv music) http://www.sonosphere.com/ "Accidental Beauties" CD release: http://www.sonosphere.com/wyatt/ available from CMC, 1-800-882-4262 http://www.MusicDiscoveries.com/ From patrick@swdev.com Mon Aug 24 03:04:13 1998 From: patrick@swdev.com (Patrick Curtain) Date: Sun, 23 Aug 1998 18:04:13 -0800 Subject: [Pythonmac-SIG] BBEdit language support? Message-ID: <35E0C9C5.C48B0B63@swdev.com> Howdy all! I'm wondering, has anyone put together a module for BBEdit that supports syntax highlighting and function drop down functionality? Seems like that would certainly improve my day to day work. :) --p ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Patrick Curtain, Husband & Father (I also write Software) patrick@swdev.com, http://www.swdev.com/ From doug@sonosphere.com Mon Aug 24 04:04:18 1998 From: doug@sonosphere.com (Doug Wyatt) Date: Sun, 23 Aug 1998 23:04:18 -0400 Subject: [Pythonmac-SIG] ftplib.storbinary problem Message-ID: Hmn, the fix didn't completely solve the problem; I tried a larger file and its size on the server was too small, and not a multiple of the block size, as if the last block was not completely sent before the connection closed. I'd appreciate any help. Doug ~~~~~~~~~~~~~~~~ Hi all, Here's another problem that has come up in my switch from Python 1.5a2 to 1.5.1. I'm using ftplib.storbinary to transfer a file to a server. I'm using a 16K blocksize. The file I'm transferring is 364494 bytes in size, but the server is only receiving 360448 bytes. 360448 is a multiple of 16K. I tweaked ftplib.storbinary to show its progress... def storbinary(self, cmd, fp, blocksize): '''Store a file in binary mode.''' self.voidcmd('TYPE I') conn = self.transfercmd(cmd) totalSize = 0 while 1: buf = fp.read(blocksize) if not buf: break conn.send(buf) l = len(buf) totalSize = totalSize + l print l conn.close() print 'totalSize=',totalSize return self.voidresp() It looks like conn.send() might now be asynchronous and thus conn.close() is getting called before the transfer is complete? I don't know how else to explain this. [10 minutes later] Indeed, yes, if I change it to: conn.send(buf, socket.MSG_WAITALL) # WAITALL - dsw it works!!! Am I reporting this to the right place? Doug -- Doug Wyatt doug@sonosphere.com Sonosphere (electric/improv music) http://www.sonosphere.com/ "Accidental Beauties" CD release: http://www.sonosphere.com/wyatt/ available from CMC, 1-800-882-4262 http://www.MusicDiscoveries.com/ From managan@llnl.gov Tue Aug 25 17:35:26 1998 From: managan@llnl.gov (Rob Managan) Date: Tue, 25 Aug 1998 09:35:26 -0700 Subject: [Pythonmac-SIG] Packages Message-ID: I am working a little on getting the openGL extension working on the mac with the latest Mesa libraries. One question that comes up is how to work with packages. Do all the directories involved have to be added to sys.path? In testing this package I get from OpenGL.GL import * ImportError: No module named OpenGL.GL I have added PyOpenGL-1.5.3:OpenGL and PyOpenGL-1.5.3:OpenGL:GL to the path. I get the same message whether the second is added or not. So I guess I am asking whether packages work in the Mac version! Are there any others out there to test? *-*-*-*-*-*-*-*-*-*-**-*-*-*-*-*-*-*-*-*-*- Rob Managan mailto://managan@llnl.gov LLNL ph: 925-423-0903 P.O. Box 808, L-183 FAX: 925-423-5804 Livermore, CA 94551-0808 From WIGHT_J@admiral.co.uk Tue Aug 25 17:54:14 1998 From: WIGHT_J@admiral.co.uk (Wight Jonathan) Date: Tue, 25 Aug 1998 17:54:14 +0100 Subject: [Pythonmac-SIG] Python on the Mac Message-ID: <9563EAD80B52D11194F800805F193C410CD4F0@ERASMUS_1> Hi Rob, Do you have the official OpenGL implementation from Connix to test it against? If not I'd try emailing them and asking for a demo version - they're very obliging. Jon --- Jonathan Wight - Analyst Programmer - Admiral Computing Ltd Personal: JWight@bigfoot.com +44 (0)1438 229 379 Work: Wight_J@admiral.co.uk +44 (0)1276 692 269 x308 From just@letterror.com Wed Aug 26 00:38:11 1998 From: just@letterror.com (Just van Rossum) Date: Wed, 26 Aug 1998 01:38:11 +0200 Subject: [Pythonmac-SIG] Packages In-Reply-To: Message-ID: >I am working a little on getting the openGL extension working on the mac >with the latest Mesa libraries. One question that comes up is how to work >with packages. Do all the directories involved have to be added to sys.path? > >In testing this package I get > >from OpenGL.GL import * >ImportError: No module named OpenGL.GL > >I have added PyOpenGL-1.5.3:OpenGL and PyOpenGL-1.5.3:OpenGL:GL to the >path. I get the same message whether the second is added or not. > >So I guess I am asking whether packages work in the Mac version! Are there >any others out there to test? Packages work just fine on the Mac. The folder in which the OpenGL folder lives should be on sys.path (not OpenGL itself), and the OpenGL folder *must* contain a __init__.py file (it may be empty, though). It then it depends on what's in OpenGL or it's __init__.py file whether there is a submodule called GL... Does import OpenGL work? Just