MethodDef is one simple line
Bottomline: you need 5 additional lines of C code per procedure to
make it usable from Python.
Unless you have hundreds of procedures, there is no point in using
special tools to do that. Especially if you need full control over the
results.
regards,
Filip Dreger
lowing you to use all the
names without "wx.". If you change "from something import *" to
"import something", your code will always break, this is normal.
regards,
Filip Dreger
--
http://mail.python.org/mailman/listinfo/python-list
e, probably something like:
c:
cd \
python24\python -OO)
and then import your example.py, you will get a file example.pyo,
which is also stripped of any documentation strings (a bit harder to
decode).
regards,
Filip Dreger
--
http://mail.python.org/mailman/listinfo/python-list
Uzytkownik "Steven Bethard" <[EMAIL PROTECTED]> napisal w
wiadomosci news:[EMAIL PROTECTED]
> Any reason you can't define it like:
>
> class actor(object):
> def __init__(self):
> self.roles = []
> def act(self):
> for role_func in self.roles:
> role_func(self)
is also
the case here :-).
> But I'd have to know what your real use case is to tell you whether
> or not this is worth the trouble. Why do you want to exec the
> func_code anyway? Why can't you just call the function?
I put the description in the other post. Perhaps it's jkust my design
that's broken.
Thanks again.
regards,
Filip Dreger
--
http://mail.python.org/mailman/listinfo/python-list
Uzytkownik "Steven Bethard" <[EMAIL PROTECTED]> napisal w
wiadomosci news:[EMAIL PROTECTED]
> Filip Dreger wrote:
>> I am trying to find a way of executing functions without creating a
>> nested scope, so they can share local and global namespace (even if
>
ey can share local and global namespace (even if
they are declared in some other module). I _could_ turn them into
strings and pass around as compiled objects, butthis would be very
ugly. I am sure Python has some better, cleaner way to do this.
regards,
Filip Dreger
--
http://mail.python.org/mailman/listinfo/python-list
i=foo()
i.checkstring()
i.checkfunction() # this throws exception; why???
4. I try to find some help here, and hope to also gain better
undesrtanding of how Python works :-)
Thanks for any suggestions,
regards,
Filip Dreger
--
http://mail.python.org/mailman/listinfo/python-list