質問編集履歴

3

windowsでcursesモジュールのインポート

2018/04/12 04:53

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -107,3 +107,39 @@
107
107
  ](https://qiita.com/kjunichi/items/0bf0256ff178f7ab5514)
108
108
 
109
109
  ・[C/C++で作成したDLLのテストをPythonで行う](http://hwada.hatenablog.com/entry/20061004/1159940744)
110
+
111
+
112
+
113
+
114
+
115
+ ### 追記(2018/4/12 14:00)「Windowsでcursesモジュールのインポート」
116
+
117
+ Windowsでcursesモジュールを以下のサイトでimportできました。
118
+
119
+ →[Unofficial Windows Binaries for Python Extension Packages](https://www.lfd.uci.edu/~gohlke/pythonlibs/#curses)
120
+
121
+
122
+
123
+ ファイル名の意味についてはこちらを参考に
124
+
125
+ →[What does version name 'cp27' or 'cp35' mean in Python?
126
+
127
+ ](https://stackoverflow.com/questions/37023557/what-does-version-name-cp27-or-cp35-mean-in-python)
128
+
129
+
130
+
131
+ .whlファイルをインストールする際にエラーが出る場合はこちらを参考に
132
+
133
+ →[filename.whl is not a supported wheel on this platform
134
+
135
+ ](https://stackoverflow.com/questions/38866758/filename-whl-is-not-a-supported-wheel-on-this-platform)
136
+
137
+
138
+
139
+ 自分の場合はファイルのあるディレクトリ上で以下を実行してインストールできました。
140
+
141
+ ```
142
+
143
+ > pip install curses‑2.2‑cp36‑none‑win_amd64.whl
144
+
145
+ ```

2

参考にしたサイトを追加しました

2018/04/12 04:53

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -98,7 +98,7 @@
98
98
 
99
99
  ### 参考にしたサイト
100
100
 
101
-
101
+ ・[コンソールのクリア、カーソル制御](http://blog.livedoor.jp/baruth_/archives/23830740.htmlhttp://)
102
102
 
103
103
  ・[16.16. ctypes — Pythonのための外部関数ライブラリ](https://docs.python.jp/3/library/ctypes.html)
104
104
 

1

文章を追記しました

2018/04/11 03:04

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -11,6 +11,8 @@
11
11
  ```
12
12
 
13
13
  import os
14
+
15
+ import time
14
16
 
15
17
  import ctypes
16
18
 
@@ -34,9 +36,15 @@
34
36
 
35
37
  text += '| ' + str(c) + ' |\n'
36
38
 
39
+ text += '-' * 11
40
+
41
+ print(text)
42
+
37
43
 
38
44
 
39
45
  c += 1
46
+
47
+ time.sleep(0.5)
40
48
 
41
49
  ```
42
50
 
@@ -70,42 +78,32 @@
70
78
 
71
79
 
72
80
 
73
- ###
74
-
75
-
76
-
77
- ```
78
-
79
-
80
-
81
- ```
82
-
83
- エラーメッセージ
84
-
85
- ```
86
-
87
-
88
-
89
- ### 該当スコード
81
+ エラは読み込むライブラリに関数(GetStdHandle)が含まれていないために発生したものだと思うのですが、c++の関数?を扱うためのライブラリ?dll?を読み込むために、自分でファイルを作成するのか、サイトからダウンロードすればいいのかわからない状況です。ご教授頂ければ幸いです。
90
-
91
-
92
-
93
- ```ここに言語名を入力
94
-
95
- ソースコード
96
-
97
- ```
98
82
 
99
83
 
100
84
 
101
85
 
102
86
 
87
+ ### 補足情報
88
+
103
- ここに問題に対して試したことを記載してください。
89
+ macOS High Sierra バージョン10.13.4
90
+
91
+ Python 3.6.4
104
92
 
105
93
 
106
94
 
107
- ### 補足情報(FW/ツールのバージョンど)
95
+ C言語詳しくいです
108
96
 
109
97
 
110
98
 
111
- ここより詳細な情報を記載てください。
99
+ ### 参考にしたサイト
100
+
101
+
102
+
103
+ ・[16.16. ctypes — Pythonのための外部関数ライブラリ](https://docs.python.jp/3/library/ctypes.html)
104
+
105
+ ・[OSXのlibcはlibSystem.B.dylibなのかも
106
+
107
+ ](https://qiita.com/kjunichi/items/0bf0256ff178f7ab5514)
108
+
109
+ ・[C/C++で作成したDLLのテストをPythonで行う](http://hwada.hatenablog.com/entry/20061004/1159940744)