hi james,
my apologies for the delayed reply.
> I've been watching the Shedskin project for a while and decided to
> give it a whirl last night. It's pretty cool, but I can't seem to
> follow the tutorial on calling external C/C++ functions. As I
> understand, I would have to first write a template for my 'stuff' (C/C+
> +) module, and then fill in the blanks after shedskin generates the
> cpp file?
yes. to be sure, I just followed the steps outlined in the
documentation, and this still seems to work. do these steps work for
you, or what kind of problem do you run into..?
> What about in a situation where I already have C/C++ code? Or I want
> to call an existing C/C++ library and use it within Shedskin?
I'm afraid this currently requires you to write a manual "bridge" in
lib/, similar as to what happens in the 're' module, for example:
lib/re.py provides just enough python code to perform type inference,
and lib/re.?pp manually calls into libpcre.
> In particular, I was wondering how one might write (now, or maybe in
> future Shedskin releases..) Python code that could run as a cpython
> interpreted script (and call C/C++ code via ctypes for example) and
> also have that code work under shedskin when it gets compiled to C++.
I have no experience with ctypes, so I can't say if it's possible to
statically determine all or most types for a program that uses it..
but if this is possible, I guess shedskin should be able to support it
(to some degree perhaps).
> Also, as a separate question -- is there a plan to ever have [some]
> support for eval or exec?
perhaps seriously restricted versions of these, but not the real
thing, since it's fundamentally impossible to determine statically
what happens when you execute some arbitrary string..
thanks for your questions!
mark.
--
http://www.youtube.com/watch?v=E6LsfnBmdnk