Don't feed the troll.
--
http://mail.python.org/mailman/listinfo/python-list
On Nov 25, 4:34 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
>
> You can't use ctypes for C++, only for C-style APIs.
>
> Diez
With some work, you can convert your C++ objects to PyObject* and then
return the latter in a function with C bindings.
--
http://mail.python.org/mailman/listinfo/pyt
On Nov 25, 5:05 pm, peter <[EMAIL PROTECTED]> wrote:
> BUT you now can do
>
> >>> p = print
> >>> p("f")
>
> Voila, 4 keystrokes saved :-)
All right. Let's talk about that.
When I write "print", it is both effortless and instantaneous : my
hands do not move, a wave goes through my fingers, it all
On Nov 25, 4:53 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> I used to use print a lot. Once I found
>
> import pdb; pdb.set_trace()
>
> I massively lost interest in it. And gained *much* more debugging
> power/productivity.
In some cases, this is not discriminatory enough : there are simpl
I want my productivity back.
In Python 2.x, I could easily write things like -- print "f" / print
"add" / print "done" -- to a lot of different places in my code, which
allowed me to find bugs that I could not track otherwise. When I found
out that "f" was not at fault, I could write -- print "g"
I filed a bug report, and here is the short answer to my question:
genexps are code blocks, and code blocks cannot see variables in class
scopes. Congrats to Neil Cerutti who figured it out.
Now here is another one for your enjoyment:
class C:
@staticmethod
def f1(): pass
>
> You cannot access a class's class variables in it's class-statement
> scope, since the name of the type is not bound until after the class
> statement is completed.
>
Thanks for the answer, but then why is there no error with the
variable 'TYPES'? This one is accessed first...
--
http://mail.
On Jan 17, 4:14 pm, [EMAIL PROTECTED] wrote:
>
> Do not use those names...really poor choice...
This is not the way it looks it my code. I simplified it, with generic
names, in order to point out something that does not work... The only
question here is why?
--
http://mail.python.org/mailman/list
Hello all,
For some reason, the following does not work :
class C:
TYPES = [None]
DICT = {}
for Type in TYPES:
DICT.update((E,Type) for E in [1])
>>> NameError: global name 'Type' is not defined
What do you think? Is this a bug?
--
http://mail.python.org/mailman/listinfo/p
On Dec 5, 12:18 am, Rod Person <[EMAIL PROTECTED]> wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> I've been doing python programming for about 2 years as a hobby and now
> I'm finally able to use it at work in an enterprise environment. Since
> I will be creating the base classes and
One way is to create an intermediate python function, which returns a
special value when an exception is caught.
def ExceptionCatcher(FunctionToCall):
def F():
try: FunctionToCall()
except: return -1
return 0
return F
Then instead of calling your function, you woul
I wonder whether the following be more efficient if DB was a
dictionnary:
Splits = (line.split(' ') for line in open('file.text', 'r'))
DB = dict([(S[0], S[-1]) for S in Splits])
--
http://mail.python.org/mailman/listinfo/python-list
On Mar 9, 7:04 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> Hi Everyone,
>
> I'm considering about generating some Python Bindings for C++
> libraries. What are considered the best tools for doing something like
> this? I know that there are SWIG, SIP, Boost.Python, and GCC_XML.
>
> Thanks!
You don't necessarily need an OpenGL wrapper like PyOpenGL. If you
only use a handful of OpenGL functions, it would be relatively
straight-forward to make your own, using ctypes.
Here is what it would look like:
from ctypes import cdll, windll, c_double, c_float, c_int
GL_POINTS = 0x
Sorry, I think all you want is "wxPython-newdocs", which is the
wxPython-specific documentation.
--
http://mail.python.org/mailman/listinfo/python-list
Go to:
http://wxpython.org/download.php#binaries
and in the documentation part, download both "wxPython-docs" and
"wxPython-newdocs".
Hope this helps.
--
http://mail.python.org/mailman/listinfo/python-list
Hello all,
The following triggers an "access violation" error, why?
pPyType = (PyTypeObject*)malloc(sizeof(PyTypeObject));
memset(pPyType, 0, sizeof(PyTypeObject));
pPyType->ob_refcnt= 1;
pPyType->tp_name = "noname";
17 matches
Mail list logo