Re: tutorial

2005-06-03 Thread Sandman
I'm a beginner as well, and I liked this one: http://docs.python.org/tut/tut.html But I ended up buying the "Learning Python" book anyway. -- http://mail.python.org/mailman/listinfo/python-list

looking up dictionaries by values

2005-03-10 Thread Sandman
Hi there, I'm still a bit new to Python, and had a question. I have a dictionary that looks like: PWD = \ { "root": 0, "joe": 200, "susan": 201, .. } In other words, the values are unique as well as the keys. I've run into a situation where I need to lookup the item by val

Re: running a shell command from a python program

2005-02-23 Thread Sandman
Doh, use the search Luke: http://www.wellho.net/forum/Programming-in-Python-and-Ruby/Running-shell-commands-from-Python.html Seems like popen is the way to go. S -- http://mail.python.org/mailman/listinfo/python-list

running a shell command from a python program

2005-02-23 Thread Sandman
Hi, I'm a newbie, so please be gentle :-) How would I run a shell command in Python? Here is what I want to do: I want to run a shell command that outputs some stuff, save it into a list and do stuff with the contents of that list. I started with a BASH script actually, until I realized I rea