[Tutor] Tracking variable changes in a different application

Kristina Ambert krissy.ambert at gmail.com
Tue Sep 1 21:51:34 CEST 2009


Hi again,

The question might be a tad confusing, but what I want to ask is, if it's
possible to track if and when a variable in an application has changed, and
then grab the new content of that variable?
I have my product inventory database application which is attached to
another bigger application. Some of the data I need comes from that bigger
application, like for instance Consumer information (not handled by the
application that I'm working on). So, if the address of a consumer is
changed, how my application track the changes without having to do something
like:

        class Consumer(objectOfSomething):
                  -----
                  -----
                  def updateConsumerInfo(newAddress):
                          newAddress = newAddress
                          inventory.updateConsumerInfo(newAddress)
#<<<not updating from here

instead only read from class:
        class Consumer(objectOfSomething):
                  -----
                  -----
                  def updateConsumerInfo(newAddress):
                          newAddress = newAddress

and track the change of newAddress from the function updateConsumerInfo in
class Consumer.

Is this possible to do? (if my question even make sense)

Thanks for any responses!

Best,
Krissy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20090901/e0c13c4d/attachment.htm>


More information about the Tutor mailing list