When I am running the script from the command line, its working fine but when I am trying to run from Pythonwin, its giving me error.
 
Can anyone explain the reason?
 
Regards,
Asrarahmed

 
On 11/5/06, Kent Johnson <[EMAIL PROTECTED]> wrote:
Dustin J. Mitchell wrote:
> Asrarahmed Kadri wrote:
>> "C:\Python24\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py",
>> line 310, in RunScript
>>     exec codeObject in __main__.__dict__
>>   File "C:\project stuff-programs\Scriptdate.py", line 18, in ?
>>     t1 = my_version_datecheck.dateCheck(dt1,0)
>>   File "my_version_datecheck.py", line 38, in dateCheck
>>     import traceback
>> NameError: global name 'traceback' is not defined
>
> This tells you everything you need to know right here.
>
> What version of Python are you using?  I know traceback existed at least in
> 2.3.  Might be time to consider an upgrade.

If traceback was not a valid module name the import would raise
ImportError, not NameError.

Something strange is going on here; have you shown us all the code?

Kent

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor



--
To HIM you shall return.
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to