| add_import | R Documentation |
This function appends a specified import statement to the end of each Python
file within the _rixpress folder and its subdirectories, but only for files
whose base name matches the provided Nix environment.
add_import(import_statement, nix_env, project_path = ".")
import_statement |
A character string representing the import statement
to be added. For example, |
nix_env |
A character string naming the Nix environment file (e.g.
|
project_path |
Path to root of project, typically ".". |
No return value; the function performs in-place modifications of the files.
Other python import:
adjust_import()
## Not run:
add_import("import numpy as np", "default.nix")
add_import("import numpy as np", "default.nix", project_path = "path/to/project")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.