나는이가 연결
'python -c "import '+impMod+'; help('+module+'.'+method+') if \''+method+'\' in dir('+module+') else from '+impMod+' import '+method+' help('+method+')"'
처럼 python -c
에 전달 된 명령을 생성하고하여 파이썬 명령을 구축하고 다음과 같은 출력을 얻을 :
python -c "import os; help(os.path.pathconf) if 'pathconf' in dir(os.path) else from os import pathconf help(pathconf)"
을 전하려고해도
python -c "import os; help(os.path.pathconf) if 'pathconf' in dir(os.path) else from os import pathconf; help(pathconf)"
하지만, 내가 왜 SyntaxError를 얻을지 모르겠다 : 구문이 올바르지 않다.
도움이 되겠습니다. 감사합니다.
당신이'';; '' – jramirez
그럴 필요가 없다면, 그 라인을 더 확인해 보시기 바랍니다.''from os import pathconf'다음에'help()'를 소개 할 때 맞춰 보겠습니다. –
그래 파이썬은 그렇지 않습니다. 그것들을 사용하십시오. – jramirez