Python Forum
Thread Rating:
  • 3 Vote(s) - 3.33 Average
  • 1
  • 2
  • 3
  • 4
  • 5
import
#1


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
Reply
#2
you need an __init__.py file which lists all modules./
see: http://mikegrouchy.com/blog/2012/05/be-p...t__py.html
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020