N
N
Nastya Meow2015-12-09 13:59:07
Python
Nastya Meow, 2015-12-09 13:59:07

How to properly import a module in python 3.5?

studying python and according to Lutz's book I try to import
the themiy.py module, I
2edd369db2d94a7e99705b625d8352ff.png
launch cmd, I enter python into cmd, 3 standard lines appear and an invitation to enter commands ">>>".
then I enter import themiy.py (or import themiy) to which an error appears:
64c4c50769a647bfbf67ca18911fdfce.png
please tell me

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Duha666, 2015-12-09
@miymiy

Your themiy.py is written incorrectly, which is what Python says when you import it.
More specifically, it should say something like this:

a = 'miy'
b = 'mua'
c = 'biy'
print(a, b, c)

S
s0ci0pat, 2015-12-09
@s0ci0pat

themiy.py should be in c:/users/batman
Or first, on the command line, go to the directory where it is, and then run Python

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question