Mixed Language Repl?
I would like to create a repl that creates a C and/or C++ library, that I can call from Python using ctypes.
And in general, I would like to be able to use mixed/multiple languages, and/or use the results of one reply (say a library) in another repl.
Yes. You can configure the command you want to run when you press the run button in your
.replit file. You can configure this to build the C (and/or C++) libary as a Python extension module and then run a Python program.
Thanks@CaptainAnon and @tharlynnhtetong !
Is there a way to make the run "context" or "file" specific?
For example, if I have a repl with two files. Say one is C and one is Python, can I make it so that when the C file is the active tab, that "run" means to run the C file? and then if I switch to the python file, have run mean run the python file?
When I was the tab with the C file (with a main) it would run the C file, and then vice-versa for the Python.
If that is not possible... is it possible for repls to share the same virtual/temporary "repl space" so that I could have two browser tabs open, with two different repls (one C and one Python), but sharing the same "current directory" or at least having visibility to the each other's "current directory"?
(Which is really a more general question, how can I make my python reply have all the tools that are in my c repl?
And, going in the other direction, how do add packages to the python in my C repl?)
I realize that polygott is new/beta, but is there some (even beta) docs on it?
Does polygott have all the languages installed/configured?
Also run --help prints
Usage: run-project [-sb] [-l language]
What is/are the [-sb] option(s)?
And is the "run" command (and other command) documented? I could not find it mentioned in the "docs" page?