<s> import sublime , sublime_plugin <EOL> import subprocess <EOL> import tempfile <EOL> import os <EOL> import sys <EOL> from PhpSimpleRefactor . PhpSimpleRefactorCommand import PhpSimpleRefactorBaseCommand <EOL> class PhpSimpleRefactorExtractMethodCommand ( PhpSimpleRefactorBaseCommand ) : <EOL> function_name = '<STR_LIT>' <EOL> def process ( self ) : <EOL> sublime . active_window ( ) . show_input_panel ( '<STR_LIT>' , '<STR_LIT>' , self . obtain_function_name , None , None ) <EOL> def obtain_function_name ( self , functionName ) : <EOL> self . function_name = functionName ; <EOL> self . on_filled_info ( ) <EOL> def get_command ( self ) : <EOL> settings = sublime . load_settings ( '<STR_LIT>' ) <EOL> self . php_path = settings . get ( '<STR_LIT>' ) <EOL> self . refactor_path = settings . get ( '<STR_LIT>' ) <EOL> rows = '<STR_LIT>' . join ( [ str ( self . rowBegin ) , "<STR_LIT:->" , str ( self . rowEnd ) ] ) <EOL> cmd = '<STR_LIT>' . join ( [ self . php_path , '<STR_LIT>' , self . refactor_path , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , self . file_name , '<STR_LIT>' , rows , '<STR_LIT:U+0020>' , self . function_name ] ) <EOL> print ( cmd ) <EOL> return subprocess . Popen ( cmd , shell = True , bufsize = - <NUM_LIT:1> , stdout = subprocess . PIPE , stderr = subprocess . PIPE , stdin = subprocess . PIPE ) </s>
