Unix/Linux Go Back    

Programming Post questions about C, C++, Java, SQL, and other programming languages here.

Python Results Converted To C Struct Header File



Thread Tools Search this Thread Display Modes
Old Unix and Linux 11-13-2015   -   Original Discussion by metallica1973
balajesuri's Unix or Linux Image
balajesuri balajesuri is offline Forum Advisor  
#! /bin/bash
Join Date: Apr 2009
Last Activity: 12 May 2018, 7:02 AM EDT
Location: India
Posts: 1,984
Thanks: 31
Thanked 575 Times in 548 Posts
Here's a simplified and easier version:

dest = open('wp.h', 'a+')

struct {

        char *name;
        char *fixed_version;

} filename_versions[] = {

        {NULL, NULL}


Trick here is to use the triple quotes (''' ... ''') ; ain't python cool B-)
Sponsored Links

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Storing C++-struct in file - problem when adding new item in struct Powerponken Programming 2 11-01-2011 03:51 PM
Can't assign struct variable in header file majid.merkava Programming 1 04-11-2011 08:47 AM
Python, struct.pack Dedalus Programming 1 11-13-2010 11:45 PM
Python converted from /bin/sh shell - backup script. jzacsh Programming 0 10-24-2009 08:05 PM
Reading the header of a tar file(posix header) Tanvirk Linux 2 01-31-2008 07:50 AM

All times are GMT -4. The time now is 02:19 AM.