Skip to content

syberia/python.sy-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Example of Python Modules for R License: MIT Join the chat at https://gitter.im/syberia/Lobby

Python is known for a stellar module and import system that makes it incredibly easy to manage dependencies and track the etiology of local variables and functions.

This is an example python.sy project that demonstrates a minimal translation of Python's module system to R using syberia.

Example

Opening the R console from the root of the project, we notice

syberia_engine(".")$resource("toplevel")
# $chocolate
# [1] "Chocolate makes me happy!"
# 
# $coconut
# [1] "Eating coconut leaves one feeling delighted."

If you inspect toplevel.R, you will see it contains a "from-import" like syntax:

from(first.second.third) %import% c("chocolate", "coconut")

list(
  chocolate = chocolate("happy"),
  coconut   = coconut("delighted")
)

About

Example Python.sy project (an R project with Python-like module syntax)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages