[AG-TECH] GetData() problem in wxPython shared application

Stephen Jeffrey sjj at maths.uq.edu.au
Tue Apr 12 17:41:20 CDT 2005


Hi All,

I am writing a shared application using wxPython. The application
is to query if there is any shared data present when it starts.
ie. if another copy of the application is already running and has
sent some data using sharedAppClient.SetData(), when the second
copy of the application starts it should obtain the data stored
by the first copy.

How can I query if there is any shared data already present?
I have tried:

d = self.sharedAppClient.GetData("data")
if len(d) > 0:

and other variations such as:

d = self.sharedAppClient.GetData("data")
if d != 0:

and

d = self.sharedAppClient.GetData("data")
if d != None:

but it appears as though GetData() is returning junk - when the
first copy of the application starts there should not be
any shared data present, but it returns non-zero data.

Is there some way to overcome this, or do I have to somehow
get the first instance of the application to "initialise"
the shared data.

cheers
steve

-- 
Dr Stephen Jeffrey
Advanced Computational Modelling Centre
University of Queensland
St. Lucia Queensland 4072 Australia

Phone: +61 (7) 3365 6130
Fax: +61 (7) 3365 6136
Email: sjj at maths.uq.edu.au
Web: http://www.acmc.uq.edu.au




More information about the ag-tech mailing list