Re: Newbie: AttributeError: 'module' object has no attribute 'Client'

"Schneider" <[email protected]>
Newsgroups gmane.comp.python.pyro
Message-ID <000901cd3c0d$747a5cb0$5d6f1610$@com>
Moving the code from the global scope into a main method solved the problem.
As in the chatbox example, an import of the client in the server does not
seem to be required. I am a little puzzled why this is.

The thread is required because the client's main task is gathering realtime
data , which is fed into the server.

Irmen, I love your documentation, which is great. Also, the examples are
really good. However, getting away from the computer for a day and just a
little hint from somebody sometimes does help as well.

Thanks a lot for the help.

Frans

-----Oorspronkelijk bericht-----
Van: Irmen de Jong [mailto:[email protected]] 
Verzonden: zondag 27 mei 2012 11:37
Aan: [email protected]
Onderwerp: Re: [Pyro] Newbie: AttributeError: 'module' object has no
attribute 'Client'

On 27-5-2012 10:16, Todd Williamson wrote:
> The problem is that the server has no knowledge of the class Client.  
> Add an import client statement into server.py.  Also, move all the 
> code in global scope in client.py into a main method and start things up
as you do in server.py.
> 

Yeah, and also; why does your (Frans's) client code have a daemon thread as
well?
Unless it's going to function as a Pyro server by itself, that's not
necessary.

I recommend working through the tutorial chapter of the Pyro manual and see
if you can get things running. This should familiarize you with the basic
principles quite fast!

Good luck!

Irmen.




----------------------------------------------------------------------------
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and threat
landscape has changed and how IT managers can respond. Discussions will
include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Pyro-core mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyro-core


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.