Hello,
I wonder if I am encountering a bug in ctypes; or if I am doing things
wrong? I have written a small Python class wrapping a C library, the
Python class has a from_param() method which passes a raw pointer
value from Python to C. When reaching C the pointer has been
truncated to 32 bits.
Thanks for answering;
I rarely use ctypes
You should :-) Apart from my current struggle I think ctypes is really
good.
and I actually don't know how this specific case works.
However, you are not providing a function signature for the print_addr C
function in the BugTest case, so my guess
Ok, then take care to post proper code next time. Details can be important,
especially when asking about non-obvious problems.
Point taken - however the original context where the problem arose
consists of several massive libraries, which would be quite
impractical to post on a forum. The code
On 18 Feb, 10:55, Stefan Krah stefan-use...@bytereef.org wrote:
Joakim Hove joakim.h...@gmail.com wrote:
and I actually don't know how this specific case works.
However, you are not providing a function signature for the print_addr C
function in the BugTest case, so my guess
to protect the Container instance from beeing garbage
collected?
I thought maybe the get_node() function should have something like a
incref() call, and the Node.__del__() function a corresponding
decref()? Or ??
Regards
Joakim Hove
--
http://mail.python.org/mailman/listinfo/python-list
I'd add an __owner field to the node, initialised with the owning
container instance.
I will - thank you!
Joakim
--
http://mail.python.org/mailman/listinfo/python-list
Hello,
I am having great problems writing norwegian characters æøå to file
from a python application. My (simplified) scenario is as follows:
1. I have a web form where the user can enter his name.
2. I use the cgi module module to get to the input from the user:
name =
Hello,
is it possible in python to include another python source file into the
current namespace, i.e.completely analogous to the #include statement
in C.
Regards Joakim
--
http://mail.python.org/mailman/listinfo/python-list
Thanks to all who took time to answer!
is it possible in python to include another python source file into the
current namespace, i.e.completely analogous to the #include statement
in C.
[...]
Tell us why you are contemplating such a thing, and someone
here will help you implement it
macros as:
log_msg(msg , __FILE__ , __LINE__)
Is there a way to emulate this behaviour in Python?
Best Regards
Joakim Hove
[1]: It is not *that* simple, but you get the point.
--
Joakim Hove
hove AT ntnu.no/
Tlf: +47 (73 5)9 34 27/ Stabburveien
Maric Michaud [EMAIL PROTECTED] writes:
Sure, try :
In [46]: import inspect
In [47]: c=inspect.currentframe()
In [48]: c.f_lineno
Out[48]: 1
In [49]: c.f_code.co_filename
Out[49]: 'ipython console'
Thanks a lot - that was just what I wanted.
Regards - Joakim
--
Joakim Hove
hove
))
fileH.close()
This bombs with:
UnicodeEncodeError: 'ascii' codec can't encode character u'\xc5' in
position 45: ordinal not in range(128)
The variable 'ref' returned from the SOAP interaction is (seemingly
...) pure 7bit ascii.
Any suggestions greatly appreciated.
Joakim Hove
--
Joakim
Hove
--
Joakim Hove
hove AT ntnu.no/
Tlf: +47 (55 5)8 27 13/ Stabburveien 18
Fax: +47 (55 5)8 94 40 / N-5231 Paradis
http://www.ift.uib.no/~hove// 55 91 28 18 / 92 68 57 04
--
http://mail.python.org/mailman
13 matches
Mail list logo