Re: Issue sending data from C++ to Python

2022-05-19 Thread Dieter Maurer
Pablo Martinez Ulloa wrote at 2022-5-18 15:08 +0100: >I have been using your C++ Python API, in order to establish a bridge from >C++ to Python. Do you know `cython`? It can help very much in the implementation of bridges between Python and C/C++. -- https://mail.python.org/mailman/li

Re: Issue sending data from C++ to Python

2022-05-18 Thread Christian Gollwitzer
Am 18.05.22 um 16:08 schrieb Pablo Martinez Ulloa: I have been using your C++ Python API, in order to establish a bridge from C++ to Python. We want to do this, as we have a tactile sensor, which only has a library developed in C++, but we want to obtain the data in real time in Python to

Re: Issue sending data from C++ to Python

2022-05-18 Thread MRAB
On 2022-05-18 15:08, Pablo Martinez Ulloa wrote: Hello, I have been using your C++ Python API, in order to establish a bridge from C++ to Python. We want to do this, as we have a tactile sensor, which only has a library developed in C++, but we want to obtain the data in real time in Python to

Issue sending data from C++ to Python

2022-05-18 Thread Pablo Martinez Ulloa
Hello, I have been using your C++ Python API, in order to establish a bridge from C++ to Python. We want to do this, as we have a tactile sensor, which only has a library developed in C++, but we want to obtain the data in real time in Python to perform tests with a robotic arm and gripper. The

Re: how to create an external string when binding C to Python?

2014-05-08 Thread Ian Kelly
On Thu, May 8, 2014 at 5:10 PM, Simon wrote: > I'd like to make a C memory buffer available inside Python via the Python > C/API without copying that memory into Python. How to do this? I've read [1] > but it's not clear that this functionality exists. In javascript it's > possible using String

Re: how to create an external string when binding C to Python?

2014-05-08 Thread Mark Lawrence
On 09/05/2014 00:10, Simon wrote: I'd like to make a C memory buffer available inside Python via the Python C/API without copying that memory into Python. How to do this? I've read [1] but it's not clear that this functionality exists. In javascript it's possible using String::NewExternal() [2

how to create a zero copy external string when binding C to Python?

2014-05-08 Thread Simon
I'd like to make a C memory buffer available inside Python via the Python C/API without copying that memory into Python. How to do this? I've read [1] but it's not clear that this functionality exists. In javascript it's possible using String::NewExternal() [2]. "Creates a new external string u

how to create an external string when binding C to Python?

2014-05-08 Thread Simon
I'd like to make a C memory buffer available inside Python via the Python C/API without copying that memory into Python. How to do this? I've read [1] but it's not clear that this functionality exists. In javascript it's possible using String::NewExternal() [2]. "Creates a new external string u

Re: C++ to python for LED Matrix

2014-02-01 Thread Michael Torrie
Yes you could use Python for this sort of thing. The link you posted is just using a kernel spi driver that Python can write to just as well as C++ can (via it's /dev/spidev0.0 file). There is a python library that can talk to SPI in Python on the pi: http://www.100randomtasks.com/simple-spi-on-

C++ to python for LED Matrix

2014-02-01 Thread Liam Knott
Hey folks, So the last week or so I've been searching this site for information on how to control and program a LED Matrix (or a number of them) for a project. A few Topics have caught my eye, with me originally having in mind using a Maxim MAX7221 to control the matrix, but none more than Klaa

Re: Porting the 2-3 heap data-structure library from C to Python

2012-03-10 Thread Stefan Behnel
Hrvoje Niksic, 11.03.2012 02:03: > Stefan Behnel writes: >>> which is the standard way of extending Python with high-performance >>> (and/or system-specific) C code. >> >> Well, it's *one* way. Certainly not the easiest way, neither the most >> portable and you'll have a hard time making it the fa

Re: Porting the 2-3 heap data-structure library from C to Python

2012-03-10 Thread Terry Reedy
On 3/10/2012 8:03 PM, Hrvoje Niksic wrote: Stefan Behnel writes: which is the standard way of extending Python with high-performance (and/or system-specific) C code. Well, it's *one* way. Certainly not the easiest way, neither the most portable and you'll have a hard time making it the fast

Re: Porting the 2-3 heap data-structure library from C to Python

2012-03-10 Thread Hrvoje Niksic
Stefan Behnel writes: >> which is the standard way of extending Python with high-performance >> (and/or system-specific) C code. > > Well, it's *one* way. Certainly not the easiest way, neither the most > portable and you'll have a hard time making it the fastest. I didn't say it was easy, but

Re: Porting the 2-3 heap data-structure library from C to Python

2012-03-07 Thread Stefan Behnel
Hrvoje Niksic, 07.03.2012 16:48: > Alec Taylor writes: > >> The source-code used has been made available: >> http://www.cosc.canterbury.ac.nz/research/RG/alg/ttheap.h >> http://www.cosc.canterbury.ac.nz/research/RG/alg/ttheap.c >> >> I plan on wrapping it in a class. > > You should get acquainted

Re: Porting the 2-3 heap data-structure library from C to Python

2012-03-07 Thread Hrvoje Niksic
Alec Taylor writes: > The source-code used has been made available: > http://www.cosc.canterbury.ac.nz/research/RG/alg/ttheap.h > http://www.cosc.canterbury.ac.nz/research/RG/alg/ttheap.c > > I plan on wrapping it in a class. You should get acquainted with the Python/C API, which is the standard

Re: Porting the 2-3 heap data-structure library from C to Python

2012-03-07 Thread Stefan Behnel
m/2009/01/25/calling-c-functions-inside-python/) > and it seems to work, but this might not be the recommended method. > > Any best practices for how best to wrap the 2-3 heap data-structure > from C to Python? For data structures, where performance tends to matter, it's usuall

Porting the 2-3 heap data-structure library from C to Python

2012-03-07 Thread Alec Taylor
recommended method. Any best practices for how best to wrap the 2-3 heap data-structure from C to Python? Thanks for all suggestions, Alec Taylor -- http://mail.python.org/mailman/listinfo/python-list

Re: Round Trip: C to Python to C Module

2010-11-22 Thread bobicanprogram
On Nov 19, 11:05 am, Eric Frederich wrote: > I have a proprietary software PropSoft that I need to extend. > They support extensions written in C that can link against PropLib to > interact with the system. > > I have a Python C module that wraps a couple PropLib functions that I > call PyProp.>Fr

Re: Round Trip: C to Python to C Module

2010-11-19 Thread Diez B. Roggisch
Eric Frederich writes: > I have a proprietary software PropSoft that I need to extend. > They support extensions written in C that can link against PropLib to > interact with the system. > > I have a Python C module that wraps a couple PropLib functions that I > call PyProp. >>From an interactive

Round Trip: C to Python to C Module

2010-11-19 Thread Eric Frederich
I have a proprietary software PropSoft that I need to extend. They support extensions written in C that can link against PropLib to interact with the system. I have a Python C module that wraps a couple PropLib functions that I call PyProp. >From an interactive Python shell I can import PyProp and

Re: C to Python

2009-12-11 Thread Stefan Behnel
Benjamin Peterson, 10.12.2009 20:26: > Emeka writes: >> I am finding it difficult getting my head around PyObject_CallObject(x,y). I > need a gentle and thorough introduction to it. I also need examples. Could > someone come to my need? > > PyObject_CallFunction is probably easier to use. Hmm, I

Re: C to Python

2009-12-10 Thread Benjamin Peterson
Emeka gmail.com> writes: > > > Hello All, >   > I am finding it difficult getting my head around PyObject_CallObject(x,y). I need a gentle and thorough introduction to it. I also need examples. Could someone come to my need? PyObject_CallFunction is probably easier to use. http://docs.python.o

C to Python

2009-12-10 Thread Emeka
Hello All, I am finding it difficult getting my head around PyObject_CallObject(x,y). I need a gentle and thorough introduction to it. I also need examples. Could someone come to my need? Thanks. Janus. -- http://mail.python.org/mailman/listinfo/python-list

Re: Passing python list from C to python

2009-07-17 Thread Aahz
In article <94c1adf3-a25d-4ae5-9f38-7ca8680d0...@b14g2000yqd.googlegroups.com>, hartley wrote: >On Jul 16, 9:26=A0pm, a...@pythoncraft.com (Aahz) wrote: >> In article <0afc5c4d-1af5-4d0e-9442-26b51b12e...@m11g2000yqh.googlegroups= >.com>, >> hartley =A0 wrote: >>> >>>If you had loosened up on the

Re: Passing python list from C to python

2009-07-17 Thread hartley
On Jul 16, 9:26 pm, a...@pythoncraft.com (Aahz) wrote: > In article > <0afc5c4d-1af5-4d0e-9442-26b51b12e...@m11g2000yqh.googlegroups.com>, > > hartley   wrote: > > >If you had loosened up on the sarcasm I would probably have read what > >you wrote more thoroughly instead of just skimming through i

Re: Passing python list from C to python

2009-07-16 Thread Aahz
In article <0afc5c4d-1af5-4d0e-9442-26b51b12e...@m11g2000yqh.googlegroups.com>, hartley wrote: > >If you had loosened up on the sarcasm I would probably have read what >you wrote more thoroughly instead of just skimming through it. Thanks >for the help, but you should seriously consider doing som

Re: Passing python list from C to python

2009-07-16 Thread John Machin
On Jul 16, 11:13 pm, hartley wrote: > /* the first telling */ > (...) > /* the second telling */ > (...) > /* the third telling */ > > - > If you had loosened up on the sarcasm That wasn't sarcasm, it was an attempt at humourous watering-down the expression of exasperation at continued ignoring o

Re: Passing python list from C to python

2009-07-16 Thread hartley
/* the first telling */ (...) /* the second telling */ (...) /* the third telling */ - If you had loosened up on the sarcasm I would probably have read what you wrote more thoroughly instead of just skimming through it. Thanks for the help, but you should seriously consider doing something with yo

Re: Passing python list from C to python

2009-07-16 Thread hartley
/* the first telling */ (...) /* the third telling */ (...) /* the third telling */ - If you had loosened up on the sarcasm I would probably have read what you wrote more thoroughly instead of just skimming through it. Thanks for the help, but you should seriously consider doing something with yo

Re: Passing python list from C to python

2009-07-15 Thread John Machin
On Jul 15, 7:54 pm, hartley wrote: > On Jul 14, 2:21 pm, John Machin wrote: > > On Jul 14, 7:22 pm, hartley wrote:> > > I'm very new > > at wrapping Python/C, and I have run into some problems. [snip] /* the first telling */ > > > > statement C_embedding.buff = the_pylist ? > > > > > BTW C-em

Re: Passing python list from C to python

2009-07-15 Thread hartley
On Jul 14, 2:21 pm, John Machin wrote: > On Jul 14, 7:22 pm, hartley wrote:> > > I'm very new at > wrapping Python/C, and I have run into some problems. > > [snip] > > > > > > >         pValue = PyObject_CallObject(pFunc,NULL); > > > > > pValue is now a PyList - i've even verified this with: > >

Re: Passing python list from C to python

2009-07-14 Thread John Machin
On Jul 14, 7:22 pm, hartley wrote: > > > I'm very new at wrapping Python/C, and I have run into some problems. [snip] > > >         pValue = PyObject_CallObject(pFunc,NULL); > > > > pValue is now a PyList - i've even verified this with: > > > > int a = PyList_Check(pValue); > > >         printf("

Re: Passing python list from C to python

2009-07-14 Thread hartley
On Jul 13, 6:35 pm, John Machin wrote: > On Jul 14, 1:47 am, hartley wrote: > > > > > I'm very new at wrapping Python/C, and I have run into some problems. > > > I have one python module that provides me with a list (provideBuffer > > in provideBuff.py): > > >  Py_Initialize(); > >         pName

Re: Passing python list from C to python

2009-07-14 Thread hartley
> > I'm very new at wrapping Python/C, and I have run into some problems. > > > I have one python module that provides me with a list (provideBuffer > > in provideBuff.py): > > >  Py_Initialize(); > >         pName = PyString_FromString("provideBuff"); > >         pModule = PyImport_Import(pName);

Re: Passing python list from C to python

2009-07-13 Thread John Machin
On Jul 14, 1:47 am, hartley wrote: > I'm very new at wrapping Python/C, and I have run into some problems. > > I have one python module that provides me with a list (provideBuffer > in provideBuff.py): > >  Py_Initialize(); >         pName = PyString_FromString("provideBuff"); >         pModule =

Passing python list from C to python

2009-07-13 Thread hartley
I'm very new at wrapping Python/C, and I have run into some problems. I have one python module that provides me with a list (provideBuffer in provideBuff.py): Py_Initialize(); pName = PyString_FromString("provideBuff"); pModule = PyImport_Import(pName); pFunc = PyObject_

Re: SWIG, c++ to Python: array of pointers (double pointer) not working

2009-03-17 Thread bobicanprogram
On Mar 14, 5:22 am, Matteo wrote: > Re-posting in more simple and precise terms from a previous > threadhttp://groups.google.it/group/comp.lang.python/browse_thread/thread/6... > > Problem: > SWIG doesn't properly wrap c++ arrays of pointers, therefore when you > try to call a c++ function which

SWIG, c++ to Python: array of pointers (double pointer) not working

2009-03-14 Thread Matteo
Re-posting in more simple and precise terms from a previous thread http://groups.google.it/group/comp.lang.python/browse_thread/thread/6dd7bd9a09b8a011/5119cf15ebfa38b8 Problem: SWIG doesn't properly wrap c++ arrays of pointers, therefore when you try to call a c++ function which requires them, a

Re: Mapping 64 bit int from C to Python-2.2

2009-03-10 Thread Mark Hammond
On 10/03/2009 2:51 AM, Explore_Imagination wrote: Hi I want to map 64 bit integers from C to python. I must use Python 2.2 BUT There is no support for 64 bits integers in Python2.2 (Supported in 2.5). Now the problem is that I have these four variables: unit32_t a,b,c; uint64_t w,x,y,z; I

Re: Mapping 64 bit int from C to Python-2.2 ?????

2009-03-10 Thread Martin v. Löwis
> Any Suggestions? Read all of the responses you got the last time you posted the very same article. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Mapping 64 bit int from C to Python-2.2 ?????

2009-03-10 Thread Explore_Imagination
Hi I want to map 64 bit integers from C to python. I must use Python 2.2 BUT There is no support for 64 bits integers in Python2.2 (Supported in 2.5). Now the problem is that I have following variables: unit32_t a,b,c; uint64_t w,x,y,z; I use this funtion to map values: Py_BuildValue

Re: Mapping 64 bit int from C to Python-2.2

2009-03-10 Thread Explore_Imagination
On Mar 9, 5:57 pm, MRAB wrote: > Explore_Imagination wrote: > > Hi > > > I want to map 64 bit integers from C to python. I must use Python 2.2 > > BUT There is no support for 64 bits integers in Python2.2 (Supported > > in 2.5). > > > Now the prob

Re: Mapping 64 bit int from C to Python-2.2

2009-03-10 Thread Explore_Imagination
On Mar 9, 5:57 pm, MRAB wrote: > Explore_Imagination wrote: > > Hi > > > I want to map 64 bit integers from C to python. I must use Python 2.2 > > BUT There is no support for 64 bits integers in Python2.2 (Supported > > in 2.5). > > > Now the prob

Re: Mapping 64 bit int from C to Python-2.2

2009-03-10 Thread Explore_Imagination
On Mar 9, 5:57 pm, MRAB wrote: > Explore_Imagination wrote: > > Hi > > > I want to map 64 bit integers from C to python. I must use Python 2.2 > > BUT There is no support for 64 bits integers in Python2.2 (Supported > > in 2.5). > > > Now the prob

Re: Mapping 64 bit int from C to Python-2.2

2009-03-09 Thread Gabriel Genellina
En Mon, 09 Mar 2009 13:51:59 -0200, Explore_Imagination escribió: I want to map 64 bit integers from C to python. I must use Python 2.2 BUT There is no support for 64 bits integers in Python2.2 (Supported in 2.5). Now the problem is that I have these four variables: unit32_t a,b,c

Re: Mapping 64 bit int from C to Python-2.2

2009-03-09 Thread pruebauno
On Mar 9, 11:51 am, Explore_Imagination wrote: > Hi > > I want to map 64 bit integers from C to python. I must use Python 2.2 > BUT There is no support for 64 bits integers in Python2.2 (Supported > in 2.5). > > Now the problem is that I have these four variables: > > u

Re: Mapping 64 bit int from C to Python-2.2

2009-03-09 Thread MRAB
Explore_Imagination wrote: Hi I want to map 64 bit integers from C to python. I must use Python 2.2 BUT There is no support for 64 bits integers in Python2.2 (Supported in 2.5). Now the problem is that I have these four variables: unit32_t a,b,c; uint64_t w,x,y,z; I use this funtion to map

Mapping 64 bit int from C to Python-2.2

2009-03-09 Thread Explore_Imagination
Hi I want to map 64 bit integers from C to python. I must use Python 2.2 BUT There is no support for 64 bits integers in Python2.2 (Supported in 2.5). Now the problem is that I have these four variables: unit32_t a,b,c; uint64_t w,x,y,z; I use this funtion to map values: Py_BuildValue

Re: C to python conversion

2008-04-13 Thread Ivan Illarionov
On Apr 13, 7:58 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Sat, 12 Apr 2008 07:58:47 -0300, Michele Petrazzo > <[EMAIL PROTECTED]> escribió: > > > > > Hi all, > > I'm trying to translate a simple C code into a python + ctypes (where > > need), but I have some problems on char conversio

Re: C to python conversion

2008-04-12 Thread Gabriel Genellina
En Sat, 12 Apr 2008 07:58:47 -0300, Michele Petrazzo <[EMAIL PROTECTED]> escribió: > Hi all, > I'm trying to translate a simple C code into a python + ctypes (where > need), but I have some problems on char conversion. The code have > to work on Linux and talk with the serial port. I think that

Re: C to python conversion

2008-04-12 Thread Paul McGuire
On Apr 12, 5:58 am, Michele Petrazzo <[EMAIL PROTECTED]> wrote: > Hi all, > I'm trying to translate a simple C code into a python + ctypes (where > need), but I have some problems on char conversion. The code have > to work on Linux and talk with the serial port. I think that the problem > is that

C to python conversion

2008-04-12 Thread Michele Petrazzo
Hi all, I'm trying to translate a simple C code into a python + ctypes (where need), but I have some problems on char conversion. The code have to work on Linux and talk with the serial port. I think that the problem is that I don't translate correctly the strings. C code: #define START 0x33 #defi

Re: newbie swig c++ to python

2007-10-07 Thread whatazor
Now it works, the problem was in the project configuration of the example, that put the directory in Addictional Dependencies while it must be in Addictional Library Directories bye w n 7 Ott, 18:35, whatazor <[EMAIL PROTECTED]> wrote: > Hi all, > I must wrap some c++ code in python with swig. I

newbie swig c++ to python

2007-10-07 Thread whatazor
Hi all, I must wrap some c++ code in python with swig. I try the swig examples for VC++ , but when I build the project it gives me that error: example fatal error LNK1181: cannot open input file 'C:\Programmi \Python25\libs.obj' Any idea? thank you w -- http://mail.python.org/mailman/listinfo/

Re: return tuple from C to python (extending python)

2006-10-26 Thread Kiran
Farshid Lashkari wrote: > Simon Forman wrote: > > I have not done a great deal of extension work with python, however, I > > do not believe you can simply cast an int (or pointer to int, which is > > what you say dat is declared as, unless my C is /really/ rusty) to > > PyObject*. > > > > I think

Re: return tuple from C to python (extending python)

2006-10-24 Thread Andrew Poelstra
On Tue, 2006-10-24 at 15:24 -0700, Kiran wrote: > Hi all, I want to make python call some C functions, process them and > return them. Try comp.lang.python -- Andrew Poelstra -- http://mail.python.org/mailman/listinfo/python-list

Re: return tuple from C to python (extending python)

2006-10-24 Thread Chetan
"Kiran" <[EMAIL PROTECTED]> writes: > PyObject* toRet; > toRet = PyTuple_New(num_addr); > > then, in a for loop, i assign values to the tuple as follows: > > for ( i = 0; i < num_addr; i++ ) > { > printf("%d\n", dat[i]); > PyTuple_SET_ITEM(toRet, i, (PyObject*)dat[i] ); > }

Re: return tuple from C to python (extending python)

2006-10-24 Thread Farshid Lashkari
Simon Forman wrote: > I have not done a great deal of extension work with python, however, I > do not believe you can simply cast an int (or pointer to int, which is > what you say dat is declared as, unless my C is /really/ rusty) to > PyObject*. > > I think you need to do something like Py_Build

Re: return tuple from C to python (extending python)

2006-10-24 Thread Simon Forman
Kiran wrote: > Hi all, I want to make python call some C functions, process them and > return them. > > Ok, I got all the wrapper functions and everything setup right. Here > is my problem. What I need to do is to return a tuple from C to > python. > > To go about doin

return tuple from C to python (extending python)

2006-10-24 Thread Kiran
Hi all, I want to make python call some C functions, process them and return them. Ok, I got all the wrapper functions and everything setup right. Here is my problem. What I need to do is to return a tuple from C to python. To go about doing this, I first create a tuple object in C doing the

Re: C++ to Python?

2006-10-10 Thread Tom Plunket
Roman Yakovenko wrote: > you want to find some kind of "translator" > > C++ code: >std::cout << 1; > translator output: >print 1 > > Am I right? If so, I am pretty sure that such "translator" does not > exist - too complex. ...however such a "refactor" is easy for a human to do. What t

Re: C++ to Python?

2006-10-10 Thread Roman Yakovenko
On 10/10/06, Frank Martinez <[EMAIL PROTECTED]> wrote: > Hi, Roman. > Thanks. I seem a bit confused. Does Py++ actually convert the C++ code to > Python or does it just provide a wrapper to C++ code? A second one. Now when I read your mail one more time, I think I was wrong, because you want to

Re: C++ to Python?

2006-10-10 Thread Frank Martinez
Hi, Roman. Thanks.  I seem a bit confused.  Does Py++ actually convert the C++ code to Python or does it just provide a wrapper to C++ code? You say tomater, I zader matermorts. -- Coach Z, Homestarrunner.com On Oct 10, 2006, at 3:55 PM, Roman Yakovenko wrote:On 10/10/06, Frank Martinez <[EMAIL PRO

Re: C++ to Python?

2006-10-10 Thread Roman Yakovenko
On 10/10/06, Frank Martinez <[EMAIL PROTECTED]> wrote: > Hi, Everybody! > Does anyone know of a cpp2py type application? Without going into details, > I need to port a bunch of C++ code to Python. Any such > converter/information would be helpful. > Thanks. Take a look on Py++( http://language

C++ to Python?

2006-10-10 Thread Frank Martinez
Hi, Everybody! Does anyone know of a cpp2py type application?  Without going into details, I need to port a bunch of C++ code to Python.  Any such converter/information would be helpful. Thanks. Hi, my name is Ray and, on Yesterday, my Daughter called me. -- A man named 'Ray'. -- http://mail.pytho

C++ to python with boost.python: Exposing virtual bool operator()(int )=0

2006-03-29 Thread Pedro
Hello pythonians! ;-D , I have a little problem when I expose (assisted by boost.python) classes with virtual functions, specially with operator(). In the C++ code below I test two different implementations of a member function of A that takes as an argument the abstract class Base (see Option 1

Re: Sharing database connection from C to Python

2006-02-01 Thread Daniel Dittmar
[EMAIL PROTECTED] wrote: > I'm developing an application using the C language and Python for it's > plugins. The C program connects to a MySQL database and keeps that > connection active. Is it possible to 'share' this connection with the > Python plugins? If so, is there a "standard" way to do tha

Sharing database connection from C to Python

2006-01-30 Thread dgiagio
Hi, I'm developing an application using the C language and Python for it's plugins. The C program connects to a MySQL database and keeps that connection active. Is it possible to 'share' this connection with the Python plugins? If so, is there a "standard" way to do that? Thank you. DG -- http

Re: moving from c++ to python

2005-05-21 Thread Ville Vainio
> "Michael" == Michael <[EMAIL PROTECTED]> writes: Michael> me?? My biggest confusion so far is the lack of pointers Michael> in Python .. Achtually, python uses pointers for everything. On the contrary there are no "value types" in python. MyClass* c = new MyClass(12,13); is e

Re: moving from c++ to python

2005-05-21 Thread William Heymann
On Saturday 21 May 2005 03:19 am, Michael wrote: Yeah this tutorial is aimed at people that already know how to program. http://www.diveintopython.org/ It would still be a good idea though to go through the basic python tutorial at http://docs.python.org/tut/tut.html For someone already exp

Re: moving from c++ to python

2005-05-21 Thread pythonchallenge
Michael wrote: > Hi, > I'm a pretty sound programmer in C++, but would like to learn python! Does > anyone know of any tutorial s aimed at me?? My biggest confusion so far is > the lack of pointers in Python .. > Regards > > > Michael > > I suggest that you start with the official Python t

moving from c++ to python

2005-05-21 Thread Michael
Hi, I'm a pretty sound programmer in C++, but would like to learn python! Does anyone know of any tutorial s aimed at me?? My biggest confusion so far is the lack of pointers in Python .. Regards Michael -- http://mail.python.org/mailman/listinfo/python-list

Re: newbie question convert C to python

2005-02-15 Thread Adam DePrince
On Tue, 2005-02-15 at 11:03, Steven Bethard wrote: > Paul Rubin wrote: > > [EMAIL PROTECTED] writes: > > > >>How do i handle this piece of code in python: > >> > >># define vZero 15 > >># define vOne 20 > >> > >>unsigned int vTable[Zero][One] > >> > >>if(vGroup[vZero][vOne] == 0) > >>{ > >>

Re: newbie question convert C to python

2005-02-15 Thread Steven Bethard
Paul Rubin wrote: [EMAIL PROTECTED] writes: How do i handle this piece of code in python: # define vZero 15 # define vOne 20 unsigned int vTable[Zero][One] if(vGroup[vZero][vOne] == 0) { vGroup[vZero][vOne]-- . . } Simplest might be with a dictionary: vGroup =

Re: newbie question convert C to python

2005-02-14 Thread Paul Rubin
[EMAIL PROTECTED] writes: > How do i handle this piece of code in python: > > # define vZero 15 > # define vOne 20 > > unsigned int vTable[Zero][One] > > if(vGroup[vZero][vOne] == 0) > { > vGroup[vZero][vOne]-- > . > . > } Simplest might be with a dic

newbie question convert C to python

2005-02-14 Thread doodle4
How do i handle this piece of code in python: # define vZero 15 # define vOne 20 unsigned int vTable[Zero][One] if(vGroup[vZero][vOne] == 0) { vGroup[vZero][vOne]-- . . } Thanks, -d4 -- http://mail.python.org/mailman/listinfo/python-list