[Pythonmac-SIG] Building Apps in Os X? (previously Silly Ques tion....)

Schollnick, Benjamin Benjamin.Schollnick@usa.xerox.com
Fri, 07 Dec 2001 13:15:02 -0500


Richard,

	The problem is that I'm considering rewriting some of my
older "Message Base", etc (BBS related software) for the web &
telnet/irc.....
And while Shelve will work, I'm concerned on performance for lookups....

	As well as considering messing around while a python newsgroup /
usenet
server prototype that I found, and updating it to use a proper database,
instead of shelve....

	I'll have to (at least) examine MySQL, as per the earlier
recommendation.... 
Does anyone have any pointers for building apps in OS X?  I really haven't
done any
UNIX builds....

			- Benjamin

-----Original Message-----
From: Richard Gordon [mailto:richard@richardgordon.net]
Sent: Friday, December 07, 2001 12:16 PM
To: Schollnick, Benjamin
Cc: pythonmac-sig@python.org
Subject: Re: [Pythonmac-SIG] Silly question? Database server (Mac OS 9 /
Mac OS x / PC-Win)


At 11:00 AM -0500 12/7/01, Schollnick, Benjamin wrote:
>MySQL doesn't seem to have a Mac version, that I could find?

Not unless something has been made available for OS X.

>Does anyone know of a Macintosh database that is Python accessible,
>preferably
>with a SQL style interface?  (i.e. I pass a SQL statement to the database
>engine)
>
>If necessary, I'll make a translation layer, for the PC version... But I
>really
>haven't looked into any of Mac Database packages (except Filemaker Pro
>v4)...
>Preferably this should be free, since however runs this would need it...

I think that the only thing that meets all of your criteria is Gadfly 
SQL which is pure python and available for free at 
http://www.chordate.com/gadfly.html. It's interesting to play with, 
but I personally ran into a problem regarding query results exceeding 
some internal limits even tho they were not especially large and 
Gadfly is in any case not intended to be used in heavy production 
environments.

The biggest problem is that as far as I know, it hasn't been updated 
in quite a while. You will have to convert the line endings of its 
components to get it to run on a Mac and then edit a couple of files 
to make it work with Python 2.x regardless of platform:

gfserve.py line 335:
#change from
#sock.bind(self.HOST, self.port)
#to
tupleName = self.HOST, self.port
sock.bind(tupleName)

gfclient.py line 141:
#change from
#sock.connect(self.machine, self.port)
#to
tupleName = self.machine, self.port
sock.connect(tupleName)

Depending on what you need to do, you might also consider the shelve 
module if you really just need a persistent dictionary-like object. 
It's very simple to use and has been quite fast when I've used it in 
cgi hit counters and stuff like that.


Richard Gordon
--------------------
Gordon Design
Web Design/Database Development
http://www.richardgordon.net