twisted.web and a

F

Fabian Steiner

Hello!

I am currently working on a quite complicated application (at least for
me) and unfortunately I don't know how to go on.

I wrapped a Windows-dll by using the ctypes module so that I can access
different functions that are used to control a network device (open,
close, write/read values). Now I was asked to write something like a GUI
for it which should be based on a CGI script that calls the different
functions (read/write) with parameters entered in a text-input of a
HTML-Template.
Therefore I wrote a small HTTP-Server class based on twisted.web. In its
constructor the network device is opened (--> the wrapper class is
initiated) and is closed by the server's destructor. Now I need the same
wrapper class instance in my CGI script so that read() and write() can
be called on exactly the same instance - otherwise these methods would
fail since the network device hasn't been opened so far.

Do you have any idea how to solve this problem? I am looking forward to
any responses.

Cheers,
Fabian
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,292
Messages
2,571,494
Members
48,178
Latest member
SusanaHam4

Latest Threads

Top