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_pycentral
DH_PYCENTRAL(1) Debhelper DH_PYCENTRAL(1)
NAME
dh_pycentral - use the python-central framework to handle Python modules and extensions
SYNOPSIS
dh_pycentral [debhelper options] [-n] [-Xitem] [-V version] [module dirs ...]
DESCRIPTION
dh_pycentral is a debhelper program that will scan your package, detect public Python modules and move them in /usr/share/pycentral so that
python-central can byte-compile those for all supported Python versions. Extensions are kept into the original installation location.
Moving the files to the pycentral location and adding symbolic links to /usr/lib/pythonX.Y/*-packages can be done by setting the
environment varibale DH_PYCENTRAL to a string containing the string include-links.
Moving the files to the pycentral location can be disabled by setting the environment varibale DH_PYCENTRAL to a string containing the
string nomove.
The functionality to shorten the time of unavailabilty of files during unpack and configure has been removed (symlinking files in the
preinst and not removing the symlinked files on upgrade) in version 0.6.9.
You must have filled the XS-Python-Version header to indicate the set of python versions that are going to be supported. dh_pycentral
expects the XB-Python-Version for each binary package it is supposed to work on.
dh_pycentral will also generate substitution variables: the ${python:Provides} variable will contain versioned provides of the package (if
the package's name starts with "python-"). A python-foo package could provide "python2.3-foo" and "python2.4-foo" at the same time. Python
extensions have to provide those whereas it's only option for pure python modules.
The ${python:Versions} variable should be used to provide the required XB-Python-Version field listing the python versions supported by the
package.
OPTIONS
module dirs
If your package installs python modules in non-standard directories, you can make dh_pycentral check those directories by passing their
names on the command line. By default, it will check /usr/lib/$PACKAGE, /usr/share/$PACKAGE, /usr/lib/games/$PACKAGE,
/usr/share/games/$PACKAGE, /usr/lib/python?.?/site-packages and /usr/lib/python?.?/dist-packages.
Note: only /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.
With the new policy, this option is mostly deprecated. Use the XS-Python-Field to indicate that you're using a specific python version.
-n, --noscripts
Do not modify postinst/postrm scripts.
-Xitem, --exclude=item
Exclude files that contain "item" anywhere in their filename from being taken into account to generate the python dependency. You may
use this option multiple times to build up a list of things to exclude.
CONFORMS TO
Python policy, version 0.4.1 (2006-06-20)
SEE ALSO
debhelper(7)
This program is a part of python-central but is made to work with debhelper.
AUTHORS
Raphael Hertzog <hertzog@debian.org>
Also includes bits of the old dh_python written by Josselin Mouette <joss@debian.org> who used many ideas from Brendan O'Dea
<bod@debian.org>.
2011-04-14 DH_PYCENTRAL(1)