I hard to say when you don't tell what you do.
Here is a test you can do:
Now i can import it:
So you see there is no magic,if you place a python file in a folder of
If i download graphics.py and just place it same place
Here is a test you can do:
1 2 |
# bar.py print ( 'Hello world' ) |
bar.py
just place in my C:\python36
folder.Now i can import it:
1 2 3 4 5 6 7 8 9 |
Microsoft Windows [Version 10.0 . 14393 ] (c) 2016 Microsoft Corporation. Med enerett. C:\Windows\System32>cd\ C:\>python Python 3.6 . 0 (v3. 6.0 : 41df79263a11 , Dec 23 2016 , 07 : 18 : 10 ) [MSC v. 1900 32 bit (Intel)] on win32 Type "help" , "copyright" , "credits" or "license" for more information. >>> import bar Hello world >>> |
sys.path
list you can import it.If i download graphics.py and just place it same place
bar.py
it work.1 2 3 4 5 6 |
C:\>python Python 3.6 . 0 (v3. 6.0 : 41df79263a11 , Dec 23 2016 , 07 : 18 : 10 ) [MSC v. 1900 32 bit (Intel)] on win32 Type "help" , "copyright" , "credits" or "license" for more information. >>> from graphics import * >>> GraphWin.tk_bisque <function Misc.tk_bisque at 0x018DA9C0 > |