Thank you so much :)

Been trying for ages to figure that out on my own - works like a dream
now.

Recent convert to python from perl. web2py automates a LOT of things I
used to do very manually.

I think this is going to be a big hit.


On Sep 10, 9:08 am, mdipierro <mdipie...@cs.depaul.edu> wrote:
> I would put the code below in a module in web2py/ and from the module
> import serv in your apps.
>
> On Sep 10, 7:16 am, tvw <surftas...@gmail.com> wrote:
>
> > Hi,
> >     I've been trying to usewin32comwith web2py to get data from an
> > external process. I have been using the following in a controller for
> > my app (default.py)
>
> > importwin32com.client
> > serv =win32com.client.Dispatch("MyService")
>
> > Once I installed web2py source this worked fine, however sometimes it
> > seems to try to create a second instance of the com connection to my
> > service which then fails (in another thread ?) as only one can exist
> > at a time.
>
> > I would like to create only one instance of the com connection when
> > web2py starts and then share that with all applications. My question
> > is where should I put the above lines in web2py so that the com
> > connection is shared between apps and how should the instance be
> > referenced from each app.
>
> > I hope I have made sense here. Please let me know if anyone can help.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to