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:enter image description here

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

Popular posts from this blog

authentication - Mongodb revoke acccess to connect test database -

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -

r - Update two sets of radiobuttons reactively - shiny -