Re: Conway's Life Implementation

2006-08-27 Thread Andrew Trevorrow
"Putty" <[EMAIL PROTECTED]> wrote: > Hi. I was going to write an implementation of John Conway's Life game > using Python and Tk, but I soon found that Tk just didn't cut the > mustard for memory usage, management, and the like for such a project, > so I've found my best GUI bet for my project is

Life + Python = Golly

2006-06-25 Thread Andrew Trevorrow
Golly is an open source, cross-platform Life app which features an unbounded universe and uses Gosper's hashlife algorithm to allow the exploration of patterns at unprecedented scales and speeds. We've just released version 1.0 and Python fans might be interested to hear that we're now using Pytho

Re: MS VC++ Toolkit 2003, where?

2006-04-24 Thread Andrew Trevorrow
[EMAIL PROTECTED] (Alex Martelli) wrote: > Andrew Trevorrow <[EMAIL PROTECTED]> wrote: > > Or maybe someone is willing to make their VCToolkitSetup.exe available > > temporarily... > > I suggest any such offers be made privately, since I'm pretty sure > th

Re: MS VC++ Toolkit 2003, where?

2006-04-24 Thread Andrew Trevorrow
Ron Adam wrote: > > Try tinyurl http://tinyurl.com/gv8wr please. > > I still get the following with the tinyurl link: > > ~~~ > The download you requested is unavailable. If you continue to see this > message when trying to access this download, go to the "Search for a > Download" area on the

Tkinter problem on Mac OS X

2006-04-09 Thread Andrew Trevorrow
Our app uses embedded Python to allow users to run arbitrary scripts. Scripts that import Tkinter run fine on Windows, but on Mac OS X there is a serious problem. After a script does "root = Tk()" our app's menus are permanently changed in the following way: - The top item in the application menu

LINKFORSHARED problem on Mac OS 10.4

2006-04-05 Thread Andrew Trevorrow
[I sent this to pythonmac-sig but never got a reply, so hopefully there are more Mac Python gurus here.] I recently added Python scripting to our app (an open source, cross-platform Life app called Golly; see http://golly.sourceforge.net/ if you're interested). Based on what I read at http://pyth

Re: embedding Python: how to avoid memory leaks?

2006-03-09 Thread Andrew Trevorrow
[EMAIL PROTECTED] wrote: > I could reproduce a memory leak with the code > > #include > int main() > { > while(1){ > Py_Initialize(); > PyRun_SimpleString("execfile('foo.py')"); > Py_Finalize(); > } > } > > However, I could not reproduce a memory leak with the code > > #include

Re: embedding Python: how to avoid memory leaks?

2006-03-09 Thread Andrew Trevorrow
Torsten Bronger <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] (Andrew Trevorrow) writes: > > > [...] > > > > I couldn't get the PyRun_*File* calls to work on Windows, presumably > > because of the FILE* problem mentioned in the docs. > > Whi

Re: embedding Python: how to avoid memory leaks?

2006-03-09 Thread Andrew Trevorrow
> > Our app (http://golly.sourceforge.net/) currently uses calls > > like these every time a user decides to run a script: > > > >Py_Initialize(); > >PyRun_SimpleString("execfile('foo.py')"); > > Does PyRun_AnyFile show the same effect? That's the way I'm about > to go. I couldn't get th

embedding Python: how to avoid memory leaks?

2006-03-09 Thread Andrew Trevorrow
No response to my last message, so I'll try a different tack... Does anyone know of, or even better, has anyone here written a C++ application for Mac/Windows that allows users to run Python scripts from within the app? Not just once, but many times in a single session, and without leaking memory

problem with multiple Py_Initialize/Py_Finalize calls

2006-03-06 Thread Andrew Trevorrow
Hi folks, I've only been using Python for a few weeks, so please be gentle. :) Lovely language by the way -- I really enjoying using it -- but I've struck a very nasty problem when running Python scripts from my app. Summary: Multiple Py_Initialize/Py_Finalize calls result in bad memory leaks, a