473,385 Members | 1,555 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Python to C converter

Hi All,

I have an application return in python. I want this to be
converted to C. I will be kind enough if somebody suggest is there any
tool or compiler to do that.

Regards-
Praveen Kumar A.S

Jun 5 '06 #1
7 15301
pr**************@gmail.com:
I have an application return in python. I want this to be
converted to C.


http://www.python.org/doc/faq/genera...other-language

--
René Pijlman
Jun 5 '06 #2

Rene Pijlman wrote:
pr**************@gmail.com:
I have an application return in python. I want this to be
converted to C.


http://www.python.org/doc/faq/genera...other-language


http://pyfaq.infogami.com/can-python...other-language
shd probably mention Shedskin, boost, ctypes, any others?

Jun 5 '06 #3

gene tani wrote:
Rene Pijlman wrote:
pr**************@gmail.com:
I have an application return in python. I want this to be
converted to C.


http://www.python.org/doc/faq/genera...other-language


http://pyfaq.infogami.com/can-python...other-language
shd probably mention Shedskin, boost, ctypes, any others?


The PyPy LLVM backend will compile Python code to C.

Also Pyrex can do a bit more than just integrate C with Python, AFAIK
it *can* compile some Python to C - although with very little speed
advantage if you don't use native C types.

Fuzzyman
http://www.voidspace.org.uk/python/index.shtml

Jun 5 '06 #4
gene tani wrote:
http://pyfaq.infogami.com/can-python...other-language
shd probably mention Shedskin, boost, ctypes, any others?


I've added a comment, which is seemingly all that can be done right now
on that page. See also this overview I wrote about Python and attempts
at compilation/translation:

http://groups.google.co.uk/group/com...785816bf5de6b1

Paul

Jun 5 '06 #5
If you are looking for a "real" python to C, well in this case
C++ look for the shedskin compiler. It will take a rather
nice subset of Python and generate C++ code from it.

It is still rather experimental but I have been using it.

Chance G.

On Mon, 05 Jun 2006 07:19:39 -0700, Fuzzyman wrote:

gene tani wrote:
Rene Pijlman wrote:
> pr**************@gmail.com:
> >I have an application return in python. I want this to be
> >converted to C.
>
> http://www.python.org/doc/faq/genera...other-language
>


http://pyfaq.infogami.com/can-python...other-language
shd probably mention Shedskin, boost, ctypes, any others?


The PyPy LLVM backend will compile Python code to C.

Also Pyrex can do a bit more than just integrate C with Python, AFAIK
it *can* compile some Python to C - although with very little speed
advantage if you don't use native C types.

Fuzzyman
http://www.voidspace.org.uk/python/index.shtml


Jun 5 '06 #6
Chance Ginger wrote:
If you are looking for a "real" python to C, well in this case
C++ look for the shedskin compiler. It will take a rather
nice subset of Python and generate C++ code from it.

In which sense is shedskin a more "real" python to C/C++ compiler than
some of the other mentioned projects? As most of the others (PyPy,
Pyrex), Shedskin works only for a small number of Python programs that
don't mix types too wildly.

BTW: While the RPython (the subset of the Python language that PyPy can
compile) might not be extremely advanced, using it gives you a number of
very interesting features: like having the resulting program been
enhanced to not use the C stack (for deeply recursive code), using
different garbage collection strategies...

Cheers,

Carl Friedrich Bolz

Jun 7 '06 #7
Isn't Pyrex for writing extensions to Python? As for PyPy, I
didn't scroll down far enough to see the compiler info. It
does say it is Python written in Python at the top.

Shedskin is nothing but a compiler.

On Wed, 07 Jun 2006 19:13:27 +0200, Carl Friedrich Bolz wrote:
Chance Ginger wrote:
If you are looking for a "real" python to C, well in this case
C++ look for the shedskin compiler. It will take a rather
nice subset of Python and generate C++ code from it.

In which sense is shedskin a more "real" python to C/C++ compiler than
some of the other mentioned projects? As most of the others (PyPy,
Pyrex), Shedskin works only for a small number of Python programs that
don't mix types too wildly.

BTW: While the RPython (the subset of the Python language that PyPy can
compile) might not be extremely advanced, using it gives you a number of
very interesting features: like having the resulting program been
enhanced to not use the C stack (for deeply recursive code), using
different garbage collection strategies...

Cheers,

Carl Friedrich Bolz


Jun 7 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Max Ischenko | last post by:
Hi, I've started to develop under Microsoft ASP framework, which allows different lang. used in a ActiveX page. I wonder about possible strategies to use Python modules from VBScript <%%>...
3
by: Thys Meintjes | last post by:
Greets, I have need of a Delphi/pascal to python converter. Googling didn't suggest any obvious leads so I'm trying here... Thanks Thys
96
by: Gustav Hållberg | last post by:
I tried finding a discussion around adding the possibility to have optional underscores inside numbers in Python. This is a popular option available in several "competing" scripting langauges, that...
2
by: ajikoe | last post by:
Hi, I tried to follow the example in swig homepage. I found error which I don't understand. I use bcc32, I already include directory where my python.h exist in bcc32.cfg. /* File : example.c...
0
by: Brian Blais | last post by:
Hello, I was wondering if anyone has written a converter between python code and NQC (http://bricxcc.sourceforge.net/nqc/) used for programming LEGO Mindstorms? I am thinking that a small...
0
by: Kurt B. Kaiser | last post by:
Patch / Bug Summary ___________________ Patches : 416 open (-14) / 3463 closed (+16) / 3879 total ( +2) Bugs : 930 open ( +8) / 6333 closed (+17) / 7263 total (+25) RFE : 244 open...
11
by: Osiris | last post by:
I have these pieces of C-code (NOT C++ !!) I want to call from Python. I found Boost. I have MS Visual Studio 2005 with C++. is this the idea: I write the following C source file:...
10
by: mm | last post by:
Is there a Perl to Python converter? Or in general: a XY to Python converter? Is see, that Python is much better then Perl anyway. But for beginners, they whant to konw how is this done with...
1
by: luca | last post by:
Hi, I was trying to make to work directly l i2c with python with the calls ioctl. But I have of the problems and I do not succeed to go ahead. this and l error 129# python pcf8591_ioctl.py...
2
by: =?ISO-8859-1?Q?Michael_Str=F6der?= | last post by:
HI! I had a look on how Doc/ is organized with Python 2.6. There are files with suffix .rst. Hmm... I'm maintaing existing docs for python-ldap which I might have to convert to the new...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.