My top priority is stability of the interpreter. With that in mind
which version should I get: 2.4.4, 2.3.6
or something else.
I will be using gcc 2.3.2(x86), 3.3(arm) and 3.4.3(arm) to cross
compile it depending on the (embedded) platform.
Thank you.
--
http://mail.python.org/mailman/listinfo/
configure expands
AC_DEFINE(_POSIX_C_SOURCE, 200112L, Define to activate features from
IEEE Stds 1003.1-2001)
to
#define _POSIX_C_SOURCE 200112L
that causes problems because _POSIX_C_SOURCE is defined by system
headers and I get hideous
warnings during compilation.
I tried to fix it by adding
i'm struggling to get some proxy code working with liburl[2] and want
to print
some tracebacks in my class ProxyHTTPConnection::request().
do i have to force an exception and print a backtrace in catch or
can i just print the current stack?
print_tb takes an argument and short of forcing an excepti
Krypto wrote:
> Hi,
>
> I have used Python for a couple of projects last year and I found it
> extremely useful. I could write two middle size projects in 2-3 months
> (part time). Right now I am a bit rusty and trying to catch up again
> with Python.
>
> I am now appearing for Job Interviews thes
suppose i have imported two modules foo and bar with
foo=PyImport_ImportModule("foo") and bar=PyImport_ImportModule("bar")
respectively.
Now suppose I have an artitrary python expression to evaluate.
Do I need to parse that thring and check for foo. and bar. before
jumping the usual
PyModule_GetDi
On Oct 30, 1:26 pm, Farshid Lashkari <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > suppose i have imported two modules foo and bar with
> > foo=PyImport_ImportModule("foo") and bar=PyImport_ImportModule("bar")
> > respectively.
>
> > Now suppose I have an artitrary python expression to
On Oct 30, 6:47 pm, Farshid Lashkari <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > i switched to PyImport_ImportModuleEx per your suggestion but i still
> > get
>
> > Traceback (most recent call last):
> > File "", line 1, in ?
> > NameError: name '__main__' is not defined
>
> > i tri
On Oct 30, 3:25 pm, chewie54 <[EMAIL PROTECTED]> wrote:
> Hello,
>
> As an electronics engineer I use some very expensive EDA CAD tool
> programs that are scriptable using Tcl. I was wondering why these
> companies have choose to use Tcl instead of Python. Some of these
> are:
>
>Mentor Grap
i checked this:
http://svn.python.org/projects/python/trunk/Doc/data/refcounts.dat
and it seems that
PyDict_SetItem incref the value being added and the key
and PyDict_DelItem does not decrement any refcounts
so i have to do so manually for the key and for the data( by calling
PyDict_GetItem first
q#1:
in C I want to check if a given PyObject is a xml.dom.minidom.Node (or
a derivative).
how do i extract a PyTypeObject for such a class?
issue #2
I'm in a situation when i don't really need to extend python with any
classes of my own but
i do have extra luggage for the python data structures s
On Nov 1, 4:14 pm, [EMAIL PROTECTED] wrote:
> q#1:
> in C I want to check if a given PyObject is a xml.dom.minidom.Node (or
> a derivative).
> how do i extract a PyTypeObject for such a class?
nevermind, i found an instance object that will work for me
as long as i figure out where is the document
How could I get the pointer to and the length of ucs2 array out of a
PyObject representing
a string? Something that works whether PyObject string is in unicode or
not.
Also could I replace a sequence
if(PyBool_Check(obj)) {
...
}
if(PyString_Check(obj)) { // would this be true for any
I want to step into PyImport_ImportModule("my_foo") that's failing
despite the my_foo.py
being in the current directory. (PyRun_SimpleFileEx works on the exact
same file).
How would I run configure to build libpython with -g?
I wonder if I should just keep using PyRun_SimpleFileEx.
I want to be a
Is there a better way to make a call from C than
PyRun_SimpleString("import
foo_in_python\nfoo_in_python.bar(whatever)\n");
?
I already imported the foo_in_python using PyImport_ImportModule
and wonder why do I need to keep importing it every time I'm
calling a python function in that module.
I
suppose i want to
make foo.childNodes[bar] available as foo[bar]
(while still providing access to the printxml/printprettyxml()
functions
and other functionality of dom/minidom instance).
What is a good way to accomplish that?
--
http://mail.python.org/mailman/listinfo/python-list
On Nov 5, 9:40 am, Paul McGuire <[EMAIL PROTECTED]> wrote:
> On Nov 5, 11:32 am, [EMAIL PROTECTED] wrote:
>
> > suppose i want to
> > make foo.childNodes[bar] available as foo[bar]
> > (while still providing access to the printxml/printprettyxml()
> > functions
> > and other functionality of dom/mi
am i allowed to use PyUnicode_Decode or PyUnicode_DecodeUTF8 in my
code
or that is not advisable?
QString s("foo");
// QString::unicode returns garbage unusable for PyUnicode_FromUnicode
PyObject *uo =
PyUnicode_Decode(s.utf8(), s.length(), "utf8", 0);
--
http://mail.
i'm trying to import a module
typeinfo that looks like so:
import xml.dom import minidom
var mapper =
{
minidom.Element.__class__ : "Element",
minidom.Node.__class__ : "Node"
};
then i'd write a factory method that's look roughly like this:
addBaggage(PyObject *victim)
{
PyObject *typeinf
I get this from valgrind (no suppression file but thgis probably is
not covered by the suppressor anyway):
==6108== Invalid read of size 4
==6108==at 0x48D19F4: lookdict_string (dictobject.c:359)
==6108==by 0x48D1B59: PyDict_GetItem (dictobject.c:554)
==6108==by 0x48B1657: instance_geta
i naively created execution context:
PyObject *execcontext = PyDict_New();
stuffed a handle in it:
PyObject *ih = PyCObject_FromVoidPtr(handle, NULL);
int st= PyDict_SetItemString(res, "interp", ih);
and later on in a function for a module that i defined
expected to extract that handle
On Nov 9, 5:36 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote:
> En Tue, 06 Nov 2007 23:25:17 -0300, <[EMAIL PROTECTED]> escribió:
>
> > i naively created execution context:
> > PyObject *execcontext = PyDict_New();
> > stuffed a handle in it:
> > PyObject *ih = PyCObject_FromVoidPtr(han
On Nov 13, 3:31 pm, "Chris Mellon" <[EMAIL PROTECTED]> wrote:
> On Nov 13, 2007 3:18 PM, <[EMAIL PROTECTED]> wrote:
>
> > On Nov 9, 5:36 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote:
> > > En Tue, 06 Nov 2007 23:25:17 -0300, <[EMAIL PROTECTED]> escribió:
>
> > > One should make a lot of assum
On Nov 9, 7:36 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote:
> En Tue, 06 Nov 2007 23:25:17 -0300, <[EMAIL PROTECTED]> escribió:
>
> > i naively created execution context:
> > PyObject *execcontext = PyDict_New();
> > stuffed a handle in it:
> > PyObject *ih = PyCObject_FromVoidPtr(han
On Nov 13, 3:31 pm, "Chris Mellon" <[EMAIL PROTECTED]> wrote:
> On Nov 13, 2007 3:18 PM, <[EMAIL PROTECTED]> wrote:
>
> > On Nov 9, 5:36 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote:
> > > En Tue, 06 Nov 2007 23:25:17 -0300, <[EMAIL PROTECTED]> escribió:
>
> > > One should make a lot of assum
On Nov 14, 12:57 am, "Gabriel Genellina" <[EMAIL PROTECTED]>
wrote:
> En Tue, 13 Nov 2007 19:59:56 -0300, <[EMAIL PROTECTED]> escribió:
>
> > working on a smaller example. i could not get pyNode_root invoked yet
> > and
> > PyRun_String("import node\nprint node.root()\n",
> > Py_fi
I have a weid problem. If i do this:
import elementtree.ElementTree as ET
...
tree = ET.parse("whatever")
root = tree.getroot()
r = root.find('last')
print r
return root
where last is not an immediate child of root node i get back None.
However if i comment the r = root.find('la
i extract class object from an instance of NodeList (minicompat.py)
like so
PyObject *pclass = PyObject_GetAttrString( nodelistinsance,
"__class__");
but
PyObject_GetAttrString(pclass, "__len__")
returns NULL.
i naively added
__len__ = _get_length
to NodeList
but that ends up in endless r
On Nov 15, 3:09 am, Hrvoje Niksic <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] writes:
> > i extract class object from an instance of NodeList (minicompat.py)
> > like so
> > PyObject *pclass = PyObject_GetAttrString( nodelistinsance,
> > "__class__");
> > but
> > PyObject_GetAttrString(pclass,
On Nov 1, 11:04 pm, "Gabriel Genellina" <[EMAIL PROTECTED]>
wrote:
> En Thu, 01 Nov 2007 22:13:35 -0300, <[EMAIL PROTECTED]> escribió:
>
> > On Nov 1, 4:14 pm, [EMAIL PROTECTED] wrote:
> >> q#1:
> >> in C I want to check if a given PyObject is a xml.dom.minidom.Node (or
> >> a derivative).
> >> how
On Nov 15, 10:00 pm, "Gabriel Genellina" <[EMAIL PROTECTED]>
wrote:
> En Fri, 16 Nov 2007 00:27:42 -0300, <[EMAIL PROTECTED]> escribió:
>
>
>
> > On Nov 1, 11:04 pm, "Gabriel Genellina" <[EMAIL PROTECTED]>
> > wrote:
> >> En Thu, 01 Nov 2007 22:13:35 -0300, <[EMAIL PROTECTED]> escribió:
> >> >> I'm
what's the equivalent of minidom's getElementsByTagName in ElementTree?
--
http://mail.python.org/mailman/listinfo/python-list
On Nov 17, 11:32 pm, 7stud <[EMAIL PROTECTED]> wrote:
> According to "Python in a Nutshell(2nd)", p. 523:
>
> connect: s.connect((host, port))
> ...
> Blocks until the server accepts or rejects the connection attempt.
>
> However, my client program ends immediately after the call to
> connect()--
On Nov 20, 3:27 am, "Borse, Ganesh" <[EMAIL PROTECTED]>
wrote:
> Hi,
>
> My following code is failing with an error of "isSizeSmall not function or
> callable"
>
> //---
> char szExpr[2048];
> memset(szExpr,'\0',sizeof(szExpr));
> sprintf(szExpr,"def
I found nothing better to do than to start a new thread from c and run
twisted event loop there.
my question is: how can i safely call client.getPage() from another
thread? could i?
i have compiled python without threading support and am wondering what
the repercussions will be
(i don't want to en
i have a lot of trouble selling twisted a a client lib for network
access
(on embedded platform)
the group i'm a member of wants to write some
unmaintainable threaded blocking junk in c--.
does anyone can give me an idea how many kilobytes extra would it take
to have a pyqt linked in and a running
I'm trying to import foo.bar in order not to add every single
directory with python files to the search path.
i immediately follow the import with the PyModule_AddObject call to
put the imported module
to __main__ module
but later on PyEval_EvalCode on Py_CompileString compiled code
"foo.bar.baz()
PyXML seems to be long gone. Is lxml the way to go if i want to have
xpath supported?
--
http://mail.python.org/mailman/listinfo/python-list
37 matches
Mail list logo