I found what I was after, right after I posted to this list. It's
Py_AtExit. I'm accessing an old, unsupported database using it's C
API. I've tried using Cython but found it hard to get my head around
and I'm finding it somewhat easier to just write by hand.
On Mon, Jan 18, 2010 at 6:40 PM, Stefa
Hi,
What would be an atexit equivalent for a C extension module? When my
extension module is unloaded, I would like some clean up functions to
be called from an external c library. I've had a look at the C
extension guide but I can't find anything like that,
Thanks in advance,
.S
Hi,
I'm having problems understanding some code I came across:
class Singleton:
__single = None
def __init__( self ):
if Singleton.__single:
raise Singleton.__single
Singleton.__single = self
What does passing self to Singleton.__single do?
--Shuying
Hi,
That's more or less what I want. Thanks! Now I just need to figure out
metaclasses and poke around python's innards. :D
--Shuying
On 1/30/06, Danny Yoo <[EMAIL PROTECTED]> wrote:
> It's an somewhat low-level detail that the attributes of a class instance
> can be accessed through a special _
Hi,
So I've got a class X with instance variables a, b, c. Is there any
way of creating a dictionary of these instance variables besides the
no-brainer way of doing dictionary = {'a' : X.a, 'b' : X.b, 'c' : X.c}
?
--Shuying
___
Tutor maillist - Tutor@
I'm guessing when you did that, you got something like an IndexError.
That's because you didn't check the length of "a" from raw_input and
accessed a nonexistent array element (a string is an array of
characters). So if you changed the line:
elif a[0] == '-' and a[1:].isdigit():
to :
elif len(a) >
Ben,
If you change example #b to:
for s in SkillNames:
skill = Skill()
skill.setName(s)
print skill.getName()
You will find that the results are the same as #a. In your #b example,
you are giving setName() the skill instance instead of the string you
intended.
--Shuying
On 1/19/06, Be
I'm not sure what you're trying to do. But I run cgi scripts and make
xmlrpc requests with xmlrpclib with a connection with
xmlrpclib.Server(server_uri), though I'm only doing this client side.
I'm not running the server as cgi.
On 6/23/05, Ron Phillips <[EMAIL PROTECTED]> wrote:
>
> I believe I
Hi tutors,
I've got an external program that I'm calling from python with
os.popen. The problem is that I need to pass this program an arbitrary
body of text. I've tried escaping characters before passing it as
input but the shell still expands out certain characters. I noticed
with python2.4. How
Hi,
Can anyone recommend a library that will let me call perl functions
from python? I have a python dictionary that I would like to convert
to a perl hash for some function.
cheers,
Shuying
___
Tutor maillist - Tutor@python.org
http://mail.python.org
10 matches
Mail list logo