[gentoo-user] Adding output of 'uptime' to python sig

2004-02-15 Thread Trey Sizemore
I have a python script that I use currently in my sig and wanted to add
a line to show the output of the 'uptime' command.

Would someone be able to tell me how to do this?  Such as add it as a
line under the current sig?  Here's the script I'm using:

 #!/usr/bin/python

# change this to point to your file of quotes
aff_file = /home/trey/quotes.txt

import string, random

# hack this at will
print -- br
print Cheers,br
print Treybr
print ---br
print br

# cryptic python stuff which pulls a line from a text file
# at random
affs = open(aff_file,r)
affs = affs.readlines()
aff = affs[int(random.random() * len(affs))].split(\n)[0]

# print the randomly selected line
print aff
-- 
Cheers,
Trey
---

Adversity is the trial of principle.
Without it, a man hardly knows whether he is honest or not.
--Henry Fielding


--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] Adding output of 'uptime' to python sig

2004-02-15 Thread Trey Sizemore
On Sun, 2004-02-15 at 11:35, David Mallwitz wrote:
 Change your import line to read:
 
   import string, random, os
 
 add this to read your uptime:
 
   uptime=string.strip(os.popen(/usr/bin/uptime).readline())
 
 add this to wherever you want it printed:
   
   print uptime
 
 
 Dave

Thanks, Dave.  One last item if you have the patience.  What would I
need to add the output of 'uname -a'?

Thanks again.

-- 
Cheers,
Trey
---

In answer to the question of why it happened,
I offer the modest proposal that our Universe is simply
one of those things which happen from time to time.
--Edward P. Tryon 

11:58am up 3:21, 1 user, load average: 0.93, 0.51, 0.59


--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] Adding output of 'uptime' to python sig

2004-02-15 Thread Trey Sizemore
On Sun, 2004-02-15 at 17:44, David Mallwitz wrote:

 uname=string.strip(os.popen(/bin/uname -a).readline())
 
 print uname
 
Thanks for your help.
-- 
Cheers,
Trey
---

The beauty of the soul shines out when a man bears with
composure one heavy mischance after another, not because he
does not feel them, but because he is a man of high and heroic temper.
- Aristotle 

8:02pm up 11:25, 1 user, load average: 0.46, 0.53, 0.34 
Linux linux 2.4.21-144-default #1 Fri Nov 14 00:01:36 UTC 2003 i686 i686
i386 GNU/Linux


--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] /etc/make.profile is not a symlink error message

2003-11-04 Thread Trey Sizemore
On Tue, 4 Nov 2003 10:56:12 +, Mike Williams [EMAIL PROTECTED]
said:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 On Tuesday 04 November 2003 03:10, Trey Sizemore wrote:
  I am getting the following error when I run emerge:
 
  '/etc/make.profile is not a symlink and will probably prevent most
  merges!!!  It should point into a profile within /usr/portage/profiles/'
 
  I read an FAQ section in the gentoo user guide and issued the following
  command:
 
  ln -s /usr/portage/profiles/default-x86-1.4/ /etc/make.profile
 
  but it doesn't appear as though a link was make and I still get the same
  error.
 
  How did I mess up the command in linking these and how do I do it
  correctly.
 
  Thanks and looking forward to updating!
 
 If /etc/make.profile really is a file (ls -lh /etc/make.profile), then
 delete 
 it (rm /etc/make.profile) and redo the symlink.
 
 - -- 
 Mike Williams

Here is the output:

[EMAIL PROTECTED] trey $ ls -lh /etc/make.profile/
total 21K
lrwxrwxrwx1 root root   38 Nov  3 09:49 default-x86-1.4
- /usr/portage/profiles/default-x86-1.4/
-rw-r--r--1 root root  789 Jul 16 09:52 make.defaults
-rw-r--r--1 root root 3.5K Jul 25 21:43 packages
-rw-r--r--1 root root  485 Oct 16  2002 packages.build
-rw-r--r--1 root root 1.2K Jul 20 10:11 use.defaults
-rw-r--r--1 root root 1.6K Jul 27 10:23 virtuals

It  looks as though the directory is symlinked correctly, but I still get
the message.  Should I still delete the directory and all files in it,
then recreate a directory called /etc/make.profile symlinked to
/usr/portage/profiles/default-x86-1.4/?

Thanks,

Trey
-- 
  Trey Sizemore
  [EMAIL PROTECTED]

--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] /etc/make.profile is not a symlink error message

2003-11-04 Thread Trey Sizemore
On Tue, 2003-11-04 at 07:24, Mike Williams wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 On Tuesday 04 November 2003 12:10, Trey Sizemore wrote:
 
  Here is the output:
  
  [EMAIL PROTECTED] trey $ ls -lh /etc/make.profile/
  total 21K
  lrwxrwxrwx1 root root   38 Nov  3 09:49 default-x86-1.4
  - /usr/portage/profiles/default-x86-1.4/
 
  It  looks as though the directory is symlinked correctly, but I still get
  the message.  Should I still delete the directory and all files in it,
  then recreate a directory called /etc/make.profile symlinked to
  /usr/portage/profiles/default-x86-1.4/?
 
 Nope, it's not. /etc/make.profile/default-x86-1.4 is a symlink.
 Drop the trailling / (ls -lh /etc/make.profile -- no final slash), if you 
 still get a listing of files it's is a directory.
 I can't remember, but doubt, if you were to rm -rf /etc/make.profile it would 
 follow the symlink down and delete a small part of /usr/portage/profiles/, so 
 I'd still
 rm /etc/make.profile/default-x86-1.4
 rm -rf /etc/make.profile
 ln -s /usr/portage/profiles/default-x86-1.4 /etc/make.profile
 
 - -- 
 Mike Williams
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.2.3 (GNU/Linux)
 
 iD8DBQE/p5p/InuLMrk7bIwRAuA5AKCsJjUxFLyKb9re7kDp/d7rkUhYxACgg/bj
 mRWgXDbfXcZihjMSNPJjCgs=
 =XFnX
 -END PGP SIGNATURE-
 

That did it...thanks Mike!

-- 
Cheers,
Trey
---

Thieves respect property;
they merely wish the property to become their property
that they may more perfectly respect it.
-- G.K. Chesterton, The Man Who Was Thursday


signature.asc
Description: This is a digitally signed message part


[gentoo-user] /etc/make.profile is not a symlink error message

2003-11-03 Thread Trey Sizemore
I am getting the following error when I run emerge:

'/etc/make.profile is not a symlink and will probably prevent most
merges!!!  It should point into a profile within /usr/portage/profiles/'

I read an FAQ section in the gentoo user guide and issued the following
command:

ln -s /usr/portage/profiles/default-x86-1.4/ /etc/make.profile 

but it doesn't appear as though a link was make and I still get the same
error.

How did I mess up the command in linking these and how do I do it
correctly.

Thanks and looking forward to updating!

-- 
Cheers,
Trey
---

The beauty of the soul shines out when a man bears with
composure one heavy mischance after another, not because he
does not feel them, but because he is a man of high and heroic temper.
- Aristotle


signature.asc
Description: This is a digitally signed message part


[gentoo-user] IP address of a DNS

2003-09-12 Thread Trey Sizemore
I need help finding the IP address of a DNS.

Thanks.

-- 
Cheers,
Trey
---

The beauty of the soul shines out when a man bears with
composure one heavy mischance after another, not because he
does not feel them, but because he is a man of high and heroic temper.
- Aristotle


--
[EMAIL PROTECTED] mailing list



[gentoo-user] Getting Mozilla to appear as IE6

2003-05-31 Thread Trey Sizemore
How do I get my Mozilla 1.4b browser to appear as IE6 on Windows XP when
I visit sites?  Long story short is I'm trying out a language site and
have the plug-in I need, but I think the Moz browser is throwing it off.

Thanks,

Trey


signature.asc
Description: This is a digitally signed message part


[gentoo-user] Realistic Install timeframe

2003-03-21 Thread Trey Sizemore
I was thinking of installing Gentoo on my maching starting this 
afternoon.  My machine in a PII400 with 512M RAM, ATI All-inWonder 128 
video, CD-RW, 48X CD, Iiyama 450.  Would it be realistic if I started 
install (my first Gentoo install - currently dual-booting WinXP and 
Libranet 2.7) at stage 1 this afternoon, that I could have a functioning 
(KDE, email, browser) up and running by tomorrow sometime?  If so, I'll 
probably give it a try.

Thanks.

--
[EMAIL PROTECTED] mailing list