Re: inline function call

2006-01-05 Thread Riko Wichmann
Peter Hansen wrote: > > Seeing what others have achieved is always educational to the ignorant, > so I learned something. ;-) Would have been even more educating, if I had my original code still at hand for comparison, which unfortunately I didn't. But all the improvements come from following

Re: inline function call

2006-01-04 Thread Riko Wichmann
Hi Peter, > Riko, any chance you could post the final code and a bit more detail on > exactly how much Psyco contributed to the speedup? The former would be > educational for all of us, while I'm personally very curious about the > latter because my limited attempts to use Psyco in the past ha

Re: inline function call

2006-01-04 Thread Riko Wichmann
Hey guys, thanks for all the quick replies! In addition to the tips Peter and Stuart gave me above, I also followed some of the hints found under http://wiki.python.org/moin/PythonSpeed/PerformanceTips That greatly improved performance from about 3 minutes initially (inner loop about 2000, out

Re: inline function call

2006-01-04 Thread Riko Wichmann
> Do you have an actual use-case for that? I mean, do you have code that runs > slow, but with inlined code embarrassingly faster? Well, I guess it would not actually be embarrassingly faster. From trying various things and actually copying the function code into the DoMC routine, I estimate to

inline function call

2006-01-04 Thread Riko Wichmann
hi everyone, I'm googeling since some time, but can't find an answer - maybe because the answer is 'No!'. Can I call a function in python inline, so that the python byte compiler does actually call the function, but sort of inserts it where the inline call is made? Therefore avoiding the funct

Re: cookie lib policy how-tp?

2004-12-08 Thread Riko Wichmann
Tried that already. At least, I hope I guessed at least one of the possible identifiers correct: MSIE6.0, MSIE 6.0, MSIE/6.0 When my opera is set to identify as MSIE, it sends "Mozilla/4.0 (compatible; MSIE 6.0; X11; Linux i686) Opera 7.54 [en]". Hi Marc, thanks for the hint! that brought me a

Re: cookie lib policy how-tp?

2004-12-07 Thread Riko Wichmann
Jonathan Ellis wrote: Riko Wichmann wrote: When I use opera to access this page by hand and look at the sources, I see the full sources when letting opera identify itself as MSIE 6.0. When using Mozilla 5.0 I get the same in-complete source file as with python. Sounds like your first step should

cookie lib policy how-tp?

2004-12-07 Thread Riko Wichmann
dear all, i try to retrieve information from a secure web site. I use cookielib and urllib2 for this exercise which works to a certain level. I can authenticate myself and read the top-level page. However, from here I need to load a page which is dynamically build from information available fro

Re: comment out more than 1 line at once?

2004-11-30 Thread Riko Wichmann
Ha! have just discover C-c # myself (sometimes it helps to actually look at the emacs menus, even if you are used to using the key-bindings :) Better yet works "Meta-;" as Bernhard suggested, because it comments and un-comments marked line! Thanks for all the helpful tips! - Riko Riko,

Re: comment out more than 1 line at once?

2004-11-30 Thread Riko Wichmann
following post will do the job. I use it to test pieces of a modules which usually is imported from another. For testing different parts, I usually have different __main__ sections in the file Cheers, Riko Aaron Bingham wrote: Riko Wichmann wrote: Dear all, is there a way in Python

comment out more than 1 line at once?

2004-11-30 Thread Riko Wichmann
Dear all, is there a way in Python to comment out blocks of code without putting a # in front of each line? Somethings like C's /* block of code here is commented out */ Thanks, Riko -- http://mail.python.org/mailman/listinfo/python-list