libgpod + python + windows

Stuart Jansen sjansen at buscaluz.org
Sun Mar 4 18:10:43 MST 2007


On Sun, 2007-03-04 at 17:08 -0700, Daniel C. wrote:
> Will this work with a library that's
> expecting to be installed on a Unix box?
> 
> I've never used swig before and have never written anything
> substantial in Python.  Any help that anyone can give here would be
> vastly appreciated.

Sounds like you might be biting off more than you can chew. At least
more than you can chew quickly. I hope this is a hobby project you can
afford to spread over a few months.

If you're lucky, someone else has already done the work to make libgpod
buildable on Windows. A little quality time with Google will turn up
links like:

http://www.arcknowledge.com/gmane.comp.ipod.gtkpod/2006-07/msg00010.html

If no one else has done the work yet, you're going to have to get your
hands dirty with C and/or C++. You can try porting to straight MFC, or
you can try cheating by using an environment like Cygwin. The first is
probably more likely to succeed, while the second is probably easier.

Of course, to pull either off you'll probably have to modify the build
system. With Cygwin, you might get lucky and have to make only minor
changes to a makefile or autoconf rules. If you decide to go with MFC,
you might be able to have VS do the heavy lifting. Of you might end up
learning more about building software on either system then you ever
wanted to know.

At which point you'll probably discover that you need to adapt the code
to a different hardware interface. If you're lucky, that'll just mean
learning to translate function names. If you're unlucky, that'll mean
completely re-routing the plumbing of of libgpod.

Then you'll discover the joy that is SWIG. This might not be too bad, if
you're lucky. But if your needs are at all complex, you'll get to learn
low level Python terms like GIL, etc.

In other words, if someone hasn't already done the work for you, you're
going to need to develop a basic understanding of Unix C/C++ development
and hardware I/O, basic Windows C/C++ development and hardware I/O and
the basics of Python internals.

It's doable, and it'll make you a more valuable programmer by the end,
but it'll take time.

-- 
Stuart Jansen              e-mail/jabber: sjansen at buscaluz.org
                           google talk:   stuart.jansen at gmail.com

"However beautiful the strategy, you should occasionally look at 
the results." -- Winston Churchill
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://plug.org/pipermail/plug/attachments/20070304/90462673/attachment.bin 


More information about the PLUG mailing list