06-22-2011
Compiling and running Python code
Hey there,
First post here in the Unix forums, but I have used them a lot for research over the last year. Anyways, to why I'm here now:
I'm working on a project and I'll be using the
AIS Parser SDK by Brian C. Lane (can't post the link, but google that and the first 8 links will be relevant) and I'll preferably do it in python. Why python? Mostly because it'll be easier than doing it in C. Problem is, I have no idea how to even get the included python code working. The included readme mentions using a buildit script compile the modules, but I can't seem to get the examples to work.
If you haven't figured out by now, I'm a python newbie. But as I stated above, doing this project in python would be easier than doing it in C (especially since regardless of which I choose, that's the language I'd be learning for the first time).
The one example I'm trying to get to work is in the sdk, located in the python/linux/examples/last_ais folder. Any help would be appreciated.
10 More Discussions You Might Find Interesting
1. Solaris
Hello Guys,
I am using Solaris Developer Express Edition 9/07, I am a beginner. Please tell me how to compile and execute a C program. Please give me your answers clearly, for the compilers cc,c89,c99. please....... reply to me.
I not getting the answer anywhere..
Advance... (2 Replies)
Discussion started by: selva_ss
2 Replies
2. Programming
Hi,
Recently I have a C Code and i compile on my pc with
gcc -D _t_1 -o a.out test.c
It works fine for me on my pc. However, upon transferring the same code on Sun Solaris server, it breaks with the below message:-
Undefined first referenced
symbol ... (3 Replies)
Discussion started by: ahjiefreak
3 Replies
3. UNIX for Dummies Questions & Answers
Hi i am new to programming im having a bit of a problem i have installed kubuntu on my computer and i have wrote some code but when i go to compile it i get this error in the terminal
ross@ubuntu:~/cp1$ g++ -ansi -pedantic array.cpp -o array
ross@ubuntu:~/cp1$ array
The program 'array' is... (3 Replies)
Discussion started by: RossMc
3 Replies
4. Windows & DOS: Issues & Discussions
Hello everyone. I just recently installed Cygwin and I am running it under Windows 7.
My problem is that I cannot seem to compile any C++ code with g++. I've tried to compile C Code using gcc and that works just fine. But Whenever I try to compile some C++ code, g++ throws a whole bunch of... (6 Replies)
Discussion started by: Anlex
6 Replies
5. Programming
Any idea how I can run a program from a phyton script?
For example, in csh I will do
$tpath/tsimplex base=$fbase data=$fdata restore=$frestore \
nxp=$nx nzp=$nz param=$param intp=$intp nlay=$nlay \
varp=$varp sigma0=$sigma maxiter=$maxiter tol=$tol \
... (2 Replies)
Discussion started by: kristinu
2 Replies
6. Programming
I am trying to compile some code and getting lot of errors
g++ -traditional -Wno-non-template-friend -Wno-deprecated -O3 -DNDEBUG -DREAL=float -DGetREAL=Getfloat -IbaseLib -Itommy -Iothers ./source/main/RayTrac.cc -o raytrac
./source/main/RayTrac.cc:36:20: error: gendef.h: No such file or... (1 Reply)
Discussion started by: kristinu
1 Replies
7. AIX
Hello,
I'm currently trying to port an ant based build to AIX 6.1. The build queries the underlying version control system (Mercurial) for some data, which works fine on other platforms (Linux, Solaris). However, on AIX the hg command fails to load python's md5 module when used in the build,... (1 Reply)
Discussion started by: dhs
1 Replies
8. Programming
I have python installed here on windows:
C:\Python27 and can run a script from the command line but would rather use cygwin.
$ cd "C:\Users\cmccabe\Desktop\annovar"
cmccabe@DTV-L2231M5J /cygdrive/c/Users/cmccabe/Desktop/annovar
$ python run_batch_job.py
Traceback (most recent call last):... (3 Replies)
Discussion started by: cmccabe
3 Replies
9. Shell Programming and Scripting
Need assistance in compile a source code with PERL flags
Compile source code CDFconvert-2.2.3 which requires Fortran 90,Perl interpreter , Perl/TK module , NetCDF library , Gempak
I have all the above required libraries .
Issue is when compiling the source code it looks for local... (4 Replies)
Discussion started by: ajayram_arya
4 Replies
10. UNIX for Dummies Questions & Answers
Hi!
I'm using a RaspberryPi with standard Raspbian.
Currently I'm working on some sort of weather station.
For now I have three python scripts - one which is updating txt files for website - update1m.py ( it will not be necessary in few next days so I'll delete it) , second one for updating... (4 Replies)
Discussion started by: bartocham
4 Replies
LEARN ABOUT DEBIAN
dh_python
DH_PYTHON(1) Debhelper DH_PYTHON(1)
NAME
dh_python - calculates Python dependencies and adds postinst and prerm Python scripts (deprecated)
SYNOPSIS
dh_python [debhelperoptions] [-n] [-V version] [moduledirs...]
DESCRIPTION
Note: This program is deprecated. You should use dh_python2 instead. This program will do nothing if debian/pycompat or a Python-Version
control file field exists.
dh_python is a debhelper program that is responsible for generating the ${python:Depends} substitutions and adding them to substvars files.
It will also add a postinst and a prerm script if required.
The program will look at Python scripts and modules in your package, and will use this information to generate a dependency on python, with
the current major version, or on pythonX.Y if your scripts or modules need a specific python version. The dependency will be substituted
into your package's control file wherever you place the token ${python:Depends}.
If some modules need to be byte-compiled at install time, appropriate postinst and prerm scripts will be generated. If already byte-
compiled modules are found, they are removed.
If you use this program, your package should build-depend on python.
OPTIONS
module dirs
If your package installs Python modules in non-standard directories, you can make dh_python check those directories by passing their
names on the command line. By default, it will check /usr/lib/site-python, /usr/lib/$PACKAGE, /usr/share/$PACKAGE,
/usr/lib/games/$PACKAGE, /usr/share/games/$PACKAGE and /usr/lib/python?.?/site-packages.
Note: only /usr/lib/site-python, /usr/lib/python?.?/site-packages and the extra names on the command line are searched for binary (.so)
modules.
-V version
If the .py files your package ships are meant to be used by a specific pythonX.Y version, you can use this option to specify the
desired version, such as 2.3. Do not use if you ship modules in /usr/lib/site-python.
-n, --noscripts
Do not modify postinst/prerm scripts.
CONFORMS TO
Debian policy, version 3.5.7
Python policy, version 0.3.7
SEE ALSO
debhelper(7)
This program is a part of debhelper.
AUTHOR
Josselin Mouette <joss@debian.org>
most ideas stolen from Brendan O'Dea <bod@debian.org>
9.20120909 2011-12-06 DH_PYTHON(1)