• R/O
  • SSH
  • HTTPS

traclight:


File Info

Rev. 17
Size 384 bytes
Time 2010-09-09 23:57:46
Author tag
Log Message

mod_pythonを使わず、
mod_wsgi(revision_1018_2.3/mod_wsgi_py25_apache22)
を追加して使用するように変更した。
文字列置換のスクリプトの場所を移動した。
スタートメニュー→プログラム→Trac→バックアップのアイコンのリンクを修正した。

Content

#!/usr/local/bin/python

import sys ,re

argvs = sys.argv

if len(argvs) < 3:
    print "Usage: python.exe textreplace.py <appFile> <str0> <str1> ..."
    quit()

fin = open(argvs[1], "r")
s = fin.read()
fin.close()

cnt = 0
for arg in argvs[2:]:
    s = s.replace("STR_REP"+str(cnt),arg)
    cnt = cnt + 1

fout = open(argvs[1], "w")
fout.write(s)
fout.close()
Show on old repository browser