gsl-shell.git - gsl-shell

index : gsl-shell.git
gsl-shell
summary refs log tree commit diff
path: root/scripts/unix2dos.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/unix2dos.py')
-rw-r--r--scripts/unix2dos.py 19
1 files changed, 19 insertions, 0 deletions
diff --git a/scripts/unix2dos.py b/scripts/unix2dos.py
new file mode 100644
index 00000000..e7e822b6
--- /dev/null
+++ b/scripts/unix2dos.py
@@ -0,0 +1,19 @@
+import sys
+import os
+
+for fn in sys.argv[1:]:
+ new_name = fn + ".new_"
+
+ fin = open(fn, "rb")
+ fout = open(new_name, "wb")
+
+ for line in fin:
+ nline = line.replace("\n", "015円\n")
+ fout.write(nline)
+
+ fin.close()
+ fout.close()
+
+ os.remove(fn)
+ os.rename(new_name, fn)
+
generated by cgit v1.2.3 (git 2.39.1) at 2025年09月15日 06:59:34 +0000

AltStyle によって変換されたページ (->オリジナル) /