473,395 Members | 1,783 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Re: Pickle and wx.TextCtrl

En Fri, 11 Jul 2008 10:15:36 -0300, <DW****@dotd.la.govescribió:
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?
What do you mean by "only produces half of the 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*.

--
Gabriel Genellina

Jul 12 '08 #1
0 1354

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Logan | last post by:
I asked a similar question already in the wxPython mailing list, but did not get an answer up to now: 1.) When using a TextCtrl with styles (color etc.) in wxPython, is it then possible to get a...
3
by: Michael Hohn | last post by:
Hi, under python 2.2, the pickle/unpickle sequence incorrectly restores a larger data structure I have. Under Python 2.3, these structures now give an explicit exception from...
0
by: Mike P. | last post by:
Hi all, I'm working on a simulation (can be considered a game) in Python where I want to be able to dump the simulation state to a file and be able to load it up later. I have used the standard...
6
by: Hako | last post by:
Hello All, I have a function to set readonly or editable of a textctrl. I'd like to make the textctrl initial set readonly and use other event funciton to set editable of the textctrl but it...
5
by: citronelu | last post by:
I made a small wxPython app that retrieves web data; for visual logging I use a TextCtrl widget, and stdout is redirected to it, something like this: class RedirectOutput: def __init__(self,...
3
by: bcwhite | last post by:
I'm running Python2.5 with wxPython v2.8.3.0 under WinXP and I cannot get the SetDefaultStyle method to work. I'm trying: self.output.SetDefaultStyle(wx.TextAttr(wx.RED))...
3
by: Alejandro | last post by:
Hi: I want to redirect stdout to a textctrl I have. From what I read in the wxpython documentation, I can use the wxLogTextCtrl class to do this. I am doing the following: class...
1
by: aeroumr | last post by:
In the following code, I have created a panel with a button and a textctrl object on it. I have also created a menubar that will create a new text file (i.e. textctrl object). My problem is that...
0
by: DWebre | last post by:
D. J. Webre, Jr. PE & PLS "Gabriel Genellina" <gagsl-py2@yahoo. ...
1
by: IceMan85 | last post by:
Hi to all, I have spent the whole morning trying, with no success to pickle an object that I have created. The error that I get is : Can't pickle 'SRE_Match' object: <_sre.SRE_Match object at...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.