-
<PYTHON>[pptx to pdf] opensource활용Flower in my dev/Python 2015. 6. 9. 14:01
[pyodconverter file]https://github.com/mirkonasato/pyodconverter [Apache OpenOffice file]https://www.openoffice.org/download/ 1. tar xvfz Apache_OpenOffice_4.0.0_Linux_x86-64_install-rpm_en-US.tar.gz 2. cd en-US 3. cd RPMS/ *RPMS 디렉토리로 이동하면 설치되어야 할 rpm이 존재 4. rpm -Uvih *rpm */opt/openoffice4 5. alias "soffice=/opt/openoffice4/program/soffice" 6. soffice "-accept=socket,host=localhost,port=2002;u..
-
<PYTHON>[문자열]Flower in my dev/Python 2015. 6. 3. 11:10
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 In [1]: "Flower in my heart".upper() Out[1]: 'FLOWER IN MY HEART' In [2]: "Flower in my heart".lower() Out[2]: 'flower in my heart' In [3]: "flower in my heart".capitalize() Out[3]: 'Flower in my heart' In [4]: "Flower in my heart".title() Out[4]: 'Fl..
-
<PYTHON>[rrdtool 사용]Flower in my dev/Python 2015. 6. 1. 21:29
역시나 설치 먼저... yum install python-rrdtool 1 2 3 4 5 6 7 import rrdtool targetFile = '파일이름' result = rrdtool.fetch(targetFile, 'AVERAGE', '-s 1430812800', '-e 1430813000') print result Colored by Color Scripter cs 결과값은 튜플로 반환. 실제 값은 result.[2][0][0] 프로그램에서는 다른 것은 필요할 일이 없을 것이다.
-
tmux 사용Flower in my ops/Linux 2015. 6. 1. 15:56
[tmux] - Install for CentOS $ yum install libevent-devel $ yum install tmux - Command $ tmux -ls : 세션 현황 표시 $ tmux new -s flower : 세션 만들기 $ tmux att - t flower : 기존 세션 들어가기 $ [ctrl] a c : 세션에서 새로운 세션 만들기 $ [ctrl] a (h j k l) : 분할 된 창 이동 $ [ctrl] a (number) : (number) 세션 이동 $ [ctrl] a s : 세션내에서 창 분할(가로) $ [ctrl] a v : 세션내에서 창 분할(세로) $ [ctrl] a d : 세션 나오기 $ [ctrl] d : 세션 삭제하고 나오기 $ [ctrl] a e : 나눠..
-
lftp로 백업/미러링 하기Flower in my ops/Linux 2015. 6. 1. 09:49
[출처]태효의 세상사는 이야기 http://taehyo.egloos.com/4264539#comment_4264539 자료를 통채로 A 서버에서 B 서버로 옮겨야 할 일(미러링)이 생겨서 처음에는 rsync를 사용하려다가 A 서버 쪽에 rsync 설정을 해줘야 하는 불편함이 있어서 찾다보니 lftp 라는 command-line ftp 프로그램이 있다는 것을 발견하였다. 별다른 설정도 필요치 않고 대부분의 Redhat 기반 linux에 설치가 되어있다고 한다. 다른 ftp 클라이언트는 어떤지 모르겠는데 lftp의 경우 -e 옵션으로 세미콜론으로 구분된 명령을 실행시킬 수 있다. 예를 들어 lftp -u 사용자 sftp://주소 -e "cd /home/target_dir; put /home/source_di..
-
<PYTHON>[ConfigParser]Flower in my dev/Python 2015. 5. 29. 10:32
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 """ [Area] key01 = test key02 = Success """ import ConfigParser import sys conf = sys.argv[1] config = ConfigParser.ConfigParser() config.read(conf) value = [] value.append(config.get('Area', 'key01')) value.append(config.get('Area', 'key02')) print value cs 설명 無
-
<PYTHON>파싱결과 비교(split count) --> 파일 저장Flower in my dev/Python 2015. 5. 29. 09:59
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 import os, re nPath = '경로/new_device' oPath = '경로/old_device' nList = os.listdir(nPath) oList = os.listdir(oPath) nList.sort() oList.sort() nFile = open('./flower_newcol.txt', 'w') oFile = open('./flower_oldcol.txt', 'w') nCheck = re.compile(r'flower_new\d*') oCheck = re.com..