Re: Help a C++ escapee!

2007-06-07 Thread Jason
On Jun 7, 1:59 am, "Simon Pickles" <[EMAIL PROTECTED]> wrote: > Hi, > > Can someone help me leave the murky c++ world and enter shiny pythonland? > > I have a problem with importing and global variables, here's my code: [snip!] > When run, I come unstuck here: > > self.clientSocket, sel

Re: Help a C++ escapee!

2007-06-07 Thread Bjoern Schliessmann
Simon Pickles wrote: > from socket import * Bad idea, can make conflicts in namespace. > import threading There's absolutely no need to use threads for a server that accepts multiple connections :) > class CNetworkManager(): Note that you create an "old style" class. For new style classes, i

Re: Help a C++ escapee!

2007-06-07 Thread Paul Melis
Hello, Simon Pickles wrote: > Can someone help me leave the murky c++ world and enter shiny pythonland? Welcome! > I have a problem with importing and global variables, here's my code: > > [...] > > When run, I come unstuck here: > >self.clientSocket, self.clientAddress = network.

Re: Help a C++ escapee!

2007-06-07 Thread Ant
Hi Simon, > When run, I come unstuck here: > > self.clientSocket, self.clientAddress = network.accept() > > I get a nameError on 'network', yet it is one in the global namespace, > defined in server.py before CServerThread.Listen() is called. You have imported everything from socketMa

Help a C++ escapee!

2007-06-07 Thread Simon Pickles
Hi, Can someone help me leave the murky c++ world and enter shiny pythonland? I have a problem with importing and global variables, here's my code: ##server.py #socket connections from socketManager import* network = CNetworkManager() network.Listen()