Topic: hi can you help me convert this nokia s60 python script to windows..
python.. please can you help me convert this!!! please.. convert this to run to pc.. just delete e32 and appuifw and then change tb.add please i just don't know how to change or alternative code for tb.add if it print or what please im begging.
import e32
import appuifw
from socket import *
quit_signal = e32.Ao_lock()
app = appuifw.app
old_handlers = app.menu, app.exit_key_handler, app.body, app.title
def on_exit():
app.menu, app.exit_key_handler, app.body, app.title = old_handlers
quit_signal.signal()
app.exit_key_handler = on_exit
tb = appuifw.Text()
app.body = None
app.menu = []
app.title = u"RFCOMM server"
sock = socket(AF_BT, SOCK_STREAM)
port = bt_rfcomm_get_available_server_channel(sock)
sock.bind(("", port))
set_security(sock, AUTHOR)
sock.listen(1)
bt_advertise_service(u"SampleServer", sock, True, RFCOMM)
tb.add( u"listening on port ", port )
client, addr = sock.accept()
tb.add( u"accepted connection from ", addr )
appuifw.note(u"accepted connection", "info")
sock.close()
client.send("Series 60 Python server says Hello!!")
data = client.recv(80)
tb.add( u"received: ", data )
client.close()
quit_signal.wait()
Last edited by bluelego (January 4, 2012 09:33)