LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 09-30-2005, 10:26 AM   #1
Joe Soap
Member
 
Registered: Sep 2001
Location: Switzerland
Distribution: Debian, Sidux
Posts: 212

Rep: Reputation: 30
Question Python: Idle: ImportError: cannot import name sleep


G'day Folks,


I am running 2.6.11-Kanotix-11 and am experiencing a pretty weird error (to me...) with Python and Idle.

When I start Idle from my home directory it starts without any problem, however when I try to start it from ~/python I get the following output:

---------------------
e-dua@EGLOBE:~/python$ idle
23:59:30
22:59:30
0
22:59:35
0
1
1
1
Traceback (most recent call last):
File "<string>", line 1, in ?
File "/usr/lib/python2.3/idlelib/run.py", line 7, in ?
import threading
File "/usr/lib/python2.3/threading.py", line 12, in ?
from time import time as _time, sleep as _sleep
ImportError: cannot import name sleep
-----------------------
My python version 2.3.5. Idle version is 1.0.5.

Any ideas why this happens? What can I do to fix it?

All help appreciated.

Thanks,
Joe
 
Old 10-01-2005, 01:52 AM   #2
Joe Soap
Member
 
Registered: Sep 2001
Location: Switzerland
Distribution: Debian, Sidux
Posts: 212

Original Poster
Rep: Reputation: 30
Found the answer.

I had a file time.py in my ~/python directory. I renamed it to time0.py and everything works again.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
gDesklets: ImportError: could not import bonobo.ui Frankk Linux - Software 9 04-10-2005 05:30 PM
ImportError: cannot import name ext rose_bud4201 Linux - Software 5 02-24-2005 02:05 PM
python ImportError diabolo Programming 3 10-23-2004 10:04 AM
Python Idle apocolpse Programming 2 10-18-2004 04:16 AM
python 2.3 and idle jimscafe Linux - Software 1 10-25-2003 06:01 PM


All times are GMT -5. The time now is 08:40 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration