실행예제 powershell 실행을 위해서는 set-executionpolicy 를 변경해야 한다. default로 restricted로 되어 있어 실행이 불가하다. 아래명령을 수행하여 powershell script를 수행할 수 있는 환경으로 변경한다. set-executionpolicy unrestricted https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.security/set-executionpolicy?view=powershell-6 write-host를 통한 메세지 출력 $testval = 1 write-host("testval : {0}" -f $testval) https://devblogs.microsoft.c..
apache에서 mod_wsgi 를 통한 서비스를 하는 방법을 알아보자 우선 /etc/httpd/conf.d/01-wsgi.example.com.conf 를 생성한다.아래는 sample configuration이다. DocumentRoot /var/www/html ServerName wsgi.example.com # 아래 설정에서 마지막 argument는 full path를 넣어주는게 편하다. (향후 관리를 위해서도) WSGIScriptAlias / app.py 실제 python code는 다음과 같다.(필수적으로 application 이라는 function이 존재해야 하고 response header를 포함한 응답이 return 되어야 한다.) def application(environ, start_r..
pyinstaller1. 설치pip 를 활용해 설치를 진행한다.pip installer pyinstaller 2. 사용법이후 간단히 pyinstaller [program.py] 으로 exe 파일로 변환이 가능하다.pyinstaller test.py이후 하위 디렉토리로 dist 라는 directory와 파일명에 맞는 directory가 생성되어있고 exe 파일을 확인할 수 있다. 아래링크는 pyinstaller의 option에 대한 설명이 있다.개인저으로 one file로 생성하는 방법이 궁금하였는데 아래 설명에 따라 -F 옵션을 추가하여 one file로 생성하였다.- https://pythonhosted.org/PyInstaller/usage.html 3. pycharm과 연결방법- https://st..
python 에서는 다음과 같은 XML을 지원한다. SAX, DOM, ElementTree 과 같은 방식이 존재한다. 이중 ElementTree 가 python에 적합하게 구현된 방식이다. lower 2.5 (minidom) from xml.dom import minidom xmldoc = minidom.parse('sample.xml') 참고사이트 - http://wiki.python.org/moin/MiniDom over 2.5 (ElementTree) from xml.etree.ElementTree as ET # import elementtree.ElementTree as ET tree = ET.parse('sample.xml') root = tree.getroot() rootTagName = ro..
- Total
- 53,883
- Today
- 5
- Yesterday
- 85
- vagrant
- minio
- vmware openstack
- crashloopbackoff
- OpenStack
- WayPoint
- socket
- macvlan
- dnssec
- openstack backup
- gluster
- ceph
- wsl2
- ConEmu
- Terraform
- openstacksdk
- Helm Chart
- devops
- hashicorp boundary
- kubernetes install
- ansible
- DevSecOps
- elasticsearch
- Jenkinsfile
- minikube
- galera
- kubernetes
- jenkins
- Vault
- boundary ssh