Memoru

System Engineering and Programming and IT

python

1905-conda-operation

**** 1905-conda-operation [ ] FIXME Add articles for configuring requirements.txt *** overview logged operations of conda. *** reference Condaの使い方メモ https://qiita.com/showsuzu/items/e2fddf22f725f4d2ab8c *** logs ** execute Anaconda P…

unittest

unittest unittest.main()は、unittest.TestCaseを継承した全てのクラスのメソッドのうちtestで始まるテストをテストケースとして実行する。 import unittest import calc from add_sample import add class TestCalc(unittest.TestCase): def test_add2(sel…

method on dict

(sandbox) PS G:\workspace\py\sandbox\standards> python Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 16:07:46) [MSC v.1900 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> dir({}) ['__clas…

start working on virtualenvwrapper

procedure PS G:\Users\sakai> cd $Env:PROJECT_HOME PS G:\workspace\py> workon Pass a name to activate one of the following virtualenvs: ============================================================================== djanbox djfirst djfourth …

inspect.stack()

inspect.stack() # ----------------------------------------- # def _get_funcname(): return inspect.stack()[1][3] def sample(): logger = logging.getLogger(__name__) logger.debug('begin ------> {}()'.format(sys._getframe().f_code.co_name)) lo…

os.path

os.path def _sample(): logger = logging.getLogger(__name__) logger.debug('__file__ name : {}'.format(__file__)) logger.debug('basename : {basename}'.format(basename=os.path.basename(__file__))) logger.debug('dirname : {dirname}'.format(dir…

python組み込み変数

組み込み変数 variable content note __file__ 実行script full path __name__ 実行script module sample logging_sample.py #! /usr/bin/env python """sample code for __file__ """ import logging import logging.config import os import sys ### -----…