teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

1

cide

2021/11/10 21:35

投稿

ppy2
ppy2

スコア1

title CHANGED
File without changes
body CHANGED
@@ -1,18 +1,1 @@
1
- python3 ---.py ./input ./output と打った時に./input 内の.txtファイルが開けず、type eroorと表記されます。
2
-
3
- import sys
4
- import glob
5
- import os
6
- import re
7
- file1=sys.argv[1]
8
- file2=sys.argv[2]
9
-
10
-
11
- path = os.path.abspath(file1)
12
- files = glob.glob(path + "/*.txt")
13
- with open(files) as f:
14
- text=f.read()
15
- print(file1)
16
- print(file2)
17
-
18
1
  ファイルを開いてそのテキストを使うのですが、開けず困っています。