Hi, yeah that's the way.

People using the new interface can do:
try:
    import pyportmidi
except ImportError:
    from pygame import midi as pyportmidi


People using pypm C module directly for backwards compatibility can do:
try:
    from pyportmidi import _pyportmidi as pypm
except ImportError:
    try:
        import pypm
    except ImportError:
        from pygame import pypm as pypm


... or just remove the pygame fallbacks if wanted.



On Mon, Jun 7, 2010 at 1:44 PM, Alexandre Quessy <[email protected]>wrote:

> Hello René,
> Ok. That makes sense for me.
> That means the users will still be able to import directly pypm, by doing
> this:
>
> from pyportmidi import _pyportmidi as pypm
>
> ?
>
> Alex
>
> 2010/6/7 René Dudfield <[email protected]>:
> > Hi,
> >
> > just a note, the bitbucket link had a typo:
> >     http://bitbucket.org/aalex/pyportmidi/wiki/Home
> >
> > Thinking about it a tiny bit more... we should keep the name as
> > 'pyportmidi'.  So it is the same on pypi, as the python module, and as
> the
> > name of the package.  The debian/ubuntu package would be called
> > 'python-pyportmidi'.
> >
> > Probably sensible to keep the name the same across all the different
> places.
> >
> >
> > /setup.py
> > /README.txt
> > /pyportmidi/_pyportmidi.so  # the old pypm.so module name.  It's
> convention
> > to use an underscore module name for the C part.
> > /pyportmidi/_pyportmidi.pyx
> > /pyportmidi/_pyportmidi.c
> > /pyportmidi/pyportmidi.py
> > /pyportmidi/__iniit__.py  # includes everything from pyportmidi.py
> > /pyportmidi/examples/...
> > /pyportmidi/tests/...
> >
>
> --
> Alexandre Quessy
> http://alexandre.quessy.net/
>
_______________________________________________
media_api mailing list
[email protected]
http://lists.create.ucsb.edu/mailman/listinfo/media_api

Reply via email to