Fredrik Lundh a écrit :
Bruno Desthuilliers wrote:
from functools import partial
callback = partial(some_func, x=1, y)
callback(z, t=4, u)
>>> from functools import partial
>>> callback = partial(some_func, x=1, y)
File "", line 1
SyntaxError: non-keyword arg after keyword arg
Yeps, I
Bruno Desthuilliers a écrit :
Alexandru Mosoi a écrit :
does anyone know a nice implementation of callbacks in python? i have
issues mixing named & unamed parameters. i want build a callback over
a function such that some parameters are passed when callback is
created and the rest are pa
Bruno Desthuilliers wrote:
from functools import partial
callback = partial(some_func, x=1, y)
callback(z, t=4, u)
>>> from functools import partial
>>> callback = partial(some_func, x=1, y)
File "", line 1
SyntaxError: non-keyword arg after keyword arg
--
http://mail.python.org/mailman/li
Alexandru Mosoi a écrit :
does anyone know a nice implementation of callbacks in python? i have
issues mixing named & unamed parameters. i want build a callback over
a function such that some parameters are passed when callback is
created and the rest are passed when the function is ca
Alexandru Mosoi wrote:
On Aug 14, 12:02 am, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
your use of the word "callback" is a bit unusual, and your example isn't
valid Python code, but it looks as if functools.partial might be what
you need:
http://docs.python.org/lib/module-functools.html
m
On Aug 14, 12:02 am, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> your use of the word "callback" is a bit unusual, and your example isn't
> valid Python code, but it looks as if functools.partial might be what
> you need:
>
> http://docs.python.org/lib/module-functools.html
my current implemen
Alexandru Mosoi wrote:
does anyone know a nice implementation of callbacks in python? i have
issues mixing named & unamed parameters. i want build a callback over
a function such that some parameters are passed when callback is
created and the rest are passed when the function is ca
Alexandru Mosoi wrote:
does anyone know a nice implementation of callbacks in python? i have
issues mixing named & unamed parameters. i want build a callback over
a function such that some parameters are passed when callback is
created and the rest are passed when the function is ca
does anyone know a nice implementation of callbacks in python? i have
issues mixing named & unamed parameters. i want build a callback over
a function such that some parameters are passed when callback is
created and the rest are passed when the function is called.
example:
callback = Call
One final note, The code posted does work. Unfortunately, the event
only fires for the ADO connection who actually triggered the event. In
my opinion, completely useless event. So the Python worked, The ADO
does not do what its name implies. Thanks to all. Dan
--
http://mail.python.org/mailman/li
Ok, seems to fire at least once now, had to implement
OnWillChangeRecordset as well. Definitely don't have to implement all
the events though. Still not sure why its not acting like it should.
Maybe I am looking at the wrong event? I want to know if the database
has changed when someone else enters
Looked at the makepy, code now looks like this:
import win32com.client
import win32gui
import time
import pythoncom
finished = 0
defaultNamedNotOptArg=pythoncom.Empty
class ADOEvents:
def OnRecordsetChangeComplete(self,
adReason=defaultNamedNotOptArg,
pError=defaultNamedNotOptArg,
"Dan" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
>I need to register for a COM callback under Windows. I am using an ADO
> recordset interface like this:
>
> import win32com.client
> import time
> connect = win32com.client.Dispatch("ADODB.Connection")
> recordset = win32com.clien
I need to register for a COM callback under Windows. I am using an ADO
recordset interface like this:
import win32com.client
import time
connect = win32com.client.Dispatch("ADODB.Connection")
recordset = win32com.client.Dispatch("ADODB.Recordset")
connect.Open("Driver={SQLServer};Server=devserver
14 matches
Mail list logo