Re: [Tutor] subprocess and su

2007-08-22 Thread Michael Meier
> how I thought that it was supposed to work was it would allow me to use > sbp.communicate() to > send stuff to the stdin, and get information out. What do get is a prompt > ask for my password. I believe that su does not read its input from stdin but from its controlling tty. So you'd have to o

Re: [Tutor] urllib2 and cookies

2007-10-25 Thread Michael Meier
Hi ASPN has a very verbose example of cookielib usage at http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/302930 Many things are very OS, especially Windows, specific. You can surely phase out the relevant parts :) Probably the solution with cookielib is the easiest way to go. Cookielib is

Re: [Tutor] IDLE Crashing

2006-08-05 Thread Michael Meier
perience the same problem as I? Is there a common solution to Adams and my problems? Thanks, Michael Meier P.S. I'm new to this list... I think its a very interesting and friendly place to be :) ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] Lamdas and locality

2007-03-03 Thread Michael Meier
Hello I ran the following code in python: >>> ls = [(lambda op: op + i) for i in [1,2,3]] >>> ls [ at 0xb7de4cdc>, at 0xb7de4d14>, at 0xb7de4d4c>] >>> for l in ls: ... print l(5) ... 8 8 8 >>> I am quite surprised of the result. I'm generating three lamdas. What I want to do is that

Re: [Tutor] Lamdas and locality

2007-03-04 Thread Michael Meier
Thanks for your answer and your workaround! There's always something to learn about lambdas and variable scope in Python ;) I'm sorry I didn't delete the quoted Tutor Digest part, it was a stupid mistake :( cheers, Michael ___ Tutor maillist - Tutor