Electron microscopy
 
Call and Run Another Script in Any Different Directory/Path from a Script
- Python for Integrated Circuits -
- An Online Book -
Python for Integrated Circuits                                                                                   http://www.globalsino.com/ICs/        


Chapter/Index: Introduction | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | Appendix

=================================================================================

Send a variable or a updated variable back to a script in a child folder, and send a variable or a updated variable back to a script in its parent folder. Code in Parent folder:
         Replace headers in a csv file         
      Code in Child folder ("MyChildFolder"):         
         Replace headers in a csv file
   Output, obtained by executing the code in Parent folder, with the execution steps P1, P2, ... P16:         
         Replace headers in a csv file
   Output, obtained by executing the code in Child folder ("MyChildFolder"), with the execution steps C1, C2, ..., C19:            
         Replace headers in a csv file

============================================

Import a Python class that is in a directory above and then run that script.  Code in the folder above. AAA:
         Upload Files to Webpages
      Output from executing Code in the current folder:    
         Upload Files to Webpages

============================================

Run scripts one or two directories above . AAA:         

  Upload Files to Webpages
 
Code
 
 
 
 
Code
 
 
 
 
 
 
Code
 
 
 
 
 

      Output from executing the last Code above:
         Upload Files to Webpages

============================================

Import a Python class that is in a directory above and then run that script.  Code in the folder above. AAA:
         Upload Files to Webpages
      Output from executing Code in the current folder:    
         Upload Files to Webpages

============================================

Import any script that is in the directory above, brother directory, child directory, then run a script there. With those scripts, any are callable and executable. AAA:

  Codes (left) and output (right):
Upload Files to Webpages
 
Code
 
 
 
 
 
Code
 
 
 
Code
 
 
 
Code
 
 
 
 
 
 
 
 
 
Code
 
 
 
 
 
 
 
 

============================================

Import a Python class that is in a directory above and then run that script.  Code in the subfolder and Code in the parent folder:
         Upload Files to Webpages
      Output from executing Code in the subfolder:    
         Upload Files to Webpages

============================================

Call and run another script in a different directory/path from a script. Test scripts:
          C:\GlobalSino20020219\ICs\images\ScriptPython\imagesScriptPython.py Code 1
          C:\GlobalSino20020219\ICs\images\image.py Code 2
          C:\GlobalSino20020219\ICs\images2\images2.py Code 3
      Code 1:    
         Upload Files to Webpages
      Output from executing Code 1:    
         Upload Files to Webpages
     Code 2:    
         Upload Files to Webpages
     Output from executing Code 2:    
         Upload Files to Webpages
      Code 3:    
         Upload Files to Webpages  
     Output of running Code 3:    
         Upload Files to Webpages

============================================

         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         

 

 

 

 

 



















































 

 

 

 

 

=================================================================================