Error in importing a file in Python 3.3.6 -
i trying learn stackless python , got latest 3.3.6. created try.py file , wrote content
print " hello world" print " evening"
then in python command prompt, gave command
import try.py
it gave error , syntax error: invalid syntax shown in figure below:
what's wrong here? have placed file in c:\python33.
this happening because try
reserved keyword in python. try again after renaming file else.
also, during importing, specifying extension of python file wrong.
instead of import mymodule.py
, should write import mymodule
.
Comments
Post a Comment