Re: Python advocacy in scientific computation

2006-02-14 Thread mrmakent
Nicely done. But now for a couple of small nits: other language is that they are suddenly dramatically several times more productive 'suddenly dramatically several times' seems a bit redundantly repeditively excessive, don't you think? Among the Python components and Python bindings of

Re: breadth first search

2006-02-08 Thread mrmakent
Chris McDonough wrote: L = [] [L.append(line) for line in (open('filename.txt')] Ouch. Did you perhaps mean: L = [ line for line in open('filename.txt') ] Or, with better error handling: try: f = open('filename.txt') except IOError: # handle error here else: L = [ line for line

Re: Pulling numbers from ASCII filename not working

2006-01-24 Thread mrmakent
First: http://www.catb.org/~esr/faqs/smart-questions.html You say your program 'crashes' when it gets to 'int(LatString)'. I'm guessing (and it's entirely a guess, since you don't tell us) that you are getting an exception like 'ValueError: invalid literal for int(): whatever'. I'm guessing

Re: py vs pyc

2006-01-09 Thread mrmakent
Sakcee wrote: what is the difference between runing from cmd python test.py and python test.pyc When you run 'python test.py', the python interpreter first looks to see if 'test.pyc' (which is the byte-code compiled version of 'test.py') exists, and if it is more recent than 'test.py'. If

Re: problem adding list values

2005-12-22 Thread mrmakent
Glad to help. Your relevant code: i = 0 for i in credlist: credits += credlist[i] i = i + 1 credlist is your list of credits, which are floating point numbers. You use a for-loop to iterate thru this list of floating point numbers, so each time thru the loop, the

Re: File object question

2005-12-22 Thread mrmakent
See http://www.python.org/doc/2.4.2/lib/os-file-dir.html for the 'stat' function import os os.stat(path).st_size This will return the size in bytes of the file designated by 'path'. -- http://mail.python.org/mailman/listinfo/python-list

Re: List index question

2005-12-07 Thread mrmakent
What you mean to do is y.index('2'), rather than y.index['2']. Call the index method of the list, rather than try to use index as if it was itself a list. -- http://mail.python.org/mailman/listinfo/python-list

Re: List index question

2005-12-07 Thread mrmakent
What you mean to do is y.index('2'), rather than y.index['2']. Call the index method of the list, rather than try to use index as if it was itself a list. -- http://mail.python.org/mailman/listinfo/python-list

McMillan Installer vs. Python 2.4

2005-03-30 Thread mrmakent
3 quick questions for the newsgroup: 1. Does anyone know why McMillan Installer 5b5 does not work with Python 2.4 under Linux (works with Python 2.3 just fine), and how to fix it? 2. Will anyone be picking up the maintenance and development ball for McMillan Installer? 3. Is there another,