LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-25-2009, 05:42 PM   #1
deathalele
Member
 
Registered: May 2008
Location: deep dark north wales
Distribution: Zenwalk
Posts: 162

Rep: Reputation: 30
import c header file into a python script


I have a c .h file with a few functions in that would like to import into a python script.

how would i do this (if its possible without translating a program)

thanks in advance
 
Old 05-26-2009, 09:50 AM   #2
Hko
Senior Member
 
Registered: Aug 2002
Location: Groningen, The Netherlands
Distribution: Debian
Posts: 2,536

Rep: Reputation: 111Reputation: 111
You do not need to translate the entire thing from C to python. But it will still a bit of work.

Read all about it at these obvious places:

http://docs.python.org/extending/
http://docs.python.org/c-api/
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I import Tkinter into Python mugglemage Linux - Software 5 07-02-2008 08:47 AM
Python: how to import a python file that doesn't end in .py? BrianK Programming 5 04-15-2008 12:35 PM
bash script - remove header row from csv file pljvaldez Programming 5 08-30-2006 11:05 AM
Copy file by script python ! BongHongXanh Programming 2 01-11-2006 08:26 PM
'./file' meaning in python & shell script Chowroc Programming 7 12-30-2005 02:32 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:10 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration