Comments (5)
What does your compilation command look like?
from rapydscript.
from the doc:
RapydScript first tries to search the current directory of the file for the import. If that fails, it tries to search user-defined imports (which can be set via RAPYDSCRIPT_PATH environment variable as colon-separated directories, or semi-colon separated on Windows), and finally in the RapydScript builtin directory. This search order allows the user to easily override inbuilt functions.
You have two ways:
- define RAPYDSCRIPT_PATH
- create a simple one-line file with
import file1.main
in the parent folder of your packages and pass it to the compiler
from rapydscript.
ok, i'm kind of confused on the RAPYDSCRIPT_PATH one; Are you supposed to change the environment variable whenever you create a new package, or are editing in a new project? That would be a nightmare! Also, I tried the second method but it didn't work
from rapydscript.
ok, i solved it by configuring the --import-path attribute, though I don't understand the RAPYDSCRIPT_PATH variable
from rapydscript.
For example, if you wanted to import from a directory using --import-path
, you would do something like:
rapydscript main.py --import-path "./lib"
Using environment variables is a little different.
export RAPYDSCRIPT_PATH="./lib"; rapydscript main.py
If you wanted to save this environment variable permanently, add it to your .profile
. Your profile will depend on your OS.
from rapydscript.
Related Issues (20)
- append method does not compile to js push method HOT 1
- VSCode extension for syntax highlighting HOT 4
- cannot compare string HOT 3
- Typescript has problem compile RS --es6 output at class attributes HOT 2
- Why not support in-browser compiler? HOT 2
- enhancement: check for already reserved words like: enum HOT 18
- Cannot resolve python imports HOT 8
- Is that possible to parse python code to js AST? HOT 1
- fstring support. HOT 1
- How to keep all comments HOT 8
- Can't find python module that is installed and available? HOT 1
- Cannot catch ImportError HOT 2
- How to use RapydScript with JavaScript MutationObserver HOT 1
- Question about feasibility: option to use JS function syntax for nested functions, especially inside dicts/object-literals HOT 7
- How to run code snippets from tutorials on old Android? HOT 1
- Computed and negative slices
- parenthesized syntax HOT 2
- TypeError: undefined is not a function HOT 1
- Compiler issues HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rapydscript.