writing dll in python?

Terry Reedy tjreedy at udel.edu
Mon Sep 29 13:55:10 EDT 2008


nishalrs wrote:
> Hello All,
> 
> My main motivation is to build a collection of useful mathematical
> models (that I have developed over the years) to design ultrasonic
> sensors. This should be some sort of a library that should be able to
> be used for desktop/web application development, to run in variety of
> operating systems.

Interesting new applications of Python are welcome.  Googling "Python 
package (or module) ultrasonic sensor" did not turn up anything relevant 
that I saw.

> I am more than convinced after looking at python.org website, it is
> the right tool for the job. I intend to learn python, but I am not
> really sure, where to begin. 

Start with the Python tutorial, perhaps parts of the reference manual, 
and definitely peruse the first chapters in the library manual on 
built-in functions and classes.

You will almost certainly want to use numpy (numpy.org) for numerical 
calculation and possibly existing modules in scipy (scipy.org) or elsewhere.

> Should I write all the functions as simple python scripts? Or is there
> some facility for creating a .dll like library, that could be more
> suitable for what in intend to develop?

A module is a 'script' that is intended to be imported by other Python 
code.  In your Python installation directory, /Libs has numerous *.py 
examples.  A 'package' is a collection of modules in a directory that 
includes only called __init__.py (if I remember correctly).  Don't worry 
about details yet.  When you have something worth distributing, you can 
get help here or on other lists, such as the one for numpy/scipy.

When you are ready, you can announce it here and elsewhere and register 
it at the Python Package Index (pypi.python.org/pypi).

Terry Jan Reedy




More information about the Python-list mailing list