Re: [BangPypers] automate logging

2008-07-23 Thread Pythonic
leo davis wrote: > > Hello, > I'm trying to write a code to automate logging into a website.I have > chosen the forum 'www.tek-tips.com' as an example and tried this > script on itBut it doesnt seem to work...What am i missing > here..plz help > > > > > > import urllib2 > > theurl = 'www.te

Re: [BangPypers] hi everybody

2008-06-16 Thread Pythonic
Nirakar Sethy wrote: > > hi all. > i'm new to python. On windows we do have a GUI (like a notepad) In > which we can script. How to get that on Linux (Fedora 8) > > Thanks > Nirakar Sethy > Digital Artist You will certainly find one or more text editors in accessories. Else on prompt type gedit, it

Re: [BangPypers] Redirecting output to a string

2008-03-19 Thread Pythonic
You may want to try commands module import commands cmd = 'ls' status, output = commands.getstatusoutput(cmd) print output Pavithra Hanchagaiah wrote: Hey Kartheek,   execv() doesn’t return any value. You can either try using os.popen() variants for the requirement or redir

Re: [BangPypers] BangPypers Digest, Vol 6, Issue 8

2008-02-18 Thread Pythonic
Siddharta wrote: > Pythonic wrote: > >> * 2. Best solution (Pythonic)* >> >> >> >>>>> import itertools >>>>> c = itertools.count(9) >>>>> c.next() >>>>> >>>>>

Re: [BangPypers] BangPypers Digest, Vol 6, Issue 8

2008-02-18 Thread Pythonic
gt;>> def mIncrementer(): ... global m ... m += 1 ... return m >>> mIncrementer() 1 >>> mIncrementer() 2 * 2. Best solution (Pythonic)* >>> import itertools >>> c = itertools.count(9) >>> c.next() 9 >>> c.next() 10