파이썬 스크립트를 통한 리눅스 명령어 실행 관련 문의입니다.
글쓴이: forest62590 / 작성시간: 화, 2016/12/13 - 5:49오후
안녕하세요,
다름이 아니라 파이썬 스크립트로 특정 명령어들을 수행하려고 하는데,
그 과정에 문의사항이 있어 글남깁니다!!
제가 실행하고 싶은 명령어는
1. mctr_cli oneM2MTesterConfig.config
2. smtc "something"
위 두 가지 입니다.
첫 번째 명령어는 쉽게 실행 하였는데 (mctr_cli oneM2MTesterConfig.config)
두 번째는 mctr_cli oneM2MTesterConfig.cfg라는 명령어 입력 후에 특정 인터페이스로 진입하게 되는데,
그 다음에 smtc "something" 라는 명령어를 실행하기 위해서는 실행한 인터페이스(MC2)에서 실행을 해야 하는데( MC2> smtc "something"과 같이), MC2>으로 진입한 후에 명령어를 어떻게 실행 시켜야 될지 잘 모르겠습니다.
검색 키워드라도 알면 검색을 할텐데 어떻게 검색해야 할지도 감이오지 않아 질문드립니다..!
(현재 subprocess를 알아보고 있습니다.)
다음은 터미널을 작성한 것이며 이미지도 첨부하였습니다.
감사합니다.!!
martin@ubuntu:~/ketiwork/titan-workspace/oneM2M/src/Config$ mctr_cli oneM2MTesterConfig.config ************************************************************************* * TTCN-3 Test Executor - Main Controller 2 * * Version: CRL 113 200/6 R1A * * Copyright (c) 2000-2016 Ericsson Telecom AB * * All rights reserved. This program and the accompanying materials * * are made available under the terms of the Eclipse Public License v1.0 * * which accompanies this distribution, and is available at * ************************************************************************* Using confinguration file: oneM2MTesterConfig.cfg MC@ubuntu: Unix server socket creatd successfully. MC@ubuntu: Listening on TCP pot 9888. MC2>
File attachments:
첨부 | 파일 크기 |
---|---|
![]() | 152.82 KB |
Forums:
잘 찾으셨습니다. subprocess 문서에서
잘 찾으셨습니다. subprocess 문서에서 popen에 대해서 찾아보세요.
댓글 달기