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
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
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,
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
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
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
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
> 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
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
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
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
11 matches
Mail list logo