leoncwu  
                (Leoncwu)
               
                 
              
                  
                    April 2, 2020, 11:34pm
                   
                   
              1 
               
             
            
              Hi,
I am trying to control Paraview using the macro (Python script). I know that I can load a Python script from the command line by adding a flag:
paraview --script=input.py
What if this “input.py” is not in the current working directory? So, I tried to give the full path to the Python script:
paraview --script= C:/sample/scripts/input.py
But it does not work. Paraview complains that it cannot open the file. Any suggestions?
Thanks.
             
            
               
               
               
            
            
           
          
            
            
              It looks like you have a space between your equal sign and the C. I think you need to remote that and it will work. With ParaView v5.8 I can load a script with an absolute path.
             
            
               
               
               
            
            
           
          
            
              
                leoncwu  
                (Leoncwu)
               
              
                  
                    April 6, 2020,  6:50pm
                   
                   
              3 
               
             
            
              Thank you so much for the help. The space was an accident due to copy and paste, but I have resolved this issue.
             
            
               
               
               
            
            
           
          
            
              
                leoncwu  
                (Leoncwu)
               
              
                  
                    April 7, 2020,  3:05pm
                   
                   
              5 
               
             
            
              I did in a tricky way by moving the target python script to the current working directory and read it without the original path in the command line.