GentBG x PUSSTEEM - burning both STEEM and PUSS

Image
by joviansummer original STEEMIT post: https://steemit.com/blog/@joviansummer/gentbg-x-pussteem-burning-both-steem-and-puss Hello, this is @joviansummer(witness: @jswit), developer of GentBG project. I registered @gentbg account to PUSSTEEM about a week ago and donated some of my own PUSS token to @gentbg's EPUSS account. Now, @gentbg will burn STEEM and EPUSS at the same time. PUSSTEEM's boosting upvotes will help increasing baseline burning significantly. @gentbg's SP reward is delegate to @jsup to get automated upvotes, forming a baseline burning of liquid reward independent of other people's upvotes. Some may argue 100%(both liquid and SP reward) burning is much better, but I chose this approach to prevent @gentbg from becoming a spamming account. Constantly asking for upvotes via mentioning and commenting every week may eventually become a big annoyance to curators. That being said, anyone is welcome to participate in countering STEEM inflation by giving upvotes ...

파이썬에서 실행 명령에 인자(argument) 지정

by joviansummer
original STEEMIT post: https://steemit.com/blog/@joviansummer/argument


파이썬 스크립트를 실행할 때 실행 명령에 인자(argument)를 지정할 수 있습니다. 예를 들어 인자를 확인해서 이를 그대로 출력하는 스크립트 test.py를 만든다고 생각해 보겠습니다.

아래와 같은 실행 결과를 주는 스크립트입니다.

python3 test.py hello

test.py hello

python3 test.py hello world

test.py hello world

위의 스크립트는 아래와 같은 내용으로 작성되었습니다.

import sys

for arg in sys.argv:
  print(arg)

실행 명령의 인자는 sys.argv에 저장되며, 리스트(list) 형식입니다. 위의 예시에서는 for 반복문으로 sys.argv[0]부터 차례로 출력하였습니다.

2번째 예시의 경우(실행 명령: python3 test.py hello world) sys.argv에는 아래와 같이 값이 할당될 것입니다.

sys.argv[0]: 'test.py'(스크립트의 이름) sys.argv[1]: 'hello' (첫번째 인자) sys.argv[2]: 'world' (2번째 인자)

Comments

Popular posts from this blog

스티미언의 영향력 지수 계산

jsup/avle code update - you don't have to write post everyday

jsup/avle 보팅 코드 갱신 - 1일1포스팅 강박에서 벗어나기