Gecko bindings for Python?

2005-01-11 Thread Cordula's Web
Hello,

I'd like to use the Gecko engine in GTK+ or Qt programs written in
Python. Could you recommend a module for this? A tutorial to get
started? I didn't find anything useful, but I may have been looking in
all the wrong places... :)
Thanks,
-cpghost.

-- 
Cordula's Web. http://www.cordula.ws/

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Gecko bindings for Python?

2005-01-13 Thread Cordula's Web
Yes, that's exactly what I needed!
Thanks alot!
-cpghost.

-- 
Cordula's Web. http://www.cordula.ws/

-- 
http://mail.python.org/mailman/listinfo/python-list


for line in file weirdness

2005-04-13 Thread Cordula's Web
Hello,

here's a strange bug (?) I've came across (using Python 2.2):

# loop_1
for line in file:
if some_condition(line): break
do_something()

# loop_2
for line in file:
do_something_else()

The problem is, that loop_2 doesn't resume where loop_1 left off, but
skips many lines (a block's worth or so) before continuing.

Why is this? Is reading from a file non-reentrant?

It is always possible to slurp the whole file content into a list, and
then iterate through the list, but I want to handle HUGE files too.

Thanks,
-cpghost.

-- 
Cordula's Web. http://www.cordula.ws/

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: for line in file weirdness

2005-04-13 Thread Cordula's Web
A read-ahead buffer? Yes, that would explain it. Sorry, I missed this
piece of information in the documentation.

Thanks to all who replied.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: for line in file weirdness

2005-04-13 Thread Cordula's Web
Thanks :)

Reading everything into a variable was not an option, due to some very
large files. Creating the iterator only once, as Fredrik suggested,
solved the problem nicely.

Again many thanks for your great support!

-- 
http://mail.python.org/mailman/listinfo/python-list