[ale] Need help with a Python Script
Chuck Payne
terrorpup at gmail.com
Thu Nov 17 22:56:52 EST 2011
Richard,
Sorry, I not the quick on terms. I am assuming RERL meas
Read–eval–print_loop. What you are stating is good, but the problem is, I
am stuck that is why I am asking for help. I am so gun shy about asking for
help, because the standard response is usually RTFM. I gave up learning
Perl because I could never get help.
I will try what you have recommend.
Chuck
---------- Forwarded message ----------
From: Richard Bronosky <Richard at bronosky.com>
Date: Thu, Nov 17, 2011 at 10:29 PM
Subject: Re: [ale] Need help with a Python Script
To: Atlanta Linux Enthusiasts <ale at ale.org>
Chuck,
You really need to experiment at the REPL. That is the main reason for
choosing a scripting language like python. I suggest installing
ipython (or bpython) so that you get tab completion. The you would do
this:
$ ipython
Python 2.4.3 (#1, Nov 11 2010, 13:30:19)
Type "copyright", "credits" or "license" for more information.
IPython 0.8.4 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object'. ?object also works, ?? prints more.
In [1]: import os
In [2]: os.get
os.getcwd os.getegid os.geteuid os.getgroups
os.getlogin os.getpgrp os.getppid os.getuid
os.getcwdu os.getenv os.getgid os.getloadavg os.getpgid
os.getpid os.getsid
In [2]: os.gete
os.getegid os.getenv os.geteuid
In [2]: os.getenv('HOSTNAME')
Out[2]: 'vm1.example.com'
However, os.getenv can only get was is available as environment
variables. You can check those at the terminal with the env command.
On Thu, Nov 17, 2011 at 10:23 PM, Stephen Haywood
<stephen at averagesecurityguy.info> wrote:
> What version of Python are you using?
>
>
> --
> Stephen Haywood
> Information Security Consultant
> CISSP, GPEN, OSCP
> T: @averagesecguy
> W: averagesecurityguy.info
>
>
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo
>
>
--
.!# RichardBronosky #!.
_______________________________________________
Ale mailing list
Ale at ale.org
http://mail.ale.org/mailman/listinfo/ale
See JOBS, ANNOUNCE and SCHOOLS lists at
http://mail.ale.org/mailman/listinfo
--
(678) 636-9678
-----------------------------------------
Discover it! Enjoy it! Share it! openSUSE Linux.
-----------------------------------------
openSUSE -- en.opensuse.org/User:Terrorpup
openSUSE Ambassador/openSUSE Member
skype,twiiter,identica,friendfeed -- terrorpup
freenode(irc) --terrorpup/lupinstein
Register Linux Userid: 155363
Have you tried SUSE Studio? Need to create a Live CD, an app you want to
package and distribute , or create your own linux distro. Give SUSE Studio
a try. www.susestudio.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.ale.org/pipermail/ale/attachments/20111117/3f97aae7/attachment-0001.html
More information about the Ale
mailing list