question about c to python

Hi,

I am making my internship on communications eng. and my
programming skills are not very good. My task is porting sender-part
of a C code to python (the code is making video transportation over IP
using FLUTE protocol). I have never done such a thing before
(translating a code) I read some documents about C and try to remember
(I used it 7 years ago at school) and also read about Python ( used 5
years ago very basic things at school).

Has someone done this kind of tasks before? if yes could you please tell me What is the starting point that you can advice me?

What One should think first, if she wants to make a simple prototype?

What are the steps to make a simple prototype (not exactly the same C
code but something similar in Python)?

Is it very necessary to know the foresaid languages? Can I make it
without knowing the languages very well? [I have dawdled and now I have got a few days for the draft…]

If someone contact me and give time for helping me I would be really thankful (:

Thanks in advance and best wishes for 2006!

Hi,

I thought I’d throw this out there as one possibility, but I don’t know if this would help. Perhaps using SWIG to create hooks into your C code and linking over to Python?
http://www.swig.org/

I really don’t know what I’m talking about, but SWIG looked like a cool tool.

Do you need to actually translate to python or just do python wrapper and bindings?

LetterRip

I need to translate to python ):

Swig facilitates python to c , not the other way around.

There’s another (I think better) alternative to to making a Python-C translation.
Google up a utility called Pyrex. Its free. It is a utility that generates a well organized C output from your python script.

Maybe if your really under the gun with a deadline you might post your pseudo code here, and get some help working out the Py script. There are some pretty good coders here when your problems get a little more specific…

Really ??

Ok (: I am going to send the main.c may be some of those good coders can have an overview (actualy I could also offer money for a small prototype but I don’t know if I can effort very much!!).

#UPDATED MESSAGE

No needs anymore !!!

so your saying you want this as an input module?

Does input module mean something similar to main file in C ?

{
I have main.c and 3 other small files as a source code and 5 small
header files written in C language.

I have sent the main.c as an overview to the code. Because for the
prototype I need to figure out functions which are used in main.c (in
Python language).
}

what i’m asking is that do you want it to be importable by python scripts in the

import yourmodulehere

yourmodulehere.dohickey(var1, var2)

mode?

Yes (: I need to make modules, import them and call their functions in the main module…

#UPDATED MESSAGE NO NEEDS ANYMORE!!!
#Thanks for everyone (: