LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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
 
LinkBack Search this Thread
Old 12-28-2004, 09:57 AM   #1
joirnange
Member
 
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, 10:03 AM   #2
linuxgeekery
Member
 
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.

linuxgeekery
 
Old 12-28-2004, 10:30 AM   #3
joirnange
Member
 
Registered: Dec 2004
Distribution: Fedora
Posts: 88

Original Poster
Rep: Reputation: 15
actually i am following this website instruction to create and configure megawidgets >>http://pmw.sourceforge.net/doc/howtouse.html<<

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, 12:04 PM   #4
rtwatts07
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!

--rtwatts07
 
Old 12-28-2004, 10:33 PM   #5
joirnange
Member
 
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.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
import - Command Not Found bpellet314 Linux - Software 1 11-17-2004 10:22 AM
Creating CVS repository: cvs [import aborted]: attempt to import the repository enemorales Linux - Software 3 10-15-2004 04:30 PM
import command doralsoral Linux - Software 1 05-16-2004 01:58 AM
Import Bookmarks raysr Linux - Newbie 3 03-13-2004 03:27 PM
grab - Simply a useless bash script to take a screen shot; Required command: import micxz Programming 2 10-08-2003 07:59 PM


All times are GMT -5. The time now is 08:55 AM.

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