import - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: import (/thread-5932.html) |
import - belikewater - Oct-29-2017 Hello Team, I am trying to import a program into my terminal to run. I am currently working through a few courses on Python. I have been using sublime text editor to write the code, but I want to import them in to run. I am using ubuntu 16.04. I saved the programs on my desktop. I have tried using import testing123, but the output is no module named testing123. I have read through some documentation, but I am not seeing how to resolve this. I even tried saving the program in etc/python2.7 (i have used python 2.7 and Python 3.5). Can someone please point me in the right direction? Thanks RE: import - Larz60+ - Oct-29-2017 you need an __init__.py file which lists all modules./ see: http://mikegrouchy.com/blog/2012/05/be-pythonic-__init__py.html |