less than 1 minute read

알고리즘 풀이 기록 깃에 올릴까?

sport부분이 git 저장소로 되어있지 않은 것을 알았다. 근데 여기에 msvc 캐시 파일 등으로 용량이 커서 git 저장소로 올리려면 .gitignore 설정을 조금 많이 해야 할 것이다.

python 버전 문제

알고스팟에서 파이썬 버전때문에 f string을 쓰지 못하나 했는데, 찾아보니 파이썬에도 js의 babel과 비슷한 것이 있었다.

https://github.com/nvbn/py-backwards

이걸 써서 파이썬 3.7 버전으로 코드를 짜서 3.4버전으로 트랜스파일 할 수 있다.

아래는 파워셸에서 사용하기 위한 makefile 설정

run:
	pwsh -command "Get-Content .\input.txt | python3 .\main.py"
test:
	pwsh -command "Get-Content .\input.txt | python3 .\main.py" test
runc:
	py-backwards -i .\main.py -o .\compiled.py -t 3.4
	pwsh -command "Get-Content .\input.txt | python3 .\compiled.py"
testc:
	py-backwards -i .\main.py -o .\compiled.py -t 3.4
	pwsh -command "Get-Content .\input.txt | python3 .\compiled.py" test

Tags:

Categories:

Updated:

Comments