Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #58798
| Date | 2013-11-08 09:39 -0500 |
|---|---|
| From | Mark Barton <mark@atldes.com> |
| Subject | Re: Talking to a 'C' program |
| References | <89D0AF8F-FE2A-4051-84E7-7373A7340C35@o2.co.uk> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.2222.1383921725.18130.python-list@python.org> (permalink) |
On 11/8/13 9:23 AM, John Pote wrote: > Hi all, > > I have the task of testing some embedded 'C' code for a small micro-controller. Thought it would be a good idea to test it on the PC first to make sure the algorithm is correct then perhaps test it on the controller via RS232 and an appropriate wrapper round the 'C' functions. > > On the PC I can use Python's unit test library module and logging to create a nice and easy to use environment (I like Python). So my question is how to communicate from Python to the C module on the PC. What I'd like is simplicity and ease of setting up. All I can think of myself is to use sockets. > > Any ideas on how to do this would be gratefully appreciated. > > Also as I don't have any microsoft offerings of a C compiler any suggestions as to a suitable C compiler for a PC appreciated as well. llvm? mingw? gcc? > > Thanks a lot everyone, > John Hi John, I know this is not answering you question, but have you considered using one of the many "C" unit test programs that are available for testing the embedded code? I would hazard to guess that it would be much easier to use something that is specifically C friendly that trying to adapt Python unit test. You can however still use Python as a wrapper or even a slick GUI for invoking the C unit test using a subprocess and getting the results. I have used CUnit in the past and I know that it has several different methods for returning the results. I'm sure other C unit test programs are similar. Mark
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Talking to a 'C' program Mark Barton <mark@atldes.com> - 2013-11-08 09:39 -0500
csiph-web