summaryrefslogtreecommitdiffstats
path: root/For Weekly Test
diff options
context:
space:
mode:
authortt412011-07-24 18:09:55 +0200
committertt412011-07-24 18:09:55 +0200
commit7798f3bed295e83148de69c09e79a6a6912af5b6 (patch)
tree446907b4318c8e7dec7969c28c3a98c4576bd579 /For Weekly Test
parentsecond type of sip handler (not tested yet) (diff)
downloadgsm-selftest-7798f3bed295e83148de69c09e79a6a6912af5b6.tar.gz
gsm-selftest-7798f3bed295e83148de69c09e79a6a6912af5b6.tar.xz
gsm-selftest-7798f3bed295e83148de69c09e79a6a6912af5b6.zip
puting new file for test
Diffstat (limited to 'For Weekly Test')
-rw-r--r--For Weekly Test/30-07-2011/AccClass.py40
-rw-r--r--For Weekly Test/30-07-2011/AccClass.pycbin0 -> 1426 bytes
-rw-r--r--For Weekly Test/30-07-2011/CallClass.py30
-rw-r--r--For Weekly Test/30-07-2011/CallClass.pycbin0 -> 1160 bytes
-rw-r--r--For Weekly Test/30-07-2011/ClientClass.pycbin0 -> 3601 bytes
-rw-r--r--For Weekly Test/30-07-2011/ControllerClass.py4
-rw-r--r--For Weekly Test/30-07-2011/LogFileClass.pycbin0 -> 1494 bytes
-rw-r--r--For Weekly Test/30-07-2011/ServerClass.pycbin0 -> 4563 bytes
-rw-r--r--For Weekly Test/30-07-2011/callorigFR.py172
-rw-r--r--For Weekly Test/30-07-2011/client.py11
-rw-r--r--For Weekly Test/30-07-2011/sipHandler.log152
-rw-r--r--For Weekly Test/30-07-2011/sipHandler3.py139
-rw-r--r--For Weekly Test/30-07-2011/test.py27
-rw-r--r--For Weekly Test/30-07-2011/test2.py7
14 files changed, 556 insertions, 26 deletions
diff --git a/For Weekly Test/30-07-2011/AccClass.py b/For Weekly Test/30-07-2011/AccClass.py
new file mode 100644
index 0000000..9a3425d
--- /dev/null
+++ b/For Weekly Test/30-07-2011/AccClass.py
@@ -0,0 +1,40 @@
+import CallClass
+import pjsua as pj
+
+class Account(pj.AccountCallback):
+
+ def __init__(self, account=None):
+ pj.AccountCallback.__init__(self, account)
+# self.server = server
+ self.current_call = None
+ self.call_cb = None
+ self.statuss = None
+ self.status = None
+
+ def on_incoming_call(self, call):
+ global statuss
+ self.current_call = call
+ self.call_cb = CallClass.Calling(self.current_call)
+ self.current_call.set_callback(self.call_cb)
+
+ #sleep(0.5)
+ print "1"
+ call.answer(200)
+ self.statuss = 200
+ #gger.logEvent("Answer call")
+ #sleep(0.5)
+
+ if self.current_call <> None:
+ #logger.logEvent("Hangup call")
+ print "2"
+ call.hangup()
+ #logger.logEvent('CALL OK')
+ return 200
+
+ def result(self):
+ if self.statuss == 200:
+ self.status == 'CALL OK'
+ else:
+ self.status == 'CALL NOT OK'
+
+
diff --git a/For Weekly Test/30-07-2011/AccClass.pyc b/For Weekly Test/30-07-2011/AccClass.pyc
new file mode 100644
index 0000000..c32fa94
--- /dev/null
+++ b/For Weekly Test/30-07-2011/AccClass.pyc
Binary files differ
diff --git a/For Weekly Test/30-07-2011/CallClass.py b/For Weekly Test/30-07-2011/CallClass.py
new file mode 100644
index 0000000..ced8e3e
--- /dev/null
+++ b/For Weekly Test/30-07-2011/CallClass.py
@@ -0,0 +1,30 @@
+import pjsua as pj
+import AccClass
+
+class Calling(pj.CallCallback):
+
+ def __init__(self, call=None):
+ pj.CallCallback.__init__(self, call)
+ #self.server = server
+
+ def on_state(self):
+ global current_call
+
+ if self.call.info().state <> pj.CallState.DISCONNECTED:
+ if self.call.info().state_text == "CONNECTING":
+ #logger.logEvent("Call Connecting")
+ #logger.logEvent('200')
+ #self.server.sendData('CALL OK')
+ print "Connect"
+
+ if self.call.info().last_reason == "Busy Here":
+ #logger.logEvent('Number busy or Offline')
+ #server.sendData('CALL NOT OK')
+ #logger.logEvent('CALL NOT OK')
+ print "busy"
+
+ if self.call.info().state == pj.CallState.DISCONNECTED:
+ #logger.logEvent('Call Disconnected')
+ current_call = None
+ print "discon"
+
diff --git a/For Weekly Test/30-07-2011/CallClass.pyc b/For Weekly Test/30-07-2011/CallClass.pyc
new file mode 100644
index 0000000..a05a25a
--- /dev/null
+++ b/For Weekly Test/30-07-2011/CallClass.pyc
Binary files differ
diff --git a/For Weekly Test/30-07-2011/ClientClass.pyc b/For Weekly Test/30-07-2011/ClientClass.pyc
new file mode 100644
index 0000000..7cdfa60
--- /dev/null
+++ b/For Weekly Test/30-07-2011/ClientClass.pyc
Binary files differ
diff --git a/For Weekly Test/30-07-2011/ControllerClass.py b/For Weekly Test/30-07-2011/ControllerClass.py
index f69f395..1fcd51d 100644
--- a/For Weekly Test/30-07-2011/ControllerClass.py
+++ b/For Weekly Test/30-07-2011/ControllerClass.py
@@ -108,10 +108,6 @@ class test:
-
-
-
-
def initCaller(self):
if self.callFrom =="RZ1":
self.portCaller = 50008 #temp
diff --git a/For Weekly Test/30-07-2011/LogFileClass.pyc b/For Weekly Test/30-07-2011/LogFileClass.pyc
new file mode 100644
index 0000000..52fd946
--- /dev/null
+++ b/For Weekly Test/30-07-2011/LogFileClass.pyc
Binary files differ
diff --git a/For Weekly Test/30-07-2011/ServerClass.pyc b/For Weekly Test/30-07-2011/ServerClass.pyc
new file mode 100644
index 0000000..99bd14d
--- /dev/null
+++ b/For Weekly Test/30-07-2011/ServerClass.pyc
Binary files differ
diff --git a/For Weekly Test/30-07-2011/callorigFR.py b/For Weekly Test/30-07-2011/callorigFR.py
new file mode 100644
index 0000000..10e492b
--- /dev/null
+++ b/For Weekly Test/30-07-2011/callorigFR.py
@@ -0,0 +1,172 @@
+# $Id$
+#
+# SIP call sample.
+#
+# Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+import sys
+import pjsua as pj
+
+LOG_LEVEL=3
+current_call = None
+
+# Logging callback
+def log_cb(level, str, len):
+ print str,
+
+
+# Callback to receive events from account
+class MyAccountCallback(pj.AccountCallback):
+
+ def __init__(self, account=None):
+ pj.AccountCallback.__init__(self, account)
+
+ # Notification on incoming call
+ def on_incoming_call(self, call):
+ global current_call
+ if current_call:
+ call.answer(486, "Busy")
+ return
+
+ print "Incoming call from ", call.info().remote_uri
+ print "Press 'a' to answer"
+
+ current_call = call
+
+ call_cb = MyCallCallback(current_call)
+ current_call.set_callback(call_cb)
+
+ current_call.answer(180)
+
+
+# Callback to receive events from Call
+class MyCallCallback(pj.CallCallback):
+
+ def __init__(self, call=None):
+ pj.CallCallback.__init__(self, call)
+
+ # Notification when call state has changed
+ def on_state(self):
+ global current_call
+ print "Call with", self.call.info().remote_uri,
+ print "is", self.call.info().state_text,
+ print "last code =", self.call.info().last_code,
+ print "(" + self.call.info().last_reason + ")"
+
+ if self.call.info().state == pj.CallState.DISCONNECTED:
+ current_call = None
+ print 'Current call is', current_call
+
+ # Notification when call's media state has changed.
+ def on_media_state(self):
+ if self.call.info().media_state == pj.MediaState.ACTIVE:
+ # Connect the call to sound device
+ call_slot = self.call.info().conf_slot
+ pj.Lib.instance().conf_connect(call_slot, 0)
+ pj.Lib.instance().conf_connect(0, call_slot)
+ print "Media is now active"
+ else:
+ print "Media is inactive"
+
+# Function to make call
+def make_call(uri):
+ try:
+ print "Making call to", uri
+ return acc.make_call(uri, cb=MyCallCallback())
+ except pj.Error, e:
+ print "Exception: " + str(e)
+ return None
+
+
+# Create library instance
+lib = pj.Lib()
+
+try:
+ # Init library with default config and some customized
+ # logging config.
+ lib.init(log_cfg = pj.LogConfig(level=LOG_LEVEL, callback=log_cb))
+
+ # Create UDP transport which listens to any available port
+ transport = lib.create_transport(pj.TransportType.UDP,
+ pj.TransportConfig(0))
+ print "\nListening on", transport.info().host,
+ print "port", transport.info().port, "\n"
+
+ # Start the library
+ lib.start()
+ lib.set_null_snd_dev()
+
+ # Create local account
+ acc_cfg = pj.AccountConfig("132.230.4.8", "mpselftest3", "3mpselftest")
+ acc = lib.create_account(acc_cfg, cb=MyAccountCallback())
+
+ # If argument is specified then make call to the URI
+ if len(sys.argv) > 1:
+ lck = lib.auto_lock()
+ current_call = make_call(sys.argv[1])
+ print 'Current call is', current_call
+ del lck
+
+ my_sip_uri = "sip:" + transport.info().host + \
+ ":" + str(transport.info().port)
+
+ # Menu loop
+ while True:
+ print "My SIP URI is", my_sip_uri, acc.info().reg_status
+ print "Menu: m=make call, h=hangup call, a=answer call, q=quit"
+
+ input = sys.stdin.readline().rstrip("\r\n")
+ if input == "m":
+ if current_call:
+ print "Already have another call"
+ continue
+ print "Enter destination URI to call: ",
+ input = sys.stdin.readline().rstrip("\r\n")
+ if input == "":
+ continue
+ lck = lib.auto_lock()
+ number = "sip:"+input+"@132.230.4.8"
+ current_call = make_call(number)
+ del lck
+
+ elif input == "h":
+ if not current_call:
+ print "There is no call"
+ continue
+ current_call.hangup()
+
+ elif input == "a":
+ if not current_call:
+ print "There is no call"
+ continue
+ current_call.answer(200)
+
+ elif input == "q":
+ break
+
+ # Shutdown the library
+ transport = None
+ acc.delete()
+ acc = None
+ lib.destroy()
+ lib = None
+
+except pj.Error, e:
+ print "Exception: " + str(e)
+ lib.destroy()
+ lib = None
+
diff --git a/For Weekly Test/30-07-2011/client.py b/For Weekly Test/30-07-2011/client.py
new file mode 100644
index 0000000..f7df56f
--- /dev/null
+++ b/For Weekly Test/30-07-2011/client.py
@@ -0,0 +1,11 @@
+import ClientClass
+
+caller = ClientClass.Connection('localhost',50009)
+caller.connect()
+print caller.receiveData(30)
+
+while 1:
+ if caller.receiveData(30) == 200:
+ print "OK"
+ else:
+ continue
diff --git a/For Weekly Test/30-07-2011/sipHandler.log b/For Weekly Test/30-07-2011/sipHandler.log
new file mode 100644
index 0000000..c6872ef
--- /dev/null
+++ b/For Weekly Test/30-07-2011/sipHandler.log
@@ -0,0 +1,152 @@
+
+
+------------------STARTED THE LOGGING 2011-07-24 16:27:32.375953 ------------------
+
+
+------------------STARTED THE LOGGING 2011-07-24 16:27:50.403074 ------------------
+On: 2011-07-24 16:27:50.411154 Event: Beeing SIP
+On: 2011-07-24 16:27:50.411204 Event: init state
+
+
+------------------STARTED THE LOGGING 2011-07-24 16:28:29.384211 ------------------
+On: 2011-07-24 16:28:29.392608 Event: Beeing SIP
+On: 2011-07-24 16:28:29.392647 Event: Register Account to SIP server
+On: 2011-07-24 16:28:29.392820 Event: 100
+On: 2011-07-24 16:28:29.392832 Event: Receiver Handler Ready
+
+
+------------------STARTED THE LOGGING 2011-07-24 16:29:55.926708 ------------------
+On: 2011-07-24 16:29:55.935532 Event: Beeing SIP
+On: 2011-07-24 16:29:55.935569 Event: Register Account to SIP server
+On: 2011-07-24 16:29:55.935731 Event: 100
+On: 2011-07-24 16:29:55.935743 Event: Receiver Handler Ready
+
+
+------------------STARTED THE LOGGING 2011-07-24 16:32:29.788028 ------------------
+On: 2011-07-24 16:32:29.795804 Event: Beeing SIP
+On: 2011-07-24 16:32:29.795838 Event: Register Account to SIP server
+
+
+------------------STARTED THE LOGGING 2011-07-24 16:35:29.822312 ------------------
+On: 2011-07-24 16:35:29.830262 Event: Beeing SIP
+On: 2011-07-24 16:35:29.830294 Event: Register Account to SIP server
+On: 2011-07-24 16:35:29.830469 Event: 100
+On: 2011-07-24 16:35:29.830481 Event: Receiver Handler Ready
+
+
+------------------STARTED THE LOGGING 2011-07-24 16:36:02.524250 ------------------
+On: 2011-07-24 16:36:02.532031 Event: Beeing SIP
+On: 2011-07-24 16:36:02.532066 Event: Register Account to SIP server
+On: 2011-07-24 16:36:02.532232 Event: 100
+On: 2011-07-24 16:36:02.532243 Event: Receiver Handler Ready
+
+
+------------------STARTED THE LOGGING 2011-07-24 16:36:32.188702 ------------------
+On: 2011-07-24 16:36:32.196649 Event: Beeing SIP
+On: 2011-07-24 16:36:32.196685 Event: Register Account to SIP server
+On: 2011-07-24 16:36:32.196933 Event: 100
+On: 2011-07-24 16:36:32.196969 Event: Receiver Handler Ready
+
+
+------------------STARTED THE LOGGING 2011-07-24 16:37:16.946963 ------------------
+On: 2011-07-24 16:37:16.955049 Event: Beeing SIP
+On: 2011-07-24 16:37:16.955081 Event: Register Account to SIP server
+On: 2011-07-24 16:37:16.955247 Event: 100
+On: 2011-07-24 16:37:16.955258 Event: Receiver Handler Ready
+
+
+------------------STARTED THE LOGGING 2011-07-24 16:42:04.844476 ------------------
+On: 2011-07-24 16:42:04.853188 Event: Beeing SIP
+On: 2011-07-24 16:42:04.853231 Event: Register Account to SIP server
+On: 2011-07-24 16:42:04.853394 Event: 100
+On: 2011-07-24 16:42:04.853406 Event: Receiver Handler Ready
+
+
+------------------STARTED THE LOGGING 2011-07-24 17:40:32.537410 ------------------
+On: 2011-07-24 17:40:32.557888 Event: Beeing SIP
+On: 2011-07-24 17:40:32.557933 Event: Register Account to SIP server
+On: 2011-07-24 17:40:32.558114 Event: 100
+On: 2011-07-24 17:40:32.558126 Event: Receiver Handler Ready
+
+
+------------------STARTED THE LOGGING 2011-07-24 17:41:29.888321 ------------------
+On: 2011-07-24 17:41:29.898760 Event: Beeing SIP
+On: 2011-07-24 17:41:29.900036 Event: Register Account to SIP server
+On: 2011-07-24 17:41:29.900266 Event: 100
+On: 2011-07-24 17:41:29.900276 Event: Receiver Handler Ready
+
+
+------------------STARTED THE LOGGING 2011-07-24 17:41:58.279769 ------------------
+On: 2011-07-24 17:41:58.288036 Event: Beeing SIP
+On: 2011-07-24 17:41:58.288072 Event: Register Account to SIP server
+
+
+------------------STARTED THE LOGGING 2011-07-24 17:42:05.671554 ------------------
+On: 2011-07-24 17:42:05.679426 Event: Beeing SIP
+On: 2011-07-24 17:42:05.679459 Event: Register Account to SIP server
+On: 2011-07-24 17:42:05.680880 Event: 100
+On: 2011-07-24 17:42:05.680914 Event: Receiver Handler Ready
+
+
+------------------STARTED THE LOGGING 2011-07-24 17:48:03.838278 ------------------
+On: 2011-07-24 17:48:03.848800 Event: Beeing SIP
+On: 2011-07-24 17:48:03.850091 Event: Register Account to SIP server
+On: 2011-07-24 17:48:03.850352 Event: 100
+On: 2011-07-24 17:48:03.850362 Event: Receiver Handler Ready
+
+
+------------------STARTED THE LOGGING 2011-07-24 17:48:35.998481 ------------------
+On: 2011-07-24 17:48:36.007501 Event: Beeing SIP
+On: 2011-07-24 17:48:36.007551 Event: Register Account to SIP server
+On: 2011-07-24 17:48:36.008942 Event: 100
+On: 2011-07-24 17:48:36.008971 Event: Receiver Handler Ready
+
+
+------------------STARTED THE LOGGING 2011-07-24 17:49:40.498750 ------------------
+On: 2011-07-24 17:49:40.508723 Event: Connect to Controller
+On: 2011-07-24 17:49:42.982151 Event: Beeing SIP
+On: 2011-07-24 17:49:42.982257 Event: Register Account to SIP server
+On: 2011-07-24 17:49:42.982721 Event: 100
+On: 2011-07-24 17:49:42.982747 Event: Receiver Handler Ready
+
+
+------------------STARTED THE LOGGING 2011-07-24 17:51:13.581243 ------------------
+On: 2011-07-24 17:51:13.589095 Event: Connect to Controller
+On: 2011-07-24 17:51:16.272007 Event: Beeing SIP
+On: 2011-07-24 17:51:16.272113 Event: Register Account to SIP server
+On: 2011-07-24 17:51:16.272525 Event: 100
+On: 2011-07-24 17:51:16.272551 Event: Receiver Handler Ready
+
+
+------------------STARTED THE LOGGING 2011-07-24 17:52:15.634585 ------------------
+On: 2011-07-24 17:52:15.645939 Event: Connect to Controller
+On: 2011-07-24 17:52:18.673260 Event: Beeing SIP
+On: 2011-07-24 17:52:18.673365 Event: Register Account to SIP server
+On: 2011-07-24 17:52:18.673768 Event: 100
+On: 2011-07-24 17:52:18.673847 Event: Receiver Handler Ready
+
+
+------------------STARTED THE LOGGING 2011-07-24 18:04:47.926307 ------------------
+On: 2011-07-24 18:04:47.934637 Event: Beeing SIP
+On: 2011-07-24 18:04:47.934676 Event: Register Account to SIP server
+
+
+------------------STARTED THE LOGGING 2011-07-24 18:05:00.680560 ------------------
+On: 2011-07-24 18:05:00.688643 Event: Beeing SIP
+On: 2011-07-24 18:05:00.688702 Event: Register Account to SIP server
+On: 2011-07-24 18:05:00.688886 Event: 100
+On: 2011-07-24 18:05:00.688898 Event: Receiver Handler Ready
+
+
+------------------STARTED THE LOGGING 2011-07-24 18:06:45.690859 ------------------
+On: 2011-07-24 18:06:45.698665 Event: Beeing SIP
+On: 2011-07-24 18:06:45.698701 Event: Register Account to SIP server
+On: 2011-07-24 18:06:45.700190 Event: 100
+On: 2011-07-24 18:06:45.700222 Event: Receiver Handler Ready
+
+
+------------------STARTED THE LOGGING 2011-07-24 18:07:35.096417 ------------------
+On: 2011-07-24 18:07:35.105236 Event: Beeing SIP
+On: 2011-07-24 18:07:35.106500 Event: Register Account to SIP server
+On: 2011-07-24 18:07:35.106738 Event: 100
+On: 2011-07-24 18:07:35.106798 Event: Receiver Handler Ready
diff --git a/For Weekly Test/30-07-2011/sipHandler3.py b/For Weekly Test/30-07-2011/sipHandler3.py
new file mode 100644
index 0000000..511bf43
--- /dev/null
+++ b/For Weekly Test/30-07-2011/sipHandler3.py
@@ -0,0 +1,139 @@
+import sys
+import string
+import pjsua as pj
+import ServerClass
+import LogFileClass
+import AccClass
+import CallClass
+
+from time import sleep
+
+def log_cb(level, str, len):
+ print "--------starting Handler--------"
+
+# Receive events from incoming Call
+
+
+def make_call(uri):
+
+ try:
+
+ cb=CallClass.Calling()
+ return acc.make_call(uri, cb)
+
+ except pj.Error, e:
+ print "408 " + str(e)
+ logger.logEvent('408')
+ return None
+
+def greeting():
+ global server
+ global status
+ server = None
+ status = None
+
+ server = ServerClass.ServerHandler(50009)
+ logger.logEvent('Connect to Controller')
+ conn = server.openSocket()
+ server.sendData('RECEIVER READY')
+
+def initHandler():
+ global acc_cfg
+ global handler
+
+ handler = 'sip' #sys.argv[1]
+ #port = sys.argv[2]
+
+ if handler == 'sip':
+ logger.logEvent('Beeing SIP')
+ acc_cfg = pj.AccountConfig("132.230.4.8","mpselftest1","1mpselftest")
+
+ elif handler == 'landline':
+ logger.logEvent('Beeing Landline')
+ acc_cfg = pj.AccountConfig("sipgate.de","1289459","MMW9AX")
+
+ elif handler == 'unisip':
+ logger.logEvent('Beeing University SIP')
+ acc_cfg = pj.AccountConfig("132.230.252.228", "4976120397897", "hB8M3WyFt61C")
+
+ else:
+ logger.logEvent('Unknown Message')
+ server.sendData('Unknown Message')
+ server.closeConnection()
+ sys.exit(1)
+
+
+
+lib = pj.Lib()
+stop = False
+
+logger = LogFileClass.Logging('sipHandler.log')
+logger.logEvent('')
+
+while stop <> True:
+
+ acc_cfg = None
+
+ lib.init(log_cfg = pj.LogConfig(level=1, callback=log_cb))
+ transport = lib.create_transport(pj.TransportType.UDP, pj.TransportConfig(0))
+
+ lib.start()
+ lib.set_null_snd_dev()
+
+ status = 'NOT OK'
+ #greeting()
+ initHandler()
+ state = 'RECEIVER'
+
+ try:
+ #initState()
+ logger.logEvent('Register Account to SIP server')
+ cb1=AccClass.Account()
+ acc = lib.create_account(acc_cfg, cb=cb1)
+
+ print cb1
+
+ if acc.info().reg_status < 700:
+
+ if state =='RECEIVER':
+ logger.logEvent(acc.info().reg_status)
+ #server.sendData('RECEIVER READY')
+ logger.logEvent('Receiver Handler Ready')
+
+ while 1:
+
+ #data = server.receiveData(3)
+ data = 'hjk'
+ print cb1.result()
+ sleep(2)
+ if cb1.status <> None:
+ print cb1.statuss
+ if data == 'RECEIVER START':
+ logger.logEvent(data)
+
+ if data == 'TERMINATE CONNECTION':
+ logger.logEvent('Terminate')
+ stop = True
+ break
+
+ else:
+ logger.logEvent('Unknow Message')
+ #server.sendData('Unknow Message')
+ #server.closeConnection()
+ sys.exit(1)
+
+ else:
+ logger.logEvent("488 Not Acceptable Here")
+ lib.destroy()
+
+ except ValueError:
+ print "401 Unauthorized " + str(e)
+ logger.logEvent("401 Unauthorized ")
+
+logger.logEvent("Goodbye")
+acc.delete()
+lib.destroy()
+#server.closeConnection()
+lib = None
+acc = None
+
diff --git a/For Weekly Test/30-07-2011/test.py b/For Weekly Test/30-07-2011/test.py
index e2190a3..8a875a4 100644
--- a/For Weekly Test/30-07-2011/test.py
+++ b/For Weekly Test/30-07-2011/test.py
@@ -1,24 +1,7 @@
-import sys
+class MyClass(object):
+ def __init__(self):
+ print "never called in this case"
-def abc():
- global message2
- message2 = sys.argv[1]
-def initState():
- global message
- global state
- global num
-
- message = message2
-
- if message == 'RECEIVER':
- state = 'RECEIVER'
-
- elif message[0:6] == 'CALLER':
- state = 'CALLER'
- #num = message[7:]
-
-
-abc()
-initState()
-print state#, num
+obj = MyClass()
+print obj
diff --git a/For Weekly Test/30-07-2011/test2.py b/For Weekly Test/30-07-2011/test2.py
new file mode 100644
index 0000000..414e491
--- /dev/null
+++ b/For Weekly Test/30-07-2011/test2.py
@@ -0,0 +1,7 @@
+import sys
+import os
+import subprocess
+import test
+
+
+print "hallo"