Re: newbie questions
Phil,
Just simply change
ok = c_func (OpenZipFile, ZipFile)
to
ok = c_func (OpenZipFile, {ZipFile})
In the first case, ZipFile is a sequence (in this case a string) which
happens to be composed of thirteen atoms (in this case characters). The
c_func() function expects a sequence having the parameters to be passed as
the elements. The way you had it originally, the string is broken into its
13 individual characters, which c_func() attempts to pass as 13 parameters.
Enclosing Zipfile in curly braces makes a sequence with one element
(ZipFile), which c_func() with then pass as the single parameter.
This error is very common--I've done it a hundred times myself.
-- Mike Nelson
|
Not Categorized, Please Help
|
|