problem with execfile
Berthold Hoellmann
hoel at GermanLloyd.org
Tue Aug 31 10:32:00 EDT 1999
Hello,
I have a problem with execfile:
python
Python 1.5.2 (#2, Jul 7 1999, 09:18:40) [C] on sunos5
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> def x():
... execfile("ZustandsDaten.dat")
... print dir()
... print Tiefgang
...
>>> x()
['Pitch', 'Tiefgang', 'U', '__doc__', 'array', 'n']
Traceback (innermost last):
File "<stdin>", line 1, in ?
File "<stdin>", line 4, in x
NameError: Tiefgang
>>>
Why is Tiefgang unknown in the function x?
Greetings
Berthold
--
email: hoel at GermanLloyd.org
)
(
C[_] These opinions might be mine, but never those of my employer.
More information about the Python-list
mailing list