回答編集履歴

4

変更

2019/12/05 06:27

投稿

jckkvs
jckkvs

スコア152

test CHANGED
@@ -2,18 +2,8 @@
2
2
 
3
3
  print(os.path.exists(dir))
4
4
 
5
+ ```
5
6
 
6
7
 
7
- if os.path.exists(dir) == False:
8
8
 
9
- ftp.mkd(dir)
9
+ この結果はどうなりますか
10
-
11
- s = dir + '/'+upload_file
12
-
13
- ftp.storbinary('STOR '+s, fp)
14
-
15
- ftp.close()
16
-
17
- fp.close()
18
-
19
- ```

3

修正

2019/12/05 06:27

投稿

jckkvs
jckkvs

スコア152

test CHANGED
@@ -1,4 +1,8 @@
1
1
  ```python3
2
+
3
+ print(os.path.exists(dir))
4
+
5
+
2
6
 
3
7
  if os.path.exists(dir) == False:
4
8
 

2

修正

2019/12/05 02:59

投稿

jckkvs
jckkvs

スコア152

test CHANGED
@@ -1,9 +1,3 @@
1
- よく読んでいませんが、os.path.exists(dir)の出力を確認してはどうですか。
2
-
3
-
4
-
5
-
6
-
7
1
  ```python3
8
2
 
9
3
  if os.path.exists(dir) == False:

1

変更

2019/12/05 02:46

投稿

jckkvs
jckkvs

スコア152

test CHANGED
@@ -1 +1,21 @@
1
1
  よく読んでいませんが、os.path.exists(dir)の出力を確認してはどうですか。
2
+
3
+
4
+
5
+
6
+
7
+ ```python3
8
+
9
+ if os.path.exists(dir) == False:
10
+
11
+ ftp.mkd(dir)
12
+
13
+ s = dir + '/'+upload_file
14
+
15
+ ftp.storbinary('STOR '+s, fp)
16
+
17
+ ftp.close()
18
+
19
+ fp.close()
20
+
21
+ ```