[Tutor] Package installation on Mac does not detect newer version of python

2011-08-29 Thread Elisha Rosensweig
Hi All, I'm trying to use easy_install on my Mac to get the Python networx package. On my machine I have installed version 2.5 AND 2.6 of Python. However, wehn I try to install this package, I get: easy_install networkx Searching for networkx Reading http://pypi.python.org/simple/networkx/ Readin

[Tutor] Auto-detecting of Python version - wrong!

2011-08-29 Thread Elisha Rosensweig
Hi All, I'm trying to use easy_install on my Mac to get the Python networx package. On my machine I have installed version 2.5 AND 2.6 of Python. However, wehn I try to install this package, I get: easy_install networkx Searching for networkx Reading http://pypi.python.org/simple/networkx/ Readin

[Tutor] Printing time without "if" statement

2010-03-07 Thread Elisha Rosensweig
Hi, I have an event-based simulator written in Python (of course). It takes a while to run, and I want to have messages printed every so often to the screen, indicating the simulation time that has passed. Currently, every event that occurs follows the following code snippet: # initilize printste

[Tutor] Branch Coverage Tool for Python

2009-10-08 Thread Elisha Rosensweig
Hi All, Is there any Python tool for Branch Coverage (as opposed to Statement Coverage)? Thanks ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

[Tutor] filtering NaN values

2009-06-22 Thread Elisha Rosensweig
Hi, I have a list with some values being NaN (after division-by-zero). How can I check and remove all the NaN values? Thanks Elisha ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] reference to directory a module is located at

2009-06-18 Thread Elisha Rosensweig
Thanks - just what I needed (and thanks to all the others too) Elisha On Thu, Jun 18, 2009 at 12:48 PM, Dave Angel wrote: > bob gailer wrote: > > Elisha Rosensweig wrote: >> >>> > Hi, >>> > >>> > How can I determine the directory in which

[Tutor] reference to directory a module is located at

2009-06-18 Thread Elisha Rosensweig
Hi, How can I determine the directory in which a module is located, from within that module? Elisha ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Program Slicing / Trace

2009-06-18 Thread Elisha Rosensweig
It is not clear to me in what way line 3 is different than line 2 - both are assignments... Please clarify Elisha On Thu, Jun 18, 2009 at 10:37 AM, Jojo Mwebaze wrote: > Hi Tutor > > The problem i have is to see which statements modify my data at execution > time without referring to the code. R

[Tutor] Fast way to access items in a dictionary

2009-06-17 Thread Elisha Rosensweig
Hi, Till now, when I receive a dictionary that I'm not sure contains a certain key, I would use the following template to access a given key: if 'someKey' in dict.keys(): someData = dict['someKey'] is there a faster way to do this? accessing a key that does not exist will through an exception

Re: [Tutor] Help Needed

2009-06-16 Thread Elisha Rosensweig
> Also is there a way to say reverse the string in a way so the reversed > string would result to "this take" if you use my example? And is there a way > to stop the loop without the use of break? Thanks for the help! > Sure. First take your string S and use S.split() to get a list of the individu

[Tutor] How to change the working directory in IDLE

2009-06-16 Thread Elisha Rosensweig
Hi Tutors, I"m using Python 2.6.2 and the IDLE tool (also v. 2.6.2). However, when I open the editor I cannot seem to change the directory so as to allow for easy access to my modules. So, for example, the following occurs: >>> os.chdir('/Users/elisha/Documents/workspace/CacheNetFramework/src/Tes