Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Importing a module
#21
(Nov-08-2016, 11:23 AM)SrirachaSauceLover Wrote: I remade the module in a text editor and then again in the IDLE editor. Everything works now
IDLE always start in interactive shell,
to make a file as without >>> as i posted before in IDLE file --> New fileĀ 
and save it as something.py(to get color and auto indent to work).
Reply
#22
Hey! There's an easy solution, the way I got it to work was instead of making the module perform inside a IDLE environment, I opened up sublime text(a program similar to notepad++), and I essentially wrote the code inside of there and saved it as a python file called "Chaos.py" inside of the folder where IDLE runs, which is :

(C:\Users\ngltm\AppData\Local\Programs\Python\Python36-32\) )

, the name next after the "Users" will be different for you, but I saved it inside of the Python36-32 file and after saving it inside of sublime text, I opened up a IDLE program and wrote "import Chaos" and it worked! The problem was the text in the beginning of every IDLE file that starts off with :

"Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 16:07:46) [MSC v.1900 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information."

Well, I hope this helped!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  importing variables from module 8376459 1 269 Feb-18-2024, 02:24 PM
Last Post: deanhystad
  no module named 'docx' when importing docx MaartenRo 1 841 Dec-31-2023, 11:21 AM
Last Post: deanhystad
  My code displays too much output when importing class from a module lil_e 4 1,151 Oct-22-2022, 12:56 AM
Last Post: Larz60+
  Importing module in jupyter Noteboook ajitnayak1987 0 1,738 Jun-04-2021, 12:26 PM
Last Post: ajitnayak1987
  ERROR: importing desired module mbgamer28 0 1,673 Apr-05-2021, 07:46 PM
Last Post: mbgamer28
  importing module - not working jdhamblett 3 3,000 Jun-22-2020, 07:33 PM
Last Post: jdhamblett
  importing same python library in multiple custom module escape_freedom13 6 3,791 May-10-2020, 07:01 PM
Last Post: escape_freedom13
  Importing module from a package results in import error goghvv 2 2,380 Mar-27-2020, 07:13 PM
Last Post: goghvv
  Please help: problem installing/importing langdetect module in Jupyter Notebook ledgreve 3 7,264 Dec-30-2019, 08:17 AM
Last Post: LeanbridgeTech
  Problem with importing and using collections module pythomdummy 3 5,792 Nov-14-2019, 08:48 AM
Last Post: Gribouillis

Forum Jump:

User Panel Messages

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