On 23/02/18 03:34, gonzales huerta wrote:
> What would be the best compiler for writing a combined code PYTHON and C?

There are several ways to do this and it depends on your application
which is
most practical. If w assume yyou want to access the C code from Python then:

1) Write a Python module in C and then import it into Python

2) Write a C library and call it from Python (using the ctypes
Python module for example)

3) Write a C program and then call it from Python using the
subprocess library.

These are in reverse order of difficulty (ie 3 is easiest).
1 is best if you need to access the C code from several Pyhon programs.
2 is best if you need to access the C code from both Python and C
3 is best if you only have a few high-level tasks to perform in C, and
want the simplest integration.

If you want to access Pyhon code from C then you need

1) Embed the Python intetrpreter in your C code ande call it
using the Python API.

2) Write a Python service framework that can be called from C using
fork/system or whatever

3) Create a Python http server that you can call from
C (or any other language) using AJAX

1) Most difficult but best performance and loweset resource usage,
2) Relatively easy but resource heavy
3) Easiest if you know web technology and best if you might need
several programs to access it, but probably slowest too.

There are other options too (Steve mentioned Cython and there
are tools like Boost too)

> 3)I need PYTHON  for the following purposes:
> A)EMBEDDED SYSTEM PROGRAMMING
See the comments above re integrating C and Python.
> B)SCIENTIFIC PROGRAMMING
> C)IMAGE AND VIDEO PROCESSING
> D)DATA VISUALIZATION
Down to here suggests you get a distribution with all the SciPy
stuff included such as Anaconda or Entropy. Anaconda seems
to be the most popular so probably has best support network.
> E)REAL TIME GUI

That's pretty much a contradiction in terms, GUIs are hardly
ever truly real-time. However Python can create GUIs that talk
to real-time back end processes or threads.

> F)DESIGNING PC BASED MEASURING SYSTEMS (like  pc dso,logic analyzer,ect)

I'm not familiar with these so can't comment

> Please let me know what kind of PYTHON libraries 

If you get Anaconda etc then most libraries you need will be included.
That then leaves application specific libraries that you would
need to describe your needs in more detail for anyone to give
recommendations.


-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to