Pickle and wx.TextCtrl
Trying to read a pickled filed and list contents. The attached program works using pprint, but I want to write to my frame. WriteText only produces half of the records. What is happening? (See attached file: ReadDB_b.py) D. J. Webre, Jr. PE & PLS Director of Engineering & Technical Support LA DOTD, Office of Public Works, Hurricane Flood Protection & Intermodal Transportation 8900 Jimmy Wedell Dr. Rm 215 Baton Rouge, LA 70807 http://www.dotd.louisiana.gov/sitemap.asp?ID=8 (225) 274-4339 e-mail: [EMAIL PROTECTED] (225) 274-4322 Fac ReadDB_b.py Description: Binary data -- http://mail.python.org/mailman/listinfo/python-list
Re: Pickle and wx.TextCtrl
D. J. Webre, Jr. PE & PLS "Gabriel Genellina" <[EMAIL PROTECTED] To com.ar> [email protected] Sent by: cc python-list-bounc esSubject +djwebre=dotd.la. Re: Pickle and wx.TextCtrl [EMAIL PROTECTED] 07/11/2008 10:51 PM Thanks for the response. En Fri, 11 Jul 2008 10:15:36 -0300, <[EMAIL PROTECTED]> escribió: > Trying to read a pickled file and list contents. > > The attached program works using pprint, but I want to write to my frame. > WriteText only produces half of the records. > What is happening? What do you mean by "only produces half of the records"? Write Text list records from "Assignment" to "Report" pprint list records from "Assignment" to "Report" and continues to "TaskWeek", about twice as many records Probably your problem has nothing to do with a TextCtrl - ensure you can save and load your data with a simple, console-based script, and only then write the GUI. The way you read the file is rather strange -mixing calls to readline and pickle.load- I'd write the data using pickle.dump calls *only* and then read it using pickle.load calls *only*. I used 13.1.7 Example of the Python Library Referencebut. Got an error message when I did not have the readline() statement. Additional ideas will be appreciated. -- Gabriel Genellina -- http://mail.python.org/mailman/listinfo/python-list <><><>-- http://mail.python.org/mailman/listinfo/python-list
Re: Pickle and wx.TextCtrl
D. J. Webre, Jr. PE & PLS "Gabriel Genellina" <[EMAIL PROTECTED] To com.ar> [email protected] Sent by: cc python-list-bounc esSubject +djwebre=dotd.la. Re: Pickle and wx.TextCtrl [EMAIL PROTECTED] 07/11/2008 10:51 PM Thanks for the response. En Fri, 11 Jul 2008 10:15:36 -0300, <[EMAIL PROTECTED]> escribió: > Trying to read a pickled file and list contents. > > The attached program works using pprint, but I want to write to my frame. > WriteText only produces half of the records. > What is happening? What do you mean by "only produces half of the records"? Write Text list records from "Assignment" to "Report" pprint list records from "Assignment" to "Report" and continues to "TaskWeek", about twice as many records Probably your problem has nothing to do with a TextCtrl - ensure you can save and load your data with a simple, console-based script, and only then write the GUI. The way you read the file is rather strange -mixing calls to readline and pickle.load- I'd write the data using pickle.dump calls *only* and then read it using pickle.load calls *only*. I used 13.1.7 Example of the Python Library Referencebut. Got an error message when I did not have the readline() statement. Additional ideas will be appreciated. -- Gabriel Genellina -- http://mail.python.org/mailman/listinfo/python-list <><><>-- http://mail.python.org/mailman/listinfo/python-list
