PyCharmのテンプレートではIDEにはよくある変数の展開ができるのだけども、
その変数をよく忘れちゃうのよね。調べ方も忘れちゃうし。
- ${USER} - login name of the current user.
- ${NAME} - the name of the file that will be created.
- ${DATE} - the current system date.
- ${TIME} - the current system time.
- ${YEAR} - the current year.
- ${MONTH} - the current month.
- ${DAY} - the current day of the month.
- ${HOUR} - the current hour.
- ${MINUTE} - the current minute.
PyCharm 2.0.0 Web Help
そんな感じで、俺のテンプレート。
#! env python
# -*- coding: utf-8 -*-
# Date: ${YEAR}/${MONTH}/${DAY}
# Filename: ${NAME}
# To change this template, choose Tools | Templates
# and open the template in the editor.
__author__ = '$USER'
__date__ ="${YEAR}/${MONTH}/${DAY}"
if __name__ == "__main__":
print "Hello World";
0 件のコメント:
コメントを投稿