On Oct 25, 5:07 pm, Tim Chase wrote:
> >> t...@rubbish:~/tmp$ rm test.py test.pyc
> >> t...@rubbish:~/tmp$ python2.5
> >> >>> import test
> >> >>> dir(test)
> >> ['__builtins__', '__doc__', '__file__', '__name__', '__path__']
> >> >>> test.__file__
> >> '/usr/lib/python2.5/test/__init__.pyc'
>
t...@rubbish:~/tmp$ rm test.py test.pyc
t...@rubbish:~/tmp$ python2.5
>>> import test
>>> dir(test)
['__builtins__', '__doc__', '__file__', '__name__', '__path__']
>>> test.__file__
'/usr/lib/python2.5/test/__init__.pyc'
because there's apparently a module named "test" in the standard
distribu
On Oct 25, 1:32 pm, Tim Chase wrote:
> > If I just input dir(test) I don't get "a" in my list.
>
> import test
> dir(test)
> > ['__builtins__', '__doc__', '__file__', '__name__', '__package__',
> > '__path__']
>
> > I am using python 2.6
>
> > Am I doing anything wrong?
>
> Are you impor
If I just input dir(test) I don't get "a" in my list.
import test
dir(test)
['__builtins__', '__doc__', '__file__', '__name__', '__package__',
'__path__']
I am using python 2.6
Am I doing anything wrong?
Are you importing the module you think you are?
t...@rubbish:~/tmp$ echo "a=42" > tes
On Oct 25, 12:01 pm, Tim Chase wrote:
> > Say that a have:
>
> > # file test.py
> > a=7
>
> > At the prompt:
> > import test
> > dir()
>
> > I would like to see the variables created in the test namespace.
> > However, variable "a" does not appear in the list, only "test". Since
> > I know that va
vsoler wrote:
Say that a have:
# file test.py
a=7
At the prompt:
import test
dir()
I would like to see the variables created in the test namespace.
However, variable "a" does not appear in the list, only "test". Since
I know that var "a" is reachable from the prompt by means of test.a,
how ca
vsoler writes:
> At the prompt:
> import test
> dir()
>
> I would like to see the variables created in the test namespace.
> However, variable "a" does not appear in the list, only "test". Since
> I know that var "a" is reachable from the prompt by means of test.a,
> how can I list this sort of v
Say that a have:
# file test.py
a=7
At the prompt:
import test
dir()
I would like to see the variables created in the test namespace.
However, variable "a" does not appear in the list, only "test". Since
I know that var "a" is reachable from the prompt by means of test.a,
how can I list this s