diff --git a/PyTracker/trunk/PyTrackerClient.py b/PyTracker/trunk/PyTrackerClient.py index ce5e968..a24b283 100644 --- a/PyTracker/trunk/PyTrackerClient.py +++ b/PyTracker/trunk/PyTrackerClient.py @@ -14,7 +14,7 @@ from dbus import SystemBus, Interface from optparse import OptionParser class TrackClient: - def __init__(self, username, passwordhash, host, port): + def __init__(self, username='anonymous', passwordhash='', host='localhost', port='49152'): self.InitSocket(host, port) self.InitDbusStuff() self.InitUserHash(username, passwordhash) @@ -62,6 +62,8 @@ class TrackClient: # prepare data for sending UDPData = "%s,%s,%s,%s" % (lat, lon, alt, utctime) self.SendData(self.__username, self.__pwhash, 'Transmit', UDPData) +# Debug message: + print "Updated Data" def InitUserHash(self, username, pwhash): # set username and password globally in the class @@ -72,16 +74,3 @@ class TrackClient: # put together and send data to TransmitUDP() senddata = "%s;%s;%s;%s" % (username, pwhash, action, data) self.TransmitUDP(senddata) - - - - - - - - - - - - - diff --git a/PyTracker/trunk/clientscript.py b/PyTracker/trunk/clientscript.py new file mode 100644 index 0000000..0d55228 --- /dev/null +++ b/PyTracker/trunk/clientscript.py @@ -0,0 +1,3 @@ +from PyTrackerClient import * +test=TrackClient('edistar','refeco3','80.61.221.9') +ecore.main_loop_begin()