JuliaPy / PythonCall.jl

Python and Julia in harmony.
https://juliapy.github.io/PythonCall.jl/stable/
MIT License
722 stars 61 forks source link

import juliacall loads the startup.jl #317

Closed mahiki closed 10 months ago

mahiki commented 1 year ago

Is your feature request related to a problem? Please describe. I have a startup file in my local environment for REPL work. When loading packages or scripts from the command line I call julia with julia --startup-file=no. There does not appear to be a way to skip the startup file in a Python repl.

Describe the solution you'd like import juliacall should default to loading julia environment with --startup-file=no option.

Describe alternatives you've considered I could move or rename startup.jl file so it wont be found by the julia environment.

Additional context I'm developing a python application that will call a julia module to make dataframe transformations.

cjdoris commented 1 year ago

Good idea, I'll look into it.

github-actions[bot] commented 10 months ago

This issue has been marked as stale because it has been open for 60 days with no activity. If the issue is still relevant then please leave a comment, or else it will be closed in 7 days.

cjdoris commented 10 months ago

You can now start Python with the option -X juliacall-startup-file=no to disable startup.jl. This feature will appear in the next release (our you can try it out by installing from the repo).

I'm going to leave the default as yes though, since that's the Julia default.

ma-sadeghi commented 3 months ago

@cjdoris Would you consider also adding support for an env variable to disable the startup file?

cjdoris commented 3 months ago

You already can, see the docs.

ma-sadeghi commented 3 months ago

Right, sorry I missed the docs. For future reference: https://juliapy.github.io/PythonCall.jl/stable/juliacall/#julia-config