Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3273098
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T18:53:47+00:00 2026-05-17T18:53:47+00:00

I am very new to python, about one month, and am trying to figure

  • 0

I am very new to python, about one month, and am trying to figure out how the importing works in python. I was told that I can import any ‘module’ that has Python code in it. So I am trying to import a module just to try it out, but I keep getting an ‘ImportError: No module named redue’. This is an example of the python shell:

>>> import os
>>> os.chdir('C:\Users\Cube\Documents\Python')
>>> for file in os.listdir(os.getcwd()):
     print file
pronounce.py
pronounce.pyc
readwrite.py
rectangle.py
reduc.py

>>> import reduc

Traceback (most recent call last):
   File "<pyshell#32>", line 1, in <module>
    import reduc
ImportError: No module named reduc

What am I doing wrong? I am I overlooking something, or was I just wrongly informed?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T18:53:47+00:00Added an answer on May 17, 2026 at 6:53 pm

    These files are not on sys.path. It should have been though.

    If you want to access them from the interpreter, you will need to add the location to sys.path

    >>> import sys
    >>> print sys.path
    >>> sys.path.append('C:\\Users\\Cube\\Documents\\Python')
    >>> import reduc
    

    You could also include the path in environment variable – PYTHONPATH

    See the details on module search path here :

    • http://docs.python.org/tutorial/modules.html#the-module-search-path
    • http://docs.python.org/library/sys.html#sys.path

    Also look at (PYTHONPATH) environment variable details here:

    • http://docs.python.org/using/cmdline.html#environment-variables
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to Python and have what is probably a very basic question about
I'm trying to set up a very simple UDP socket server with python that
I'm relatively new to the Python world, but this seems very straight forward. Google
I'm VERY new to WPF, and still trying to wrap my head around binding
I am very new to grails.I am doing one sample project for image uploading
I'm completely new to Python and while trying various random bits and pieces I've
So, one commonly heard comment when talking about performance is that you write your
I'm trying to validate a few python arguments. Until we get the new static
Coming to Python from Java, I've been told that factories are not Pythonic. Thus,
Im very new to SQL but need to write a query to do the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.