LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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, 06: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, 10:50 AM   #2
Hko
Senior Member
 
Registered: Aug 2002
Location: Groningen, The Netherlands
Distribution: ubuntu
Posts: 2,530

Rep: Reputation: 108Reputation: 108
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 09:47 AM
Python: how to import a python file that doesn't end in .py? BrianK Programming 5 04-15-2008 01:35 PM
bash script - remove header row from csv file pljvaldez Programming 5 08-30-2006 12:05 PM
Copy file by script python ! BongHongXanh Programming 2 01-11-2006 09:26 PM
'./file' meaning in python & shell script Chowroc Programming 7 12-30-2005 03:32 AM


All times are GMT -5. The time now is 07:23 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration