Dr. Dobb's Python-URL! - weekly Python news and links (Aug 30)

2005-08-30 Thread \"\" Diez B.Roggisch \"\"
QOTW: "If I wanted to write five lines instead of one everywhere in a Python program, I'd use Java." -- Paul Rubin http://groups.google.com/group/comp.lang.python/msg/6fac4f3022acd1fa?hl=de&; "i think less buggy code is not the main concern for all." -- km http://groups.google.com/group/co

Dr. Dobb's Python-URL! - weekly Python news and links (Aug 30)

2005-08-30 Thread \"\" Diez B.Roggisch \"\"
QOTW: "If I wanted to write five lines instead of one everywhere in a Python program, I'd use Java." -- Paul Rubin http://groups.google.com/group/comp.lang.python/msg/6fac4f3022acd1fa?hl=de&; "i think less buggy code is not the main concern for all." -- km http://groups.google.com/group/co

Re: Some newbie cgi form questions...

2005-08-07 Thread Diez B.Roggisch
> Traceback (most recent call last): > File "/var/www/users/senta/html/gobooks/cgi/form.py", line 35, in ? > if not form.keys()[key]: > TypeError: list indices must be integers > > As you can see, I am using python 2.3 (my web service provider is > responsible for this - I'd use 2.4.1 if I

Re: Some newbie cgi form questions...

2005-08-07 Thread Diez B.Roggisch
> The second for loop is an attempt at trying to print all the values > that were entered on the for without presenting the hidden values. I'd > really like to do this, but I can't seem to figure out how to make a > special case for hidden form values, nor can I find an example of how > to do it i

Re: substring and regular expression

2005-08-04 Thread Diez B.Roggisch
borges2003xx yahoo.it yahoo.it> writes: > > but in general is there a way to include in a re, in this example > something like...matches iff p , and q in which p==q[::-1] ? A way to > putting a small part of code of python in re? Thanx for your many helps What you are after is a parser - there

Re: Regex for nested {}

2005-07-28 Thread Diez B.Roggisch
> constructs like a**nn**n, with a={ and b=} in your case. This should have been a**nb**n - an example would be aaabbb. Diez -- http://mail.python.org/mailman/listinfo/python-list

Re: Regex for nested {}

2005-07-28 Thread Diez B.Roggisch
Chris cdot.de> writes: > > is something like that possible? No. Not with "pure" regexes. The reason is that the theory behind them doesn't allow to detect syntactic constructs like a**nn**n, with a={ and b=} in your case. What you need is a "real" parser - usually one uses regexes to split th

Re: Invoke a method to a specific thread

2005-07-25 Thread Diez B.Roggisch
VarghjÀrta gmail.com> writes: > If I have "GUIClass":... > And start another thread and from that thread I want to call the > method "PaintSomething()" in "GUIClass" _in_ the same thread that > "GUIClass" lives in. There is no such thing in python, or any programming language for that matter. I

Re: How do i do this

2005-07-24 Thread Diez B.Roggisch
Amit Regmi neolinuxsolutions.com> writes: > For some commad Linux like (pdbedit) its not possible to supply password > in the command line itself while we add a samba user account into the You might be able to utilize pexpect for this. Go google :) Diez -- http://mail.python.org/mailman/lis

Re: Ordering Products

2005-07-18 Thread Diez B.Roggisch
> I have to admit that I don't understand what you mean with the > 'constant parts' of an expression? >From what I percieved of your example it seemed to me that you wanted to evaluate the constants like 7*9 first, so that an expression like a * 7 * 9 * b with variables a,b is evaluated like t

Re: Ordering Products

2005-07-17 Thread Diez B.Roggisch
Kay Schluehr gmx.net> writes: > Now lets drop the assumption that a and b commute. More general: let be > M a set of expressions and X a subset of M where each element of X > commutes with each element of M: how can a product with factors in M be > evaluated/simplified under the condition of addi