Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] import .mojo file in playground #174

Closed
czheo opened this issue May 17, 2023 · 1 comment
Closed

[Feature Request] import .mojo file in playground #174

czheo opened this issue May 17, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request mojo-repo Tag all issues with this label mojo-tooling Tag for all issues related to repl, lldb, lsp, vscode extension. notebook Tag for issues related to Jupyter Notebooks or enviornment

Comments

@czheo
Copy link

czheo commented May 17, 2023

Request

Allow user to save .mojo files in playground and import them in notebook.

Motivation

User defined common libraries can be saved in those files without copying around among notebooks.

Description and Requirements

Save a file MyTest.mojo like below in the same dir as the notebook.

fn myTest():
    print(42)

Run from notebook

from MyTest import myTest
myTest()

Optional consideration: How import paths should be specified? via sys.path, environment variable or etc?

@czheo czheo added the enhancement New feature or request label May 17, 2023
@Mogball Mogball added the notebook Tag for issues related to Jupyter Notebooks or enviornment label Jun 13, 2023
@Mogball Mogball self-assigned this Jun 13, 2023
@Mogball
Copy link
Contributor

Mogball commented Jun 13, 2023

Hey, thanks for filing this issue. The ability to import Mojo files in notebooks is not something that is intended to be supported and is not something we intend to add at the moment.

@Mogball Mogball closed this as completed Jun 13, 2023
@ematejska ematejska added the mojo-tooling Tag for all issues related to repl, lldb, lsp, vscode extension. label Sep 7, 2023
@ematejska ematejska added the mojo-repo Tag all issues with this label label May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request mojo-repo Tag all issues with this label mojo-tooling Tag for all issues related to repl, lldb, lsp, vscode extension. notebook Tag for issues related to Jupyter Notebooks or enviornment
Projects
None yet
Development

No branches or pull requests

3 participants