2016-07-26から1日間の記事一覧

Numpyでヘッダーのinclude pathを取得する方法 ( How to print include path of Numpy FIles ? )

Pythonでヘッダーのinclude pathを取得する方法 ( How to print include path of Python FIles ? ) - mcbiophys'sDigital Bio の応用問題. cythonを使うときにsetup.pyでよく使うトリックだが makefileでinclude pathが欲しい場合も当然使える. NUMPY_INCL_P…

Pythonでヘッダーのinclude pathを取得する方法 ( How to print include path of Python FIles ? )

MakefileでPythonのファイルパスを取得したいときなどがたまにあるだろう。 そんなときはsys.prefixのトリックが便利だ. import sys print(sys.prefix) #/usr/local/Cellar/python/2.7.xx/Frameworks/Python.framework/Versions/2.7 etc ... MakefileでPytho…