By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,761 Members | 1,071 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,761 IT Pros & Developers. It's quick & easy.

Wrapping C API

P: n/a
Hi!!
I'm new to python and have a task for Wrapping up an old program
written in C(20.c files), to provide GUI and chart,graph feature in
Python. I've tried using SWIG but am not getting well in windows
system, wish to receive guidelines for initiating the task...

Aug 4 '08 #1
Share this Question
Share on Google+
2 Replies

P: n/a
Anish Chapagain wrote:
I'm new to python and have a task for Wrapping up an old program
written in C(20.c files), to provide GUI and chart,graph feature in
Python. I've tried using SWIG but am not getting well in windows
system, wish to receive guidelines for initiating the task...
Two ways come to mind:
1. ctypes
2. popen

The former is basically an interface to the C language types which makes it
rather easy to load C DLLs and call functions therein. The latter is a way
to start a program with redirected input and output, something that can be
used to remote-control any commandline application.

Uli

--
Sator Laser GmbH
Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932

Aug 4 '08 #2

P: n/a
On 4 Aug, 14:20, Ulrich Eckhardt <eckha...@satorlaser.comwrote:
Anish Chapagain wrote:
I'm new to python and have a task for Wrapping up an old program
written in C(20.c files), to provide GUI and chart,graph feature in
Python. I've tried using SWIG but am not getting well in windows
system, wish to receive guidelines for initiating the task...

Two ways come to mind:
1. ctypes
2. popen

The former is basically an interface to the C language types which makes it
rather easy to load C DLLs and call functions therein. The latter is a way
to start a program with redirected input and output, something that can be
used to remote-control any commandline application.

Uli

--
Sator Laser GmbH
Geschftsfhrer: Thorsten Fcking, Amtsgericht Hamburg HR B62 932
For, plotting chart and graph through C, dll in pyhton will ctype be
more easy..
if there any example would like to see once..
thank's
Aug 4 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.