Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.mixmin.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'explicitly': 0.05; 'debugging': 0.07; 'initialize': 0.07; 'debugger': 0.09; 'here?': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'restart': 0.09; 'python': 0.11; 'gui': 0.12; 'empty.': 0.16; 'received:80.91.229.3': 0.16; 'received:dip0.t-ipconnect.de': 0.16; 'received:plane.gmane.org': 0.16; 'received:t-ipconnect.de': 0.16; 'subject:Problem': 0.16; 'subject:program': 0.16; 'value),': 0.16; 'variable': 0.18; 'trying': 0.19; '(the': 0.22; 'command': 0.22; 'header:User-Agent:1': 0.23; 'resumes': 0.24; 'header:X -Complaints-To:1': 0.27; 'function': 0.29; "i'm": 0.30; '(maybe': 0.31; 'pickle': 0.31; 'writes:': 0.31; 'file': 0.32; 'interface': 0.32; 'open': 0.33; 'could': 0.34; 'problem': 0.35; 'subject:with': 0.35; 'there': 0.35; 'doing': 0.36; 'next': 0.36; 'charset:us-ascii': 0.36; 'wrong': 0.37; 'application': 0.37; 'thank': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'called': 0.40; 'even': 0.60; 'free': 0.61; 'simple': 0.61; 'you.': 0.62; 'save': 0.62; 'received:217': 0.63; 'field': 0.63; 'peace': 0.65; 'determine': 0.67; 'detail.': 0.68; 'commercial': 0.71; 'serial': 0.72; 'graphical': 0.91 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: dieter Subject: Re: Problem with pickle and restarting a program Date: Thu, 20 Mar 2014 09:20:03 +0100 References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Gmane-NNTP-Posting-Host: pd9e09265.dip0.t-ipconnect.de User-Agent: Gnus/5.1008 (Gnus v5.10.8) XEmacs/21.4.22 (linux) Cancel-Lock: sha1:ty6MIa9N1NEOmstjSFnIClo4Ik0= X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 11 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1395303616 news.xs4all.nl 2863 [2001:888:2000:d::a6]:35056 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:68571 Peace writes: > ... > The serial number field always remains empty even though I enter from the GUI and the receiveSerialNumber function is called and I explicitly initialize it to the variable in the model. > I'm trying to save the state of the program so that next time I open the application it resumes from where it left off. The problem is when I restart the application, the serial number is empty. What am I doing wrong here? Whenever I get a change in state (the RC value), I pickle and save to a file (restoreinfo.p). When I restart the application, the serial number is no longer there even though I enter it. Could you please let me know what is going wrong? Thank you. You may want to use debugging to determine what goes on in detail. There are commercial debuggers with a graphical user interface (maybe even free ones). Python comes with a simple command line debugger ("pdb").