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

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -