0
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

pp4(python power for anything)

Posted at

代入文の羅列でデータファイル

Salome-mecaやFreeCADなどのpythonを組み込んだソフトやjsonなどで、プログラミング言語の代入文の羅列でデータを定義できるようにする方法は、だいぶ昔に考えた。
その時CPANにpp4ってスクリプトを登録した。

pp4は、perl power for anythingtte意味でつけた名前。

代入文の羅列したファイルをデータファイルの書式として採用するだけで、構造を持ったデータでもファイル書式を検討したり、データ読み込みルーチンを書かずに済む利点があるのだけど、pp4ではコマンドラインやファイルのパス名からのマッチングからデータを定義する機能を持たせた。
これがあると、パラメーターを変えて複数のケースの計算を実施するのに、パラメーター定義をパス名に含んだディレクトリを作るだけで自動化が出来る様になる。
関連パラメーターがパス名に入っているので、該当のケースのディレクトリも見つけ易い。

pythonの勉強がてら、pp4をpythonで書き直そうか思案中。名前はpp4のままで良いしね。

0
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?