Re: [Tutor] Finding the version # of a module, and py module problem

2010-08-07 Thread W. eWatson
On 8/6/2010 7:18 PM, Philip Semanchuk wrote: On Aug 6, 2010, at 3:14 PM, W. eWatson wrote: I must be missing something. I tried this. (Windows, IDLE, Python 2.5) Yes, as Benjamin Kaplan pointed out and as I said in the email where I posted this code snippet, "dependencies is a list of custom

Re: [Tutor] Finding the version # of a module, and py module problem

2010-08-06 Thread Philip Semanchuk
On Aug 6, 2010, at 3:14 PM, W. eWatson wrote: I must be missing something. I tried this. (Windows, IDLE, Python 2.5) Yes, as Benjamin Kaplan pointed out and as I said in the email where I posted this code snippet, "dependencies is a list of custom classes that represent modules we need (e

Re: [Tutor] Finding the version # of a module, and py module problem

2010-08-06 Thread Tommy Grav
On Aug 6, 2010, at 3:14 PM, W. eWatson wrote: > I must be missing something. I tried this. (Windows, IDLE, Python 2.5) > # Try each module > import sys > import numpy > import scipy > import string > > dependencies = "numyp", "scipy" > for dependency in dependencies: >try: >__import_

Re: [Tutor] Finding the version # of a module, and py module problem

2010-08-06 Thread Benjamin Kaplan
On Fri, Aug 6, 2010 at 12:14 PM, W. eWatson wrote: > I must be missing something. I tried this. (Windows, IDLE, Python 2.5) > # Try each module > import sys > import numpy > import scipy > import string > > dependencies = "numyp", "scipy" > for dependency in dependencies: >    try: >        __impo

Re: [Tutor] Finding the version # of a module, and py module problem

2010-08-06 Thread W. eWatson
I must be missing something. I tried this. (Windows, IDLE, Python 2.5) # Try each module import sys import numpy import scipy import string dependencies = "numyp", "scipy" for dependency in dependencies: try: __import__(dependency.name) except ImportError: # Uh oh!

Re: [Tutor] Finding the version # of a module, and py module problem

2010-08-06 Thread W. eWatson
On 8/5/2010 6:47 PM, Philip Semanchuk wrote: On Aug 5, 2010, at 8:55 PM, W. eWatson wrote: It's been awhile since I've used python, and I recall there is a way to find the version number from the IDLE command line prompt. dir, help, __version.__? Hi Wayne, FYI it's got nothing to do with IDL

Re: [Tutor] Finding the version # of a module, and py module problem

2010-08-06 Thread Philip Semanchuk
On Aug 6, 2010, at 10:20 AM, Richard D. Moores wrote: On Thu, Aug 5, 2010 at 18:47, Philip Semanchuk wrote: it's just a question of whether or not the module in question exposes any kind of a version attribute. There's no standard, unfortunately. The most popular convention seems to be

Re: [Tutor] Finding the version # of a module, and py module problem

2010-08-06 Thread Richard D. Moores
On Thu, Aug 5, 2010 at 18:47, Philip Semanchuk wrote: > > it's just a question of whether or not > the module in question exposes any kind of a version attribute. There's no > standard, unfortunately. The most popular convention seems to be via an > attribute called __version__, but I've also seen

Re: [Tutor] Finding the version # of a module, and py module problem

2010-08-05 Thread Philip Semanchuk
On Aug 5, 2010, at 8:55 PM, W. eWatson wrote: It's been awhile since I've used python, and I recall there is a way to find the version number from the IDLE command line prompt. dir, help, __version.__? Hi Wayne, FYI it's got nothing to do with IDLE, it's just a question of whether or no

Re: [Tutor] Finding the version # of a module, and py module problem

2010-08-05 Thread W. eWatson
On 8/5/2010 6:23 PM, MRAB wrote: W. eWatson wrote: It's been awhile since I've used python, and I recall there is a way to find the version number from the IDLE command line prompt. dir, help, __version.__? I made the most minimal change to a program, and it works for me, but not my partner. He

Re: [Tutor] Finding the version # of a module, and py module problem

2010-08-05 Thread W. eWatson
On 8/5/2010 6:13 PM, Steven D'Aprano wrote: On Thu, 05 Aug 2010 17:55:30 -0700, W. eWatson wrote: I'm pretty sure he has the same version of Python, 2.5, but perhaps not the numpy or scipy modules. I need to find out his version numbers. It's only a convention, but the usual way is to check t

Re: [Tutor] Finding the version # of a module, and py module problem

2010-08-05 Thread MRAB
W. eWatson wrote: It's been awhile since I've used python, and I recall there is a way to find the version number from the IDLE command line prompt. dir, help, __version.__? I made the most minimal change to a program, and it works for me, but not my partner. He gets Traceback (most recent

Re: [Tutor] Finding the version # of a module, and py module problem

2010-08-05 Thread Steven D'Aprano
On Thu, 05 Aug 2010 17:55:30 -0700, W. eWatson wrote: > I'm pretty sure he has the same version of Python, 2.5, but perhaps not > the numpy or scipy modules. I need to find out his version numbers. It's only a convention, but the usual way is to check the __version__ attribute. It works for Nump

Re: [Tutor] Finding the version # of a module, and py module problem

2010-08-05 Thread W. eWatson
It's been awhile since I've used python, and I recall there is a way to find the version number from the IDLE command line prompt. dir, help, __version.__? I made the most minimal change to a program, and it works for me, but not my partner. He gets Traceback (most recent call last): File