Re: [PyQt] QWebHistory load/save

2010-03-15 Thread David Bronke
I updated PyQt from 4.7.1-snapshot-20100120 to snapshot-4.7.1-02f7e71246f9, and that seemed to fix the issue. Now, I get what looks like a valid history file. (254 bytes from my modified version of Russel's code) On Mon, Mar 15, 2010 at 13:54, David Bronke wrote: > I had already done those 2 cha

Re: [PyQt] QWebHistory load/save

2010-03-15 Thread David Bronke
I had already done those 2 changes in my version of his script; I've attached my modified version. With this version, I still get a zero-length file. On Mon, Mar 15, 2010 at 13:48, Phil Thompson wrote: > On Mon, 15 Mar 2010 13:24:21 -0500, Russell Valentine > wrote: > > Yes, my fault. How abou

Re: [PyQt] QWebHistory load/save

2010-03-15 Thread Phil Thompson
On Mon, 15 Mar 2010 13:24:21 -0500, Russell Valentine wrote: > Yes, my fault. How about this one: > It will be a while before I can try it. In the process up upgrading to > Qt4.6 > === > > from PyQt4 import QtCore, QtGui, QtWebKit > import sys > > > class MainWindow(QtGui.QMainWindow):

Re: [PyQt] QWebHistory load/save

2010-03-15 Thread David Bronke
In my example, there is an event loop, and it still gets a zero-length file. I've modified Russel's example to have an event loop, and it still exhibits the same behavior. On Mon, Mar 15, 2010 at 13:09, Phil Thompson wrote: > On Mon, 15 Mar 2010 12:57:27 -0500, David Bronke > wrote: > > Well, ac

Re: [PyQt] QWebHistory load/save

2010-03-15 Thread Russell Valentine
Yes, my fault. How about this one: It will be a while before I can try it. In the process up upgrading to Qt4.6 === from PyQt4 import QtCore, QtGui, QtWebKit import sys class MainWindow(QtGui.QMainWindow): def __init__(self): super(QtGui.QMainWindow, self).__init__()

Re: [PyQt] QWebHistory load/save

2010-03-15 Thread Phil Thompson
On Mon, 15 Mar 2010 12:57:27 -0500, David Bronke wrote: > Well, according to the Qt docs, the << and >> operators for QWebHistory > were > added in Qt 4.6, which would explain why it's just giving you > NotImplemented > under Qt 4.5.3... I'm not seeing that output here, though, and I'm still > get

Re: [PyQt] QWebHistory load/save

2010-03-15 Thread David Bronke
Well, according to the Qt docs, the << and >> operators for QWebHistory were added in Qt 4.6, which would explain why it's just giving you NotImplemented under Qt 4.5.3... I'm not seeing that output here, though, and I'm still getting a zero-length file. (with your test script as well) On Mon, M

Re: [PyQt] QWebHistory load/save

2010-03-15 Thread Russell Valentine
Looks like your on to something unless I did something wrong as well. I wrote a little simple case. Using .__lshift__ instead of "<<" just made it not have an exception but it shows as "NotImplemented" in the console. Qt: 4.5.3 PyQt4: 4.7 Python: 2.6.4 = from PyQt4 import QtCo

Re: [PyQt] QWebHistory load/save

2010-03-15 Thread David Bronke
Sorry, I spoke to soon. Using out.__lshift__(view.page().history()) yeilds a zero-length file. Attached is another somewhat minimal test case; it loads google, wikipedia, and CNN one after the other, and when CNN is loaded, it saves the web view's history to a file and checks the file's length. On

Re: [PyQt] QWebHistory load/save

2010-03-15 Thread David Bronke
That works great, thanks! On Mon, Mar 15, 2010 at 00:45, Russell Valentine wrote: > out.__lshift__(view.page().history()) > > David Bronke wrote: > >> In the QWebHistory documentation (both on the main Qt site and at >> >> http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qwebhistory.htm

Re: [PyQt] QWebHistory load/save

2010-03-15 Thread Phil Thompson
On Sun, 14 Mar 2010 22:29:29 -0500, David Bronke wrote: > In the QWebHistory documentation (both on the main Qt site and at > http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qwebhistory.html) > the method for loading and saving history for a QWebPage is described as: > > QWebHistory's

Re: [PyQt] QWebHistory load/save

2010-03-14 Thread Russell Valentine
out.__lshift__(view.page().history()) David Bronke wrote: In the QWebHistory documentation (both on the main Qt site and at http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qwebhistory.html) the method for loading and saving history for a QWebPage is described as: QWebHistory's state

[PyQt] QWebHistory load/save

2010-03-14 Thread David Bronke
In the QWebHistory documentation (both on the main Qt site and at http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qwebhistory.html) the method for loading and saving history for a QWebPage is described as: QWebHistory's state can be saved to a QDataStream using > the >> operator and lo