Re: Frustrating segfaults with Shelf

2010-09-13 Thread Edward Grefenstette
Dear Emile, Thank you for your response. Upgrading python and starting with a blank database somehow did the trick! Best, Edward On Sep 13, 7:09 pm, Emile van Sebille wrote: > On 9/13/2010 10:05 AM Edward Grefenstette said... > > > Dear Pythonistas, > > > Below is a sim

Frustrating segfaults with Shelf

2010-09-13 Thread Edward Grefenstette
Dear Pythonistas, Below is a simple script that reads relations from a generator (they're just tuples of strings) and attempts to write them to a database. It's simple as hell, and if I simply ignore the database and have it print to stdout by replacing the line "depsDB[str(index)] = rels" with "p

Database problems

2010-09-06 Thread Edward Grefenstette
Dear Pythonistas, For a project I'm working on, I need to store fairly large dictionaries (several million keys) in some form (obviously not in memory). The obvious course of action was to use a database of some sort. The operation is pretty simple, a function is handed a generator that gives it

Re: Trouble with running java using Popen

2009-06-23 Thread Edward Grefenstette
oggisch" wrote: > Edward Grefenstette schrieb: > > > > > I have a java prog I need to run at some point during the execution of > > a python module. > > > The path to the folder containing the all the relevant java stuff > > (which runs fine from the comman

Trouble with running java using Popen

2009-06-23 Thread Edward Grefenstette
I have a java prog I need to run at some point during the execution of a python module. The path to the folder containing the all the relevant java stuff (which runs fine from the command line) is stored in pkgpath. The relevant code is this: >>> os.chdir(pkgpath) >>> arglist = "java -Xmx1024m Se

Re: LaTeXing python programs

2009-05-20 Thread Edward Grefenstette
On May 20, 10:10 pm, John Reid wrote: > Alan G Isaac wrote: > > The listings package is great and highly configurable. > > Note that you can also input entire files of Python code > > or pieces of them based on markers.  Really quite great. > > I tried listings. I believe pygments makes better for

LaTeXing python programs

2009-05-20 Thread Edward Grefenstette
Yes, I am aware that this is more of a LaTeX question than a python question, but I thought users here might be most likely to offer a suitable recommendation. I'm typing up my master's thesis and will be including some of the code used for my project in an appendix. The question is thus: is ther

Re: Help with Tkinter on OS X --- driving me insane!

2009-05-17 Thread Edward Grefenstette
Bingo! Updating to Python 6.2.2 did the trick (I had 6.2). I just had to relink the /usr/bin/python to the Current directory in /Library/ Frameworks/Python.framework/Versions/ and everything worked without deletions etc. Thanks for your help, everyone! Best, Edward -- http://mail.python.org/mailm

Re: Help with Tkinter on OS X --- driving me insane!

2009-05-17 Thread Edward Grefenstette
May 18, 1:09 am, Ned Deily wrote: > In article > , >  Edward Grefenstette wrote: > > > I thought of this. I uninstalled Tk from macports, but the same error > > crops up. Evidently, Tk 8.5 remains installed somewhere else, but I > > don't know where. How c

Re: Help with Tkinter on OS X --- driving me insane!

2009-05-17 Thread Edward Grefenstette
I thought of this. I uninstalled Tk from macports, but the same error crops up. Evidently, Tk 8.5 remains installed somewhere else, but I don't know where. How can I find out? Best, Edward > > > Have you installed Tk version 8.5? > > If so, remove it. You might also install the latest 8.4 version

Help with Tkinter on OS X --- driving me insane!

2009-05-17 Thread Edward Grefenstette
Any attempt to do anything with Tkinter (save import) raises the following show-stopping error: "Traceback (most recent call last): File "", line 1, in File "/Library/Frameworks/Python.framework/Versions/2.6/lib/ python2.6/lib-tk/Tkinter.py", line 1645, in __init__ self._loadtk() File "