質問編集履歴
3
初心者アイコンというものがあることを知りましたので追加
title
CHANGED
File without changes
|
body
CHANGED
File without changes
|
2
コード用マークダウンの記載変更
title
CHANGED
File without changes
|
body
CHANGED
@@ -10,12 +10,13 @@
|
|
10
10
|
- tests
|
11
11
|
| test.py
|
12
12
|
|
13
|
-
|
13
|
+
`__init__.py`
|
14
|
-
```
|
14
|
+
```python
|
15
15
|
from . import HelloWorld
|
16
16
|
```
|
17
17
|
|
18
|
-
`
|
18
|
+
`HelloWorld`
|
19
|
+
```python
|
19
20
|
class HelloWorld:
|
20
21
|
def __init__(self, say):
|
21
22
|
self.say = say
|
@@ -25,7 +26,8 @@
|
|
25
26
|
return hello
|
26
27
|
```
|
27
28
|
|
29
|
+
`test.py`
|
28
|
-
```
|
30
|
+
```python
|
29
31
|
from .src import HelloWorld #ここが分からないです
|
30
32
|
|
31
33
|
print(HelloWorld.HelloWorld('hello').hello())
|
1
実行方法を記載
title
CHANGED
File without changes
|
body
CHANGED
@@ -34,6 +34,13 @@
|
|
34
34
|
srcフォルダを読み込みたいのですが,全くうまくいきません.
|
35
35
|
|
36
36
|
### 発生している問題・エラーメッセージ
|
37
|
+
|
38
|
+
実行方法は
|
39
|
+
1,anacondaのrootからopen terminalからコマンドラインを起動
|
40
|
+
2.パスを,c:\python\testsに移動
|
41
|
+
3.コマンドを,python test.py
|
42
|
+
と実行しております.
|
43
|
+
|
37
44
|
以下のエラーメッセージが表示されます.
|
38
45
|
```
|
39
46
|
ModuleNotFoundError: No module named '__main__.src'; '__main__' is not a package
|