Skip to content

Commit 087a707

Browse files
committed
with 문 사용
1 parent 0b24a7b commit 087a707

File tree

4 files changed

+188
-6
lines changed

4 files changed

+188
-6
lines changed

.vscode/launch.json

Lines changed: 186 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,186 @@
1+
{
2+
// IntelliSense를 사용하여 가능한 특성에 대해 알아보세요.
3+
// 기존 특성에 대한 설명을 보려면 가리킵니다.
4+
// 자세한 내용을 보려면 https://go.microsoft.com/fwlink/?linkid=830387을(를) 방문하세요.
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": "Python",
9+
"type": "python",
10+
"request": "launch",
11+
"stopOnEntry": true,
12+
"pythonPath": "${config:python.pythonPath}",
13+
"program": "${file}",
14+
"cwd": "${workspaceFolder}",
15+
"env": {},
16+
"envFile": "${workspaceFolder}/.env",
17+
"debugOptions": [
18+
"RedirectOutput"
19+
]
20+
},
21+
{
22+
"name": "Python: Attach",
23+
"type": "python",
24+
"request": "attach",
25+
"localRoot": "${workspaceFolder}",
26+
"remoteRoot": "${workspaceFolder}",
27+
"port": 3000,
28+
"secret": "my_secret",
29+
"host": "localhost"
30+
},
31+
{
32+
"name": "Python: Terminal (integrated)",
33+
"type": "python",
34+
"request": "launch",
35+
"stopOnEntry": true,
36+
"pythonPath": "${config:python.pythonPath}",
37+
"program": "${file}",
38+
"cwd": "",
39+
"console": "integratedTerminal",
40+
"env": {},
41+
"envFile": "${workspaceFolder}/.env",
42+
"debugOptions": []
43+
},
44+
{
45+
"name": "Python: Terminal (external)",
46+
"type": "python",
47+
"request": "launch",
48+
"stopOnEntry": true,
49+
"pythonPath": "${config:python.pythonPath}",
50+
"program": "${file}",
51+
"cwd": "",
52+
"console": "externalTerminal",
53+
"env": {},
54+
"envFile": "${workspaceFolder}/.env",
55+
"debugOptions": []
56+
},
57+
{
58+
"name": "Python: Django",
59+
"type": "python",
60+
"request": "launch",
61+
"stopOnEntry": true,
62+
"pythonPath": "${config:python.pythonPath}",
63+
"program": "${workspaceFolder}/manage.py",
64+
"cwd": "${workspaceFolder}",
65+
"args": [
66+
"runserver",
67+
"--noreload",
68+
"--nothreading"
69+
],
70+
"env": {},
71+
"envFile": "${workspaceFolder}/.env",
72+
"debugOptions": [
73+
"RedirectOutput",
74+
"DjangoDebugging"
75+
]
76+
},
77+
{
78+
"name": "Python: Flask (0.11.x or later)",
79+
"type": "python",
80+
"request": "launch",
81+
"stopOnEntry": false,
82+
"pythonPath": "${config:python.pythonPath}",
83+
"program": "fully qualified path fo 'flask' executable. Generally located along with python interpreter",
84+
"cwd": "${workspaceFolder}",
85+
"env": {
86+
"FLASK_APP": "${workspaceFolder}/quickstart/app.py"
87+
},
88+
"args": [
89+
"run",
90+
"--no-debugger",
91+
"--no-reload"
92+
],
93+
"envFile": "${workspaceFolder}/.env",
94+
"debugOptions": [
95+
"RedirectOutput"
96+
]
97+
},
98+
{
99+
"name": "Python: Flask (0.10.x or earlier)",
100+
"type": "python",
101+
"request": "launch",
102+
"stopOnEntry": false,
103+
"pythonPath": "${config:python.pythonPath}",
104+
"program": "${workspaceFolder}/run.py",
105+
"cwd": "${workspaceFolder}",
106+
"args": [],
107+
"env": {},
108+
"envFile": "${workspaceFolder}/.env",
109+
"debugOptions": [
110+
"RedirectOutput"
111+
]
112+
},
113+
{
114+
"name": "Python: PySpark",
115+
"type": "python",
116+
"request": "launch",
117+
"stopOnEntry": true,
118+
"osx": {
119+
"pythonPath": "${env:SPARK_HOME}/bin/spark-submit"
120+
},
121+
"windows": {
122+
"pythonPath": "${env:SPARK_HOME}/bin/spark-submit.cmd"
123+
},
124+
"linux": {
125+
"pythonPath": "${env:SPARK_HOME}/bin/spark-submit"
126+
},
127+
"program": "${file}",
128+
"cwd": "${workspaceFolder}",
129+
"env": {},
130+
"envFile": "${workspaceFolder}/.env",
131+
"debugOptions": [
132+
"RedirectOutput"
133+
]
134+
},
135+
{
136+
"name": "Python: Module",
137+
"type": "python",
138+
"request": "launch",
139+
"stopOnEntry": true,
140+
"pythonPath": "${config:python.pythonPath}",
141+
"module": "module.name",
142+
"cwd": "${workspaceFolder}",
143+
"env": {},
144+
"envFile": "${workspaceFolder}/.env",
145+
"debugOptions": [
146+
"RedirectOutput"
147+
]
148+
},
149+
{
150+
"name": "Python: Pyramid",
151+
"type": "python",
152+
"request": "launch",
153+
"stopOnEntry": true,
154+
"pythonPath": "${config:python.pythonPath}",
155+
"cwd": "${workspaceFolder}",
156+
"env": {},
157+
"envFile": "${workspaceFolder}/.env",
158+
"args": [
159+
"${workspaceFolder}/development.ini"
160+
],
161+
"debugOptions": [
162+
"RedirectOutput",
163+
"Pyramid"
164+
]
165+
},
166+
{
167+
"name": "Python: Watson",
168+
"type": "python",
169+
"request": "launch",
170+
"stopOnEntry": true,
171+
"pythonPath": "${config:python.pythonPath}",
172+
"program": "${workspaceFolder}/console.py",
173+
"cwd": "${workspaceFolder}",
174+
"args": [
175+
"dev",
176+
"runserver",
177+
"--noreload=True"
178+
],
179+
"env": {},
180+
"envFile": "${workspaceFolder}/.env",
181+
"debugOptions": [
182+
"RedirectOutput"
183+
]
184+
}
185+
]
186+
}
-12 Bytes
Binary file not shown.

src/mc2snucode.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
def Convert(x1, y1, z1, x2, y2, z2):
66
mc = minecraft.Minecraft.create()
7-
file = open("convert.txt", 'w')
87

98
xhigh = max(x1, x2)
109
xlow = min(x1, x2)
@@ -70,6 +69,5 @@ def Convert(x1, y1, z1, x2, y2, z2):
7069
textData += " }\n"
7170
textData += "}\n"
7271

73-
file.write(textData)
74-
file.close()
75-
# return blocks
72+
with open("convert.txt", 'wt') as file:
73+
file.write(textData)

src/mcCommand.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,10 @@ def do_convert(self, args):
2323

2424
def do_setPos1(self, args):
2525
self.startPos = self.mc.player.getTilePos()
26-
# self.startPos = minecraft.Vec3(681, 4, 79)
2726
print(str(self.startPos))
2827

2928
def do_setPos2(self, args):
3029
self.endPos = self.mc.player.getTilePos()
31-
# self.endPos = minecraft.Vec3(679, 4, 81)
3230
print(str(self.endPos))
3331

3432

0 commit comments

Comments
 (0)