LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-11-2003, 11:46 AM   #1
cpv204
Member
 
Registered: Mar 2003
Location: Tribeca, NYC
Distribution: Slackware 9.0, Fedora Core 1
Posts: 111

Rep: Reputation: 15
shell script help


Hi, I need some help deciphering what the first line of the following code does:
Code:
PYGNOME=`python -c "from gnome.ui import *" 2>&1`
PYGNOMEEXISTS=`echo $PYGNOME|grep -i "no module"`
if test "$PYGNOMEEXISTS" != ""
then
    echo failed: get it from ftp://ftp.gnome.org/pub/GNOME/stable/latest/sources/
    exit 1
else
    echo yes
fi
I understand everything but the first line, just included the rest to give you some context. I even understand that the first line is setting the variable PYGNOME to the result of running some python script, but there are a lot of things going on in between the ` ` and I don't understand it fully.

The reason I need help on this is that it comes from the ./configure script for eroaster, which I'm trying to install. eroaster requires gnome-python to be installed. I have installed gnome-python over and over again, but whatever I'm doing doesn't satisfy this piece of code in the eroaster ./configure script.

I'm hoping that by understanding what this script is looking for I can troubleshoot why it isn't recognizing that gnome-python is installed. Thanks!
 
Old 06-11-2003, 01:39 PM   #2
gquiring
LQ Newbie
 
Registered: May 2003
Location: Matawan, NJ
Distribution: Red Hat, Solaris
Posts: 20

Rep: Reputation: 0
Run this from the command line and let's see the output:

python -c "from gnome.ui import *"
 
Old 06-11-2003, 01:43 PM   #3
cpv204
Member
 
Registered: Mar 2003
Location: Tribeca, NYC
Distribution: Slackware 9.0, Fedora Core 1
Posts: 111

Original Poster
Rep: Reputation: 15
Yeah, I suppose that's one way to inch forward . I'll have to do this tonight, though.

One thing I know is that if gnome.ui is a file, it doesn't exist on my system. I've done a find / -name gnome.ui and it comes up empty.

Last edited by cpv204; 06-11-2003 at 01:45 PM.
 
Old 06-11-2003, 01:48 PM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
install pygnome then
 
Old 06-11-2003, 02:05 PM   #5
cpv204
Member
 
Registered: Mar 2003
Location: Tribeca, NYC
Distribution: Slackware 9.0, Fedora Core 1
Posts: 111

Original Poster
Rep: Reputation: 15
Chris, I know you mean business so I will on your say-so...but...

The output on the screen while the script is running just before this error comes up says "checking for gnome-python........."

Then the error says "failed: get it..." etc. etc., so I went and ftp'd the gnome-python package.

What's the diff between gnome-python and pygnome and how am I, a worthless user, supposed to know that when the error message says get gnome-python that I should really be getting pygnome?
 
Old 06-11-2003, 03:30 PM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
well the file it's actually looking for isn't gnome.ui, it's actually gnome/ui.py that's just the way python represents it. mine is here:

/usr/lib/python2.2/site-packages/gtk-1.2/gnome/ui.py

ideally the command should return nothing at all (change the original command to a blatantly incorrect module - i heartily recommend gnomebum.ui )

pygnome IS gnome-python, sorry if i mislead you.
 
Old 06-11-2003, 10:57 PM   #7
cpv204
Member
 
Registered: Mar 2003
Location: Tribeca, NYC
Distribution: Slackware 9.0, Fedora Core 1
Posts: 111

Original Poster
Rep: Reputation: 15
harrumph!

I uninstalled gnome-python, then python.

Then reinstalled python, then gnome-python. I searched for ui.py and found it in /usr/local/lib/python2.2/site-packages/gtk-1.2/gnome/ while Chris's was in /usr/lib/python2.2/.../gnome

So, I copied the contents of the /usr/local/lib/.../gnome directory over to /usr/lib/.../gnome. With this, eroaster-2.0.12 was able to configure and install.

I do have a run-time error with eroaster, but I guess I'll start another thread since this thread really concerns the deciphering of that python command.

Last edited by cpv204; 06-11-2003 at 11:16 PM.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Shell script inside shell script treotan Linux - General 4 02-19-2009 06:34 AM
Shell Scripting: Getting a pid and killing it via a shell script topcat Programming 15 10-28-2007 02:14 AM
shell script problem, want to use shell script auto update IP~! singying304 Programming 4 11-29-2005 05:32 PM
Directory listing - Calling shell script from a CGI script seran Programming 6 08-11-2005 11:08 PM
[SHELL SCRIPT] Write at the right of the shell window Creak Linux - General 2 04-02-2004 03:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration