xml application advice

2009-06-10 Thread William Purcell
I am writing a application to calculate pressure drop for a piping network. Namely a building sprinkler system. This will be a command line program at first with the system described in xml (at least that is how I think I want to do it). An important part of this calculation is finding the

Re: xml application advice

2009-06-10 Thread William Purcell
Diez B. Roggisch wrote: William Purcell wrote: I am writing a application to calculate pressure drop for a piping network. Namely a building sprinkler system. This will be a command line program at first with the system described in xml (at least that is how I think I want to do

Re: xml application advice

2009-06-10 Thread William Purcell
Scott David Daniels wrote: William Purcell wrote: I am writing a application to calculate pressure drop for a piping network. Namely a building sprinkler system. This will be a command line program at first with the system described in xml If you are going to be doing a lot of tree

Re: Dictionary of Dicts question

2008-10-16 Thread William Purcell
I believe that myDict['TestName'] = {'NewFileName': {}, } should be myDict['TestName']['NewFileName'] = {} -Bill On Thu, Oct 16, 2008 at 3:44 PM, Chris Rebert [EMAIL PROTECTED] wrote: On Thu, Oct 16, 2008 at 12:19 PM, John Townsend [EMAIL PROTECTED] wrote: I'm working with a Dictionary of

why? __builtins__ key added from eval

2008-10-01 Thread William Purcell
I want to use eval to evaluate wx.TextCtrl inputs. How can I keep python from adding the __builtins__ key to mydict when I use it with eval? Other wise I have to __delitem__('__builtins__') everytime I use eval? mydict = {'a':2,'b':3} eval('a*b',mydict) 6 mydict {'a': 2, '__builtins__':

__buitins__ key added during eval()

2008-09-30 Thread William Purcell
I want to use eval to evaluate wx.TextCtrl inputs. How can I keep python from adding the __builtins__ key to mydict when I use it with eval? Other wise I have to __delitem__('__builtins__') everytime I use eval? mydict = {'a':2,'b':3} eval('a*b',mydict) 6 mydict {'a': 2, '__builtins__':

Re: Converting .doc to .txt in Linux

2008-09-04 Thread William Purcell
Here is a function that I have used with wvText to convert .doc files into text files. def readdoc(fpath): tmp = 'tmp_readdoc.txt' cmd = 'wvText %s %s'%(fpath,tmp) os.system(cmd) lines = open(tmp,'r').readlines() os.unlink(tmp) return lines It's not a completely python

Python + Mac Help

2008-08-26 Thread William Purcell
I am new to the Mac/OS X world. I am trying to get Python set up with Numpy, Scipy, Matplotlib, and wxPython. It seems that everything is working fine except Scipy. To explain my problem, it is probably best to see the following Simply trying to import Scipy...

Re: Python + Mac Help

2008-08-26 Thread William Purcell
FYI...I found the site that I installed from besides MacScience. I think that I have installed just about everything on this site. http://www.pythonmac.org/packages/py25-fat/index.html On Tue, Aug 26, 2008 at 10:05 PM, William Purcell [EMAIL PROTECTED] wrote: I am new to the Mac/OS X world. I

Re: programming toolbox

2008-08-22 Thread William Purcell
Thanks for the replies. I am still wondering if C++ would be worth learning and I think it could be answered by these three questions... 1. Are programs written in C++ better (in any form of the word) than programs written in python or vise versa or equal? 2. Is compiled better than interpreted?

Re: programming toolbox

2008-08-22 Thread William Purcell
:27AM -0500, William Purcell wrote: I am still wondering if C++ would be worth learning and I think it could be answered by these three questions... 1. Are programs written in C++ better (in any form of the word) than programs written in python or vise versa or equal? 2. Is compiled

Re: Read PDF content

2008-08-21 Thread William Purcell
Sorry, this last email was meant to be to the list. On Thu, Aug 21, 2008 at 8:41 AM, William Purcell [EMAIL PROTECTED]wrote: I have been trying to do the same thing. Here is something I came up with, although it's not completely dependent on Python. It requires pdftotext to be installed

Re: wx scroll bar

2008-08-21 Thread William Purcell
I have been wanting to figure this out. I used a couple of your code snippets below and I can get a scroll bar. When I scroll down, it doesn't scroll the panel down. The only thing that happens is that the scroll bar moves up and down. Any thoughts? On Thu, Aug 21, 2008 at 8:36 AM, Gandalf [EMAIL

programming toolbox

2008-08-21 Thread William Purcell
Hi all, I started programming with python about a year ago. I am now somewhat experienced with python but have virtually no experience with any other language. I use python to write little command line tools, GUI's to do anything from my time sheet at work to balancing my checkbook, and for

reading plist files

2008-08-14 Thread William Purcell
Hi, I'm trying to write a bookmark synchronizer from Firefox/Foxmarks to Safari. The Firefox side of things will be fairly easy and I thought the Safari side would be too. Right now I am simply attempting to read my Bookmarks.plist file using plistlib.py. Here is my attempt to read the file along

Re: reading plist files

2008-08-14 Thread William Purcell
This is how it cut and pasted.. bplist00Ô This is what it looks like in a text editor (emacs)... [EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@ On Thu, Aug 14, 2008 at 8:18 AM, Fredrik Lundh [EMAIL PROTECTED]wrote: William Purcell wrote: class 'xml.parsers.expat.ExpatError': not well

Re: reading plist files

2008-08-14 Thread William Purcell
Sorry, I ment to reply to the mail list Thanks for the info. Do you know if these files can be handled in Python? On Thu, Aug 14, 2008 at 8:50 AM, William Purcell [EMAIL PROTECTED]wrote: On Thu, Aug 14, 2008 at 8:36 AM, Fredrik Lundh [EMAIL PROTECTED]wrote: William Purcell wrote

Checking a file's time stamp.

2008-08-12 Thread William Purcell
Hi all, I am wanting to check to see the last time a file was edited. For example, I have a directory containing two text files, file1.txt and file2.txt. I want to be able to process these files but only if they have been edited since the last time they were processed. I think that I want to be

Re: Checking a file's time stamp.

2008-08-12 Thread William Purcell
]: python-list-bounces+edwin.madari python-list-bounces%2Bedwin.madari= [EMAIL PROTECTED] Behalf Of William Purcell Sent: Tuesday, August 12, 2008 1:47 PM To: Python List Subject: Checking a file's time stamp. Hi all, I am wanting to check to see the last time a file was edited. For example, I