Module Expr Str Assign NameStore Str Assign NameStore Str Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias TryExcept body Import alias identifier handlers ExceptHandler type NameLoad body Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ClassDef bases NameLoad body Assign NameStore Call NameLoad keyword NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str NameLoad Assign NameStore SubscriptLoad NameLoad Index Str TryExcept body Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str Call NameLoad Call AttributeLoad NameLoad attr Str Num For NameStore Call AttributeLoad NameLoad attr Str NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad name NameStore body Raise Call NameLoad NameLoad TryExcept body Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str NameLoad handlers ExceptHandler type NameLoad name NameStore body Print BinOpMod Str NameLoad Raise Call NameLoad BinOpMod Str TupleLoad NameLoad NameLoad If CompareEq NameLoad Str body TryExcept body Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore SubscriptLoad NameLoad Index Str handlers ExceptHandler type NameLoad body Raise Call NameLoad Str NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str TupleLoad NameLoad NameLoad TryExcept body Assign NameStore Call NameLoad NameLoad keyword NameLoad handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr Raise Call NameLoad BinOpMod Str TupleLoad NameLoad Call AttributeLoad Str attr AttributeLoad NameLoad attr NameLoad TryExcept body Assign NameStore Call NameLoad NameLoad NameLoad handlers ExceptHandler type NameLoad name NameStore body Raise Call NameLoad BinOpMod Str TupleLoad NameLoad NameLoad NameLoad TryExcept body Expr Call NameLoad NameLoad NameLoad handlers ExceptHandler type NameLoad name NameStore body Print BinOpMod Str TupleLoad NameLoad NameLoad Raise Call NameLoad BinOpMod Str TupleLoad NameLoad NameLoad orelse If CompareEq NameLoad Str body Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str NameLoad TryExcept body Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore SubscriptLoad NameLoad Index Str handlers ExceptHandler type NameLoad body Raise Call NameLoad Str NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str TupleLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad keyword ListLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad TryExcept body Expr Call Call NameLoad NameLoad NameLoad NameLoad NameLoad handlers ExceptHandler type NameLoad name NameStore body Print BinOpMod Str TupleLoad NameLoad NameLoad Raise Call NameLoad BinOpMod Str NameLoad orelse Raise Call NameLoad Str decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Pass decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign AttributeStore NameLoad attr NameLoad FunctionDef arguments args defaults body Expr Call AttributeLoad NameLoad attr Num Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad keyword AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad If Call AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Raise Call NameLoad BinOpMod Str NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad FunctionDef arguments args defaults body Expr Str Expr Call AttributeLoad NameLoad attr Num Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword NameLoad keyword Num keyword NameLoad For NameStore Call NameLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Str body If Call NameLoad NameLoad body Expr Call NameLoad NameLoad orelse Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign TupleStore AttributeStore NameLoad attr AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list If BoolOpAnd CompareIsNot NameLoad NameLoad UnaryOpNot Call NameLoad NameLoad body Raise Call NameLoad BinOpMod Str NameLoad If BoolOpAnd CompareIsNot NameLoad NameLoad UnaryOpNot Call NameLoad NameLoad body Raise Call NameLoad BinOpMod Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr If CompareLtE NameLoad Num body Assign NameStore NameLoad Expr Call AttributeLoad NameLoad attr NameLoad While Call AttributeLoad NameLoad attr body If Call NameLoad NameLoad body Assign NameStore Call NameLoad AttributeLoad NameLoad attr orelse Print Str Expr Call AttributeLoad NameLoad attr NameLoad Return AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str If BoolOpAnd CompareIsNot NameLoad NameLoad UnaryOpNot Call NameLoad NameLoad body Raise Call NameLoad BinOpMod Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad TryExcept body Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword NameLoad keyword Num For NameStore Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr Str body If Call NameLoad NameLoad body Expr Call NameLoad NameLoad orelse Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Return AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad name NameStore body Raise Call NameLoad BinOpMod Str NameLoad ExceptHandler type NameLoad name NameStore body Raise Call NameLoad BinOpMod Str NameLoad ExceptHandler type NameLoad name NameStore body Raise NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults Str Str Str NameLoad body Expr Str Import alias ImportFrom alias Assign NameStore Call NameLoad NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str TryExcept body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad name NameStore body Print Str Raise Call NameLoad BinOpMod Str NameLoad If NameLoad body Print Str Print BinOpMod Str NameLoad Print BinOpMod Str NameLoad Print BinOpMod Str NameLoad Print BinOpMod Str NameLoad Print BinOpMod Str NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str TryExcept body ImportFrom alias Assign NameStore Str With Call NameLoad keyword Str keyword Str keyword NameLoad NameStore body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Assign NameStore AttributeLoad NameLoad attr Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad With Call NameLoad keyword Str keyword Str keyword NameLoad NameStore body Expr Call AttributeLoad NameLoad attr NameLoad If NameLoad body Assign NameStore Call AttributeLoad Str attr keyword AttributeLoad NameLoad attr orelse Assign NameStore Call AttributeLoad Str attr keyword AttributeLoad NameLoad attr Print Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Print Call AttributeLoad Str attr keyword AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad name NameStore body Raise Call NameLoad BinOpMod Str NameLoad ExceptHandler type NameLoad name NameStore body Raise Call NameLoad BinOpMod Str NameLoad ExceptHandler type NameLoad name NameStore body Raise NameLoad decorator_list NameLoad decorator_list
N/A N/A N/A __author__ Jerome Samson N/A __copyright__ Copyright 2014, Mikros Image N/A site N/A os N/A sys N/A traceback N/A pickle N/A threading N/A subprocess N/A shlex N/A N/A N/A simplejson json N/A N/A N/A ImportError N/A N/A json puliclient.jobs JobTypeImportError puliclient.jobs CommandError puliclient.jobs TimeoutError puliclient.jobs CommandRunner puliclient.jobs StringParameter CallableRunner N/A CommandRunner N/A N/A execType N/A StringParameter mandatory True execute N/A N/A self arguments updateCompletion updateMessage updateStats updateLicense N/A N/A N/A N/A N/A N/A self log debug N/A Callable runner arguments: %s arguments N/A execType N/A arguments N/A execType N/A N/A N/A N/A N/A N/A self log info N/A Add %d site dirs N/A len N/A N/A arguments get sysPath 0 N/A path N/A N/A arguments get sysPath None N/A N/A N/A N/A site addsitedir path N/A N/A N/A Exception N/A e N/A N/A N/A JobTypeImportError e N/A N/A N/A user_args N/A N/A json loads N/A N/A arguments get user_args None N/A user_kwargs N/A N/A json loads N/A N/A arguments get user_kwargs None N/A N/A N/A N/A self log info N/A args = %s user_args N/A N/A N/A N/A self log info N/A kwargs = %s user_kwargs N/A N/A N/A Exception N/A e N/A N/A N/A Problem retrieving args and kwargs: %s) e N/A N/A CommandError N/A Problem retrieving args and kwargs: (%s, %s) N/A user_args user_kwargs N/A N/A execType function N/A N/A N/A N/A moduleName N/A arguments N/A moduleName N/A funcName N/A arguments N/A funcName N/A N/A N/A Exception N/A N/A N/A JobTypeImportError Missing function or module name in callable arguments: %s arguments N/A N/A N/A N/A self log info N/A Preparing to load: %s from %s N/A funcName moduleName N/A N/A N/A module N/A __import__ moduleName fromlist funcName N/A N/A N/A ImportError N/A error N/A N/A N/A N/A traceback print_exc N/A N/A JobTypeImportError N/A No module '%s' on PYTHONPATH:
%s. (%s) N/A moduleName N/A N/A join N/A sys path error N/A N/A N/A func N/A getattr module funcName N/A N/A N/A Exception N/A e N/A N/A N/A JobTypeImportError N/A No function '%s' defined in module %s (%s) N/A funcName moduleName e N/A N/A N/A N/A func user_args user_kwargs N/A N/A N/A Exception N/A e N/A N/A N/A Problem when executing: %s (msg: %s) N/A func e N/A N/A CommandError N/A Problem when executing: %s (msg: %s) N/A func e N/A N/A N/A execType method N/A N/A N/A N/A N/A self log debug N/A input: %s arguments N/A N/A N/A moduleName N/A arguments N/A moduleName N/A className N/A arguments N/A className N/A methodName N/A arguments N/A methodName N/A N/A N/A Exception N/A N/A N/A JobTypeImportError Missing function or module name in callable arguments: %s arguments N/A N/A N/A N/A self log info N/A Preparing to load: %s.%s from %s N/A methodName className moduleName N/A module N/A __import__ moduleName fromlist N/A className N/A jobtype N/A getattr module className N/A func N/A jobtype N/A N/A N/A N/A N/A getattr func methodName user_args user_kwargs N/A N/A N/A Exception N/A e N/A N/A N/A Problem when executing: %s (error: %s) N/A func e N/A N/A CommandError N/A Problem when executing: %s func N/A N/A N/A CommandError Callable not supported N/A N/A RunnerToolkit N/A object N/A N/A __init__ N/A N/A self N/A N/A N/A N/A self process None N/A N/A self stdout None N/A N/A self stderr None N/A N/A self cmdArgs None N/A N/A self callback None N/A N/A self keepGoing True N/A N/A executeWithTimeout N/A N/A self command timeout N/A N/A N/A 
        Add a timeout callback so that user can have a custom handling of timeout error
         N/A N/A self process None target N/A N/A N/A N/A N/A N/A N/A os umask 2 N/A N/A self process N/A N/A subprocess Popen command stderr N/A subprocess STDOUT shell True N/A N/A N/A N/A self process communicate N/A N/A thread N/A N/A threading Thread target target N/A N/A N/A thread start N/A retcode N/A N/A thread join timeout N/A N/A N/A thread is_alive N/A N/A N/A N/A N/A self process terminate N/A N/A N/A thread join N/A N/A TimeoutError N/A Execution has taken more than allowed time (timeout=%ds) timeout N/A retcode N/A execute N/A N/A self command timeout outputCallback timeoutCallback N/A None None N/A N/A 
        | Starts a new process with given command arguments. It is started in a separate thread to have
        | the ability to check periodically the time elapsed in the subprocess.
        | We will try to call the timeoutCallback when necessary if the timeout value is not None and positive.
        | The timeoutCallback is called each time the process spend timeout seconds running.
        | The standard input and output are redirected and line buffered, we will try to call the outputCallback
        | for each line received.

        :param command: A string representing the command line to execute
        :param timeout: Integer specifying the number of seconds to spend in the subprocess before starting the callback function
        :param outputCallback: A function called each time a line is written in subprocess stdout or stderr
        :param timeoutCallback: A function to start each time "timeout" second are spent in the subprocess
         N/A N/A self cmdArgs N/A N/A shlex split command N/A N/A self callback outputCallback N/A N/A self keepGoing True target N/A N/A N/A N/A N/A 
            Internal thread which starts the subprocess and reads output
             N/A N/A N/A os umask 2 N/A N/A self process N/A N/A subprocess Popen N/A self cmdArgs stdout N/A subprocess PIPE stderr N/A subprocess STDOUT shell False bufsize 1 universal_newlines True N/A line N/A iter N/A N/A N/A self process stdout readline N/A N/A N/A callable outputCallback N/A N/A N/A outputCallback line N/A N/A N/A N/A N/A sys stdout write line N/A N/A N/A self stdout N/A self stderr N/A N/A N/A self process communicate N/A N/A N/A N/A outputCallback None N/A N/A callable outputCallback N/A N/A N/A CommandError N/A Invalid param: outputCallback=%s must be a callable or None outputCallback N/A N/A N/A timeoutCallback None N/A N/A callable timeoutCallback N/A N/A N/A CommandError N/A Invalid param: timeoutCallback=%s must be a callable or None timeoutCallback N/A thread N/A N/A threading Thread target target N/A N/A N/A thread start N/A N/A timeout 0 N/A N/A timeout None N/A N/A N/A thread join timeout N/A N/A N/A thread is_alive N/A N/A N/A callable timeoutCallback N/A N/A keepGoing N/A timeoutCallback N/A self process N/A N/A Invalid timeout callback. N/A N/A N/A thread join timeout N/A N/A N/A self process returncode N/A executeWithOutput N/A N/A cls command outputCallback N/A None N/A N/A 
        | Starts a subprocess with given command string. The subprocess is started without shell
        | for safety reason. stderr is send to stdout and stdout is either send to a callback if given or
        | printed on stdout again.
        | If a callback is given for output, it will be called each time a line is printed.

        :param command: a string holding any command line
        :param outputCallback: any callable that we be able to parse line and retrieve useful info from it (usually in the runner)

        :raise CommandError: When any error occurred that should end the command with ERROR status
                             When a subprocess error is raised (OSError or ValueError usually)
         N/A N/A N/A outputCallback None N/A N/A callable outputCallback N/A N/A N/A CommandError N/A Invalid param: outputCallback=%s must be a callable or None outputCallback N/A N/A N/A shlex split command N/A N/A N/A p N/A N/A subprocess Popen N/A N/A command split stdout N/A subprocess PIPE stderr N/A subprocess STDOUT shell False bufsize 1 N/A line N/A iter N/A N/A p stdout readline N/A N/A N/A callable outputCallback N/A N/A N/A outputCallback line N/A N/A N/A N/A N/A sys stdout write line N/A N/A stdout stderr N/A N/A p communicate N/A N/A p returncode N/A N/A N/A ValueError N/A e N/A N/A N/A CommandError N/A %s e N/A N/A OSError N/A e N/A N/A N/A CommandError N/A Error during process exec: %s e N/A N/A Exception N/A e N/A N/A e N/A classmethod sendMail N/A N/A cls subject body toAddress ccAddress fromAddress SMTPhost verbose N/A puliserver aspmx.l.google.com False N/A N/A 
        | Simple class method to send an email during a workflow.
        | It uses the smtplib an access the MX host: aspmx.l.google.com

        :param subject str: the subject of the mail as a string
        :param body str: the content of the mail as a string
        :param toAddress str: a single target address or a comma separated  list of addresses
        :param ccAddress str: a comma separated list of additionnal recipients
        :param fromAddress str: a single source email address (usually puliserver@yourdomain.com)
        :param SMTPHost str: string representing the SMTP server address to use
        :param verbose bool: if set to true, method prints email summary to stdout

        :raise Exception: any exception raised when starting connection to SMTP server and sending email
         N/A smtplib email.mime.text MIMEText N/A msg N/A MIMEText body N/A N/A msg N/A Subject subject N/A N/A msg N/A From fromAddress N/A N/A msg N/A To toAddress N/A N/A msg N/A Cc ccAddress N/A recipients N/A N/A toAddress split , N/A N/A N/A recipients extend N/A N/A ccAddress split , N/A N/A N/A s N/A N/A smtplib SMTP SMTPhost N/A N/A N/A s sendmail fromAddress recipients N/A N/A msg as_string N/A N/A N/A s quit N/A N/A N/A Exception N/A e N/A N/A Error using sendmail, probably malformed email addresses. N/A N/A Exception N/A Error using sendmail: %r e N/A verbose N/A N/A Email summary info N/A N/A   from.....: %r fromAddress N/A N/A   to.......: %r toAddress N/A N/A   cc.......: %r ccAddress N/A N/A   subject..: %r subject N/A N/A   body.....: %r body N/A classmethod runGraphInXterm N/A N/A cls graph keepWindowOpen N/A True N/A N/A 
        Specifically runs a graph locally in a separate xterm windows and subprocess.
        Several possibilities to render locally:
          - use graph.execute() in current thread --> PB: blocks the GUI
          - use graph.execute(detached=True) in a separate thread --> PB: force to quit maya to stop long process
          - pickle graph to dump and reload it in xterm subprocess --> WARN: potential pb if dump is too long
        When using first 2 methods, log output is in reversed order making it difficult to debug

        Method details (pickle graph):
          1. create a data temp file with the pickled graph
          2. create a script temp with a minimal python code to load the data file and "execute" it
          3. Start a command line process to open xterm and execute the script file
             Precisely the command has 3 steps:
             - open xterm with title "Running" and execution command
             - change title to "finished" after command execution
             - eventually starts a new shell in interactive mode to keep xterm opened

        :param graph: a puliclient graph to execute
        :raise CommandError: When any error occurred that should end the command with ERROR status
                             When a subprocess error is raised (OSError or ValueError usually)
         N/A N/A tempfile NamedTemporaryFile N/A graphName N/A N/A NamedTemporaryFile mode w prefix localGraph_ delete False graphFile N/A N/A N/A N/A graphFile write N/A N/A pickle dumps graph N/A graphName N/A graphFile name N/A script 
import pickle
import time

with open("__graphFile__") as file:
  g = pickle.loads(file.read())
  g.execute()
 N/A script N/A N/A script replace __graphFile__ graphName N/A N/A NamedTemporaryFile mode w prefix localScript_ delete False scriptFile N/A N/A N/A N/A scriptFile write script N/A keepWindowOpen N/A N/A args N/A N/A xterm -title "Running" -e "python {script}; echo -ne ']0;Finished'; sh -i" format script N/A scriptFile name N/A N/A args N/A N/A xterm -title "Running" -e "python {script}" format script N/A scriptFile name N/A Start local render, please check your terminal for details. N/A process N/A N/A subprocess Popen args shell True N/A N/A N/A Process started: {pid} format pid N/A process pid N/A N/A N/A ValueError N/A e N/A N/A N/A CommandError N/A %s e N/A N/A OSError N/A e N/A N/A N/A CommandError N/A Error during process exec: %s e N/A N/A Exception N/A e N/A N/A e N/A classmethod N/A