Title: Signature.html
"I think it this case it requires executing the program command line with parameters then executing it." That is, I likely will allow the user to enter the 12 or so parameters on the command line, and execute the program as though I had entered it at a Linux prompt. The program, Wolf, uses graphics only to produce a image like a jpg file.

% ./wolf -h
usage: wolf [-d|m|w|c|l|i|t|u|xN|yN|rN|bN|fFILENAME|h|qN|sN|g|e|v|pN] [julian_date] [observatory] input_image output_image
type "wolf -h" for help

-d: detect "unexpected" object but only draw star labels.
-m: draw stars labels.
-w: draw label on the target image without changing its content.
-i: use inverted images (white sky and black stars).
-c: draw constellations lines.
-t: generate photometry files.
-v: draw visibility levels.
-l: draw RA and DEC lines.
-h: show these lines.
-xN: set the center of the input image N pixels left (use negative N for moving right).
-yN: set the center of the input image N pixels down (use negative N for moving up).
-rN: draw the labels N pixels right of its position.
-bN: draw the label N pixels below its position.
-fFILENAME: draw objects from an extrenal file FILENAME.
-qN: set quality of the output image (0-100)
-sN: set size of the output image (0-100)
-g: Create a background fits image
-e: Create a image of emissivity map
-u: create photometry files for stars
-pN: unwrap the fisheye image. N - scale of the output image (1=normal size)

>From wolf.h

#define wolf

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "cgi-draw.h"   <<--------
#include "novas.h"
#include "global.h"
#include "calstars.h"
#include "imatrix.h"
#include "cnstl.h"

Alan Gauld wrote:
"Wayne Watson" <sierra_mtnv...@sbcglobal.net> wrote
If you can execute a C program compiled on a Linux with SWIG, then that's what I'm looking for.

Nope, you need the suprocess module not SWIG.

What SWIG does (fairly easily!) is allow you to build a wrapper around your C program that python can import and call the C functions like normal Python code. I don;t think you want that, you just want to run the program.
What you haven't made clear yet is whether you need to get your program to interact with the C program or whether you just want to run the executable with no interaction. (This is much easier obviously!)

See my OS topic for various solutions to this.


--
           Wayne Watson (Watson Adventures, Prop., Nevada City, CA)

             (121.01 Deg. W, 39.26 Deg. N) GMT-8 hr std. time)


                Life is one damn thing after another."
                     -- Mark Twain 
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to