Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 12-28-2004, 10:57 AM   #1
Registered: Dec 2004
Distribution: Fedora
Posts: 88

Rep: Reputation: 15
Import sys ?bash: import: command not found

why i cant import sys or import Pmw ?? (i plan to use Pyshaper which need the Pmw)..It come out a message :
bash: import: command not found
how can i import?? i m newbie in linux..plz guide me..thanks.
Old 12-28-2004, 11:03 AM   #2
Registered: Jul 2004
Location: Austin, Texas!
Distribution: Gentoo
Posts: 121

Rep: Reputation: 15
Sorry, this is not meant to be mean, but can you be a bit clearer?

If I understand you right, you want to run a python command, import sys or import Pmw. You can only run python apps that are already typed up inside of a file from the bash prompt. To just run lines of code, type 'python' , then start typing.

Correct me if i'm wrong.

Old 12-28-2004, 11:30 AM   #3
Registered: Dec 2004
Distribution: Fedora
Posts: 88

Original Poster
Rep: Reputation: 15
actually i am following this website instruction to create and configure megawidgets >><<

But i cant do the import Pmw even thought i had download and install it.

By the way , i have another Question regarding Pyshaper.
When i type : pyshaper start
it came out the message:

Traceback (most recent call last):
File "/usr/bin/pyshaper", line 858, in ?
class myMenu(Menu):
NameError: name 'Menu' is not defined
pyshaper detached into background as daemon with pid 3828
pyshaper: version 0.1.3 now running on 30 second cycle...

What is this means? i am newbie in Linux , so hope u all wont mind to solve such a silly Question. Thanks in advance...
Old 12-28-2004, 01:04 PM   #4
LQ Newbie
Registered: Aug 2004
Location: USA
Distribution: Knoppix 3.4
Posts: 7

Rep: Reputation: 0
Well, I'm new to linux too but I can tell you what that traceback means. You're trying to subclass Menu, a class which has apparently not been defined elsewhere. If Menu is supposed to be in a module you are importing, you must either use module_name.Menu or when you import the module, simply call from module_name import *.

Also, I think the other question you had has something to do with the fact that you can't run python code straight from a bash prompt. You must first start the python interpreter with the command 'python'. If you have a prompt that looks like '$' you're in bash, if you have a prompt like '>>>' you're in python. You can't mix the two interpreters.

Hope that helped!

Old 12-28-2004, 11:33 PM   #5
Registered: Dec 2004
Distribution: Fedora
Posts: 88

Original Poster
Rep: Reputation: 15
i still not very clear with the explaination, hope someone can give me a more simple explaination and solution.

Thanks thanks thanks.


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
import - Command Not Found bpellet314 Linux - Software 1 11-17-2004 11:22 AM
Creating CVS repository: cvs [import aborted]: attempt to import the repository enemorales Linux - Software 3 10-15-2004 05:30 PM
import command doralsoral Linux - Software 1 05-16-2004 02:58 AM
Import Bookmarks raysr Linux - Newbie 3 03-13-2004 04:27 PM
grab - Simply a useless bash script to take a screen shot; Required command: import micxz Programming 2 10-08-2003 08:59 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:19 PM.

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