title: How to import a python file in a bash script ? (to use a python value in my bash script)
body: <p>I would like to know if it's possible in a bash script to include a python script in order to write (in the bash script) the return value of a funnction I wrote in my python program ?</p>
  
  <p>For example: 
  my file "file.py" has a function which returns a variable value "my_value" (which represents the name of a file but anyway)
  I want to create a bash script which has to be able to execute a commande line like "ingest my_value"</p>
  
  <p>So do you know how to include a python file in a bash script (import ...?) and how is it possible to call a value from a python file inside a bash script ?</p>
  
  <p>Thank you in advance.</p>
  
  <p><strong><em>Update</em></strong></p>
  
  <p>Actually, my python file looks like that:</p>
  
  <pre><code>class formEvents():
      def __init__(self):
          ...
      def myFunc1(self): # function which returns the name of a file that the user choose in his computeur
      ...
      return name_file        
  
      def myFunc2(self): # function which calls an existing bash script (bash_file.sh) in writing the name_file inside it (in the middle of a line)
          subprocess.call(['./bash_file.sh'])
  
  if__name__="__main__":
      FE=formEvents()
  </code></pre>
  
  <p>I don't know if it's clear enough but here is my problem: it's to be able to write name_file inside the bash_file.sh</p>
  
  <p>Jordane</p>