Re: Order in which modules are imported

2008-02-22 Thread Dave Hansen
On Feb 22, 5:21 pm, [EMAIL PROTECTED] wrote: > I imported two modules (random and matplotlib), and found that the > functions available to me from the random module depended on the order > in which the imports occured. In particular, if I import random first, [...] > > >>> import random > >>> from

Re: Order in which modules are imported

2008-02-22 Thread Roy Smith
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > I imported two modules (random and matplotlib), and found that the > functions available to me from the random module depended on the order > in which the imports occured. In particular, if I import random first, > none of its functions

Re: Order in which modules are imported

2008-02-22 Thread Tim Chase
import random from pylab import * x = random.uniform(0,1) > > Traceback (most recent call last): I suspect that >>> 'random' in dir(pylab) returns True...this would be one of those reasons that "from import *" is scowled upon. You have to know what is dumping into your names

Order in which modules are imported

2008-02-22 Thread tkpmep
I imported two modules (random and matplotlib), and found that the functions available to me from the random module depended on the order in which the imports occured. In particular, if I import random first, none of its functions seem to be available, while if I import it after matplotlib, I seem