Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • Okay so then I should initiate the Python code from a Bash script after I have set my Global variables in Bash and then they would be available with any Python code afterwards? Commented Jun 15, 2021 at 14:20
  • Yes. That is how it is intended to work. NB: you can set variables in your .bashrc to be loaded when you login. You can also set variables in your crontab to be set when your cronjobs run. Commented Jun 15, 2021 at 16:01
  • I tried calling Python from Bash after setting the variables in Bash and that didn't work. Here is the Bash Script: Commented Jun 15, 2021 at 18:33
  • Did you export your variables in bash? Sounds like you didn't (since it didn't work). Commented Jun 16, 2021 at 20:02