On Thu, Mar 8, 2012 at 4:00 PM, Mark Dufour <mark.duf
...@gmail.com> wrote:
> 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
> --
> You received this message because you are subscribed to the Google Groups
> "shedskin-discuss" group.
> To post to this group, send email to shedskin-discuss@googlegroups.com.
> To unsubscribe from this group, send email to
> shedskin-discuss+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/shedskin-discuss?hl=en.