summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2009-05-31 22:54:22 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2009-05-31 22:54:22 +0200
commit55713ded9b9fccbf3bca9e47ca509d6035ddcd96 (patch)
treeba4b4cedb69a0a04249c5861b9bd763877441298
parentsocket interface example (diff)
downloadpyload-55713ded9b9fccbf3bca9e47ca509d6035ddcd96.tar.xz
socket example
-rw-r--r--module/remote/ClientHandler.py3
-rwxr-xr-xpyMainGui.py12
2 files changed, 12 insertions, 3 deletions
diff --git a/module/remote/ClientHandler.py b/module/remote/ClientHandler.py
index 6f208a3f5..3fcee3f79 100644
--- a/module/remote/ClientHandler.py
+++ b/module/remote/ClientHandler.py
@@ -7,6 +7,7 @@ this module handels the incoming requests
"""
import hashlib
+import wx
from Crypto.Cipher import Blowfish
from RequestHandler import RequestHandler
@@ -20,5 +21,5 @@ class ClientHandler(RequestHandler):
def proceed(self, data):
obj = self.decrypt(data)
if obj.function == "get_downloads":
- print obj.response
+ self.client.show_links(obj.response)
return self.encrypt(obj)
diff --git a/pyMainGui.py b/pyMainGui.py
index c84f1ed01..86bfbe274 100755
--- a/pyMainGui.py
+++ b/pyMainGui.py
@@ -71,9 +71,9 @@ class Pyload_Main_Gui(wx.Frame):
app_path = dirname(abspath(__file__)) + sep
- # socket
+ # socket
self.thread = SocketThread("localhost", 7272, "pwhere", self)
- self.thread.push_exec("get_downloads")
+
# Menubar
menubar = wx.MenuBar()
@@ -106,6 +106,10 @@ class Pyload_Main_Gui(wx.Frame):
self.Centre()
self.Show(True)
+
+ #test
+
+ self.thread.push_exec("get_downloads")
def exit_button_clicked(self, event):
self.Close()
@@ -114,6 +118,10 @@ class Pyload_Main_Gui(wx.Frame):
adddownload = _Download_Dialog(None, -1)
result = adddownload.ShowModal()
adddownload.Destroy()
+
+ def show_links(self, links):
+ for link in links:
+ wx.MessageDialog(None, str(link), 'info', style=wx.OK).ShowModal()
app = wx.App()
Pyload_Main_Gui(None,-1)