Pyffi – Use Python from Racket
Pyffi automatically exports Python modules as scheme objects and that&#x27;s quite practical. We worked on this briefly while building the Gambit interface to CPython (<a href="https:&#x2F;&#x2F;github.com&#x2F;gambit&#x2F;python" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;gambit&#x2F;python</a>), but ran into some quirks with the current Gambit macro and module systems that forced us to postpone. It is definitely something we want!<p>Our syntactic interface based on Gambit&#x27;s infix parser (SIX) is quite ergonomic and allows you to write expressions that look just like Python, within Scheme code (and vice-versa). It&#x27;s much more natural than directly[1] passing strings to &#x27;eval&#x27;, although you can certainly do so (the whole low-level API is available). Here&#x27;s the &#x27;cal&#x27; example:<p><pre><code>  &gt; \import calendar
  &gt; (display (\calendar.month 2022 09))
     September 2022
  Mo Tu We Th Fr Sa Su
            1  2  3  4
   5  6  7  8  9 10 11
  12 13 14 15 16 17 18
  19 20 21 22 23 24 25
  26 27 28 29 30
</code></pre>
[1]: SIX expressions are compiled to strings and eventually evaluated by CPython&#x27;s eval.