Importing Python module from the Bash
- by Morlock
I am launching a Python script from the command line (Bash) under Linux. I need to open Python, import a module, and then have lines of code interpreted. The console must then remain in Python (not quit it). How do I do that?
I have tried an alias like this one:
alias program="cd /home/myname/programs/; python; import module; line_of_code"
But…