[Twisted-Python] finger tutorial question

Hi, I am pretty new to python and totally new to twisted. From what I read about it, it's perfect for my means. I need to write a background daemon that connects to a port, stays connected, reads information blocks, keeps state, and write to a postgres database occasionally. Also it should accepts connections from GUI clients, that should display the state in a user friendly manner. This looks like a perfect target for Twisted, especially because I want to write the GUI client in wxPython. So I started to follow the tutorial. Nothing too special, apart from the last steps. When making a finger library the tutorial creates a file named organized-finger.tac. This file starts with 'import finger'. The source for this file is described in the tutorial as 'Code (from the module)'. But I don't know where the module is. If I try to use other pieces of code from earlier examples as finger.py I invariably get something like: File "organized-finger.tac", line 13, in ? f = finger.FingerService('/etc/users') exceptions.AttributeError: 'module' object has no attribute 'FingerService' Another thing is the configuration and packaging. The tutorial wants to do: mktap finger --file=/etc/users --ircnick=fingerbot but that throws me Deprecated fatal errors. BTW I am using the official twisted production version 2.4.0. From the subversion version I understand that mktap will cease to exist, but for the moment I am stuck in the last step to complete the example 'correct' application, and start my own work from there. So what am I doing wrong here? Thanks Ron

Never mind my previous question... Oh gee, I totally missed that I had to create a subdirectory with __init__.py (which was a copy of finger.py), and other files in it as well. Didn't get that at all. Now everything really works. Thanks anyway.. Ron Ron Arts schreef:

On Thu, 26 Oct 2006 23:42:15 +0200, Ron Arts <ron.arts@netland.nl> wrote:
Hi,
Hi. It seems you figured out what was blocking you, but I'd like to clarify a few points anyhow.
Twisted doesn't have very good wxPython integration, actually. It has _something_; whether or not it works varies a lot, and the level of support likely to be available for it is minimal.
A Deprecation _Warning_ is what gets written to stderr. This doesn't prevent anything from working, it's just a a warning that the _later_ the functionality will probably be removed. This generally means you have at least one release (generally more like two, sometimes 10 or 20) to stop using the functionality. It is _not_ fatal.
From the subversion version I understand that mktap will cease to exist,
Perhaps someday, but mktap itself isn't even deprecated yet. The finger tutorial uses the deprecated plugin system, and that's where the warning is coming from. mktap itself still loads plugins from the old system because the old system is still only deprecated, not removed. Jean-Paul

Jean-Paul Calderone schreef:
Okay, thanks for clarifying. Is is possible to just integrate a Twisted client in a wxPython program? I need to connect lots of GUI clients to a twisted server, and both sides need to send/receive asynchronously over that connection. I could do that with plain wxPython, but I also would prefer SSL over that connection, and probably also support a separate PB connection. Do you think this would be possible currently? Ron -- Netland Internet Services BV bedrijfsmatige internetoplossingen http://www.netland.nl Kruislaan 419 1098 VA Amsterdam info: 020-5628282 servicedesk: 020-5628282 fax: 020-5628281 KvK Amsterdam 33253286 Op dit bericht is de volgende disclaimer van toepassing: http://www.netland.nl/maildisclaimer People who live in stone houses shouldn't throw glasses.

On Fri, 27 Oct 2006 11:05:08 +0200, Ron Arts <ron.arts@netland.nl> wrote:
I don't really know. It may be possible. I am not familiar enough with wxPython to say either way. From my observations of the attempts made by others, but with Twisted and without Twisted, I would try to avoid developing anything with wxPython. Jean-Paul

I wouldn't discount Twisted and wxPython altogether... Doesn't Chandler use this combination? http://chandler.osafoundation.org/ I did a lot of looking around and couldn't find anything else as rich, native-looking, cross platform (linux/mac/windows) and free (for commercial use also). Although there was some discussion earlier about the stability and future of the wx reactor, at least as anecdotal evidence I have been able to use wxPython with Twisted and PB without any problems. What exactly would you suggest as a replacement for wxPython then? Robert

Never mind my previous question... Oh gee, I totally missed that I had to create a subdirectory with __init__.py (which was a copy of finger.py), and other files in it as well. Didn't get that at all. Now everything really works. Thanks anyway.. Ron Ron Arts schreef:

On Thu, 26 Oct 2006 23:42:15 +0200, Ron Arts <ron.arts@netland.nl> wrote:
Hi,
Hi. It seems you figured out what was blocking you, but I'd like to clarify a few points anyhow.
Twisted doesn't have very good wxPython integration, actually. It has _something_; whether or not it works varies a lot, and the level of support likely to be available for it is minimal.
A Deprecation _Warning_ is what gets written to stderr. This doesn't prevent anything from working, it's just a a warning that the _later_ the functionality will probably be removed. This generally means you have at least one release (generally more like two, sometimes 10 or 20) to stop using the functionality. It is _not_ fatal.
From the subversion version I understand that mktap will cease to exist,
Perhaps someday, but mktap itself isn't even deprecated yet. The finger tutorial uses the deprecated plugin system, and that's where the warning is coming from. mktap itself still loads plugins from the old system because the old system is still only deprecated, not removed. Jean-Paul

Jean-Paul Calderone schreef:
Okay, thanks for clarifying. Is is possible to just integrate a Twisted client in a wxPython program? I need to connect lots of GUI clients to a twisted server, and both sides need to send/receive asynchronously over that connection. I could do that with plain wxPython, but I also would prefer SSL over that connection, and probably also support a separate PB connection. Do you think this would be possible currently? Ron -- Netland Internet Services BV bedrijfsmatige internetoplossingen http://www.netland.nl Kruislaan 419 1098 VA Amsterdam info: 020-5628282 servicedesk: 020-5628282 fax: 020-5628281 KvK Amsterdam 33253286 Op dit bericht is de volgende disclaimer van toepassing: http://www.netland.nl/maildisclaimer People who live in stone houses shouldn't throw glasses.

On Fri, 27 Oct 2006 11:05:08 +0200, Ron Arts <ron.arts@netland.nl> wrote:
I don't really know. It may be possible. I am not familiar enough with wxPython to say either way. From my observations of the attempts made by others, but with Twisted and without Twisted, I would try to avoid developing anything with wxPython. Jean-Paul

I wouldn't discount Twisted and wxPython altogether... Doesn't Chandler use this combination? http://chandler.osafoundation.org/ I did a lot of looking around and couldn't find anything else as rich, native-looking, cross platform (linux/mac/windows) and free (for commercial use also). Although there was some discussion earlier about the stability and future of the wx reactor, at least as anecdotal evidence I have been able to use wxPython with Twisted and PB without any problems. What exactly would you suggest as a replacement for wxPython then? Robert
participants (3)
-
Jean-Paul Calderone
-
Robert Gravina
-
Ron Arts