Class VirtualEnvironmentRunner


  • public class VirtualEnvironmentRunner
    extends java.lang.Object
    A wrapper to run python virtualenvs, that tries to figure out the commands to run based on the environment type
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  VirtualEnvironmentRunner.EnvType
      This enum helps us figure out the type of virtualenv.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void runCommand()
      This builds, runs the command and outputs it to the logger as it is being run
      void setArguments​(java.util.List<java.lang.String> arguments)
      This is the code you actually want to run after 'python'.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • setArguments

        public void setArguments​(java.util.List<java.lang.String> arguments)
        This is the code you actually want to run after 'python'. For example adding Arrays.asList("--version") should return the version of python that is being run.
        Parameters:
        arguments -
      • runCommand

        public void runCommand()
                        throws java.io.IOException,
                               java.lang.InterruptedException
        This builds, runs the command and outputs it to the logger as it is being run
        Throws:
        java.io.IOException - // In case there is an issue starting the process
        java.lang.InterruptedException - // In case there is an issue after the process is started