[Twisted-Python] Porting twisted methods to a synchronous environment

Don Dwiggins ddwiggins at advpubtech.com
Mon Jan 24 12:26:54 MST 2011


I have a server that provides access to a database in the usual way, 
using adbapi to talk to an MSSQL server.  Now, I'm facing the need to 
create an application that can access the server directly.  (In addition 
to, not instead of.)

In the spirit of "write it once", I'd like to be able to "import" the 
server's database read/write methods into a module in the application, 
possibly driven by a reactor of some sort.  In this case, there'd be no 
client/server protocol, just calls from other modules in the application.

I realize that this is pretty vague; I'm still in the process of 
conceptualizing it.  I'm looking for any advice that might help avoid 
the all-too-obvious approach of copying code and performing surgery on 
it, with the all-too-well-known drawbacks.

Thanks for any good words,

-- 

Don Dwiggins
Advanced Publishing Technology






More information about the Twisted-Python mailing list