ConsoleFramework 1.3.0__tar.gz → 1.3.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {consoleframework-1.3.0 → consoleframework-1.3.1}/ConsoleFramework/core.cpp +212 -136
- {consoleframework-1.3.0 → consoleframework-1.3.1}/ConsoleFramework.egg-info/PKG-INFO +1 -1
- {consoleframework-1.3.0 → consoleframework-1.3.1}/PKG-INFO +1 -1
- {consoleframework-1.3.0 → consoleframework-1.3.1}/setup.py +1 -1
- {consoleframework-1.3.0 → consoleframework-1.3.1}/ConsoleFramework/__init__.py +0 -0
- {consoleframework-1.3.0 → consoleframework-1.3.1}/ConsoleFramework/core.cpython-313-aarch64-linux-android.so +0 -0
- {consoleframework-1.3.0 → consoleframework-1.3.1}/ConsoleFramework.egg-info/SOURCES.txt +0 -0
- {consoleframework-1.3.0 → consoleframework-1.3.1}/ConsoleFramework.egg-info/dependency_links.txt +0 -0
- {consoleframework-1.3.0 → consoleframework-1.3.1}/ConsoleFramework.egg-info/not-zip-safe +0 -0
- {consoleframework-1.3.0 → consoleframework-1.3.1}/ConsoleFramework.egg-info/top_level.txt +0 -0
- {consoleframework-1.3.0 → consoleframework-1.3.1}/MANIFEST.in +0 -0
- {consoleframework-1.3.0 → consoleframework-1.3.1}/setup.cfg +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
ConsoleFramework - The best Console Library of the Python.
|
|
3
3
|
By: Suleiman
|
|
4
|
-
Copyright
|
|
4
|
+
Copyright В© Suleiman 2026
|
|
5
5
|
All rights are reserved.
|
|
6
6
|
*/
|
|
7
7
|
#include <Python.h>
|
|
@@ -81,34 +81,42 @@ static void project_3d(Vec3 v, double rx, double ry, double rz, double scale, in
|
|
|
81
81
|
*oy = (int)(-v.y * scale + cy);
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
-
static PyObject* rgb(PyObject* self, PyObject* args) {
|
|
84
|
+
static PyObject* rgb(PyObject* self, PyObject* args, PyObject* kwargs) {
|
|
85
85
|
int r, g, b;
|
|
86
|
-
|
|
86
|
+
static char* kwlist[] = {"r", "g", "b", NULL};
|
|
87
|
+
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "iii", kwlist, &r, &g, &b))
|
|
88
|
+
return NULL;
|
|
87
89
|
char buf[32];
|
|
88
90
|
sprintf(buf, "\033[38;2;%d;%d;%dm", r, g, b);
|
|
89
91
|
return PyUnicode_FromString(buf);
|
|
90
92
|
}
|
|
91
93
|
|
|
92
|
-
static PyObject* bg_rgb(PyObject* self, PyObject* args) {
|
|
94
|
+
static PyObject* bg_rgb(PyObject* self, PyObject* args, PyObject* kwargs) {
|
|
93
95
|
int r, g, b;
|
|
94
|
-
|
|
96
|
+
static char* kwlist[] = {"r", "g", "b", NULL};
|
|
97
|
+
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "iii", kwlist, &r, &g, &b))
|
|
98
|
+
return NULL;
|
|
95
99
|
char buf[32];
|
|
96
100
|
sprintf(buf, "\033[48;2;%d;%d;%dm", r, g, b);
|
|
97
101
|
return PyUnicode_FromString(buf);
|
|
98
102
|
}
|
|
99
103
|
|
|
100
|
-
static PyObject* colorize(PyObject* self, PyObject* args) {
|
|
104
|
+
static PyObject* colorize(PyObject* self, PyObject* args, PyObject* kwargs) {
|
|
101
105
|
const char* text, *color;
|
|
102
106
|
int reset = 1;
|
|
103
|
-
|
|
107
|
+
static char* kwlist[] = {"text", "color", "reset", NULL};
|
|
108
|
+
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "ss|i", kwlist, &text, &color, &reset))
|
|
109
|
+
return NULL;
|
|
104
110
|
string result = string(color) + text + (reset ? "\033[0m" : "");
|
|
105
111
|
return PyUnicode_FromString(result.c_str());
|
|
106
112
|
}
|
|
107
113
|
|
|
108
|
-
static PyObject* get_line_points(PyObject* self, PyObject* args) {
|
|
114
|
+
static PyObject* get_line_points(PyObject* self, PyObject* args, PyObject* kwargs) {
|
|
109
115
|
int x1, y1, x2, y2;
|
|
110
116
|
const char* ch = "#";
|
|
111
|
-
|
|
117
|
+
static char* kwlist[] = {"x1", "y1", "x2", "y2", "char", NULL};
|
|
118
|
+
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "iiii|s", kwlist, &x1, &y1, &x2, &y2, &ch))
|
|
119
|
+
return NULL;
|
|
112
120
|
PyObject* list = PyList_New(0);
|
|
113
121
|
int dx = abs(x2 - x1);
|
|
114
122
|
int dy = abs(y2 - y1);
|
|
@@ -130,10 +138,12 @@ static PyObject* get_line_points(PyObject* self, PyObject* args) {
|
|
|
130
138
|
return list;
|
|
131
139
|
}
|
|
132
140
|
|
|
133
|
-
static PyObject* get_circle_points(PyObject* self, PyObject* args) {
|
|
141
|
+
static PyObject* get_circle_points(PyObject* self, PyObject* args, PyObject* kwargs) {
|
|
134
142
|
int cx, cy, r;
|
|
135
143
|
const char* ch = "#";
|
|
136
|
-
|
|
144
|
+
static char* kwlist[] = {"cx", "cy", "r", "char", NULL};
|
|
145
|
+
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "iii|s", kwlist, &cx, &cy, &r, &ch))
|
|
146
|
+
return NULL;
|
|
137
147
|
PyObject* list = PyList_New(0);
|
|
138
148
|
for (int angle = 0; angle < 360; angle += 5) {
|
|
139
149
|
double rad = angle * M_PI / 180.0;
|
|
@@ -149,10 +159,12 @@ static PyObject* get_circle_points(PyObject* self, PyObject* args) {
|
|
|
149
159
|
return list;
|
|
150
160
|
}
|
|
151
161
|
|
|
152
|
-
static PyObject* get_filled_circle_points(PyObject* self, PyObject* args) {
|
|
162
|
+
static PyObject* get_filled_circle_points(PyObject* self, PyObject* args, PyObject* kwargs) {
|
|
153
163
|
int cx, cy, r;
|
|
154
164
|
const char* ch = "#";
|
|
155
|
-
|
|
165
|
+
static char* kwlist[] = {"cx", "cy", "r", "char", NULL};
|
|
166
|
+
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "iii|s", kwlist, &cx, &cy, &r, &ch))
|
|
167
|
+
return NULL;
|
|
156
168
|
PyObject* list = PyList_New(0);
|
|
157
169
|
for (int y = cy - r; y <= cy + r; y++) {
|
|
158
170
|
for (int x = cx - r; x <= cx + r; x++) {
|
|
@@ -169,10 +181,12 @@ static PyObject* get_filled_circle_points(PyObject* self, PyObject* args) {
|
|
|
169
181
|
return list;
|
|
170
182
|
}
|
|
171
183
|
|
|
172
|
-
static PyObject* get_rect_points(PyObject* self, PyObject* args) {
|
|
184
|
+
static PyObject* get_rect_points(PyObject* self, PyObject* args, PyObject* kwargs) {
|
|
173
185
|
int x1, y1, x2, y2;
|
|
174
186
|
const char* ch = "#";
|
|
175
|
-
|
|
187
|
+
static char* kwlist[] = {"x1", "y1", "x2", "y2", "char", NULL};
|
|
188
|
+
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "iiii|s", kwlist, &x1, &y1, &x2, &y2, &ch))
|
|
189
|
+
return NULL;
|
|
176
190
|
PyObject* list = PyList_New(0);
|
|
177
191
|
for (int x = x1; x <= x2; x++) {
|
|
178
192
|
PyObject* t1 = PyTuple_New(3);
|
|
@@ -205,10 +219,12 @@ static PyObject* get_rect_points(PyObject* self, PyObject* args) {
|
|
|
205
219
|
return list;
|
|
206
220
|
}
|
|
207
221
|
|
|
208
|
-
static PyObject* get_fill_rect_points(PyObject* self, PyObject* args) {
|
|
222
|
+
static PyObject* get_fill_rect_points(PyObject* self, PyObject* args, PyObject* kwargs) {
|
|
209
223
|
int x1, y1, x2, y2;
|
|
210
224
|
const char* ch = "#";
|
|
211
|
-
|
|
225
|
+
static char* kwlist[] = {"x1", "y1", "x2", "y2", "char", NULL};
|
|
226
|
+
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "iiii|s", kwlist, &x1, &y1, &x2, &y2, &ch))
|
|
227
|
+
return NULL;
|
|
212
228
|
PyObject* list = PyList_New(0);
|
|
213
229
|
for (int y = y1; y <= y2; y++) {
|
|
214
230
|
for (int x = x1; x <= x2; x++) {
|
|
@@ -223,10 +239,12 @@ static PyObject* get_fill_rect_points(PyObject* self, PyObject* args) {
|
|
|
223
239
|
return list;
|
|
224
240
|
}
|
|
225
241
|
|
|
226
|
-
static PyObject* get_triangle_points(PyObject* self, PyObject* args) {
|
|
242
|
+
static PyObject* get_triangle_points(PyObject* self, PyObject* args, PyObject* kwargs) {
|
|
227
243
|
int x1, y1, x2, y2, x3, y3;
|
|
228
244
|
const char* ch = "#";
|
|
229
|
-
|
|
245
|
+
static char* kwlist[] = {"x1", "y1", "x2", "y2", "x3", "y3", "char", NULL};
|
|
246
|
+
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "iiiiii|s", kwlist, &x1, &y1, &x2, &y2, &x3, &y3, &ch))
|
|
247
|
+
return NULL;
|
|
230
248
|
PyObject* list = PyList_New(0);
|
|
231
249
|
vector<pair<int,int>> pts;
|
|
232
250
|
int dx = abs(x2 - x1), dy = abs(y2 - y1);
|
|
@@ -270,10 +288,12 @@ static PyObject* get_triangle_points(PyObject* self, PyObject* args) {
|
|
|
270
288
|
return list;
|
|
271
289
|
}
|
|
272
290
|
|
|
273
|
-
static PyObject* get_filled_triangle_points(PyObject* self, PyObject* args) {
|
|
291
|
+
static PyObject* get_filled_triangle_points(PyObject* self, PyObject* args, PyObject* kwargs) {
|
|
274
292
|
int x1, y1, x2, y2, x3, y3;
|
|
275
293
|
const char* ch = "#";
|
|
276
|
-
|
|
294
|
+
static char* kwlist[] = {"x1", "y1", "x2", "y2", "x3", "y3", "char", NULL};
|
|
295
|
+
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "iiiiii|s", kwlist, &x1, &y1, &x2, &y2, &x3, &y3, &ch))
|
|
296
|
+
return NULL;
|
|
277
297
|
PyObject* list = PyList_New(0);
|
|
278
298
|
int min_x = min(x1, min(x2, x3));
|
|
279
299
|
int max_x = max(x1, max(x2, x3));
|
|
@@ -294,10 +314,12 @@ static PyObject* get_filled_triangle_points(PyObject* self, PyObject* args) {
|
|
|
294
314
|
return list;
|
|
295
315
|
}
|
|
296
316
|
|
|
297
|
-
static PyObject* get_heart_points(PyObject* self, PyObject* args) {
|
|
317
|
+
static PyObject* get_heart_points(PyObject* self, PyObject* args, PyObject* kwargs) {
|
|
298
318
|
int cx, cy, size = 5;
|
|
299
319
|
const char* ch = "#";
|
|
300
|
-
|
|
320
|
+
static char* kwlist[] = {"cx", "cy", "size", "char", NULL};
|
|
321
|
+
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "ii|is", kwlist, &cx, &cy, &size, &ch))
|
|
322
|
+
return NULL;
|
|
301
323
|
PyObject* list = PyList_New(0);
|
|
302
324
|
for (int y = -size; y <= size; y++) {
|
|
303
325
|
for (int x = -size; x <= size; x++) {
|
|
@@ -315,11 +337,12 @@ static PyObject* get_heart_points(PyObject* self, PyObject* args) {
|
|
|
315
337
|
return list;
|
|
316
338
|
}
|
|
317
339
|
|
|
318
|
-
|
|
319
|
-
static PyObject* get_star_points(PyObject* self, PyObject* args) {
|
|
340
|
+
static PyObject* get_star_points(PyObject* self, PyObject* args, PyObject* kwargs) {
|
|
320
341
|
int cx, cy, radius = 5, points_count = 5;
|
|
321
342
|
const char* ch = "*";
|
|
322
|
-
|
|
343
|
+
static char* kwlist[] = {"cx", "cy", "radius", "points_count", "char", NULL};
|
|
344
|
+
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "ii|iis", kwlist, &cx, &cy, &radius, &points_count, &ch))
|
|
345
|
+
return NULL;
|
|
323
346
|
PyObject* list = PyList_New(0);
|
|
324
347
|
double angle = -M_PI / 2.0;
|
|
325
348
|
double step = M_PI / points_count;
|
|
@@ -371,10 +394,12 @@ static PyObject* get_star_points(PyObject* self, PyObject* args) {
|
|
|
371
394
|
return list;
|
|
372
395
|
}
|
|
373
396
|
|
|
374
|
-
static PyObject* get_wave_points(PyObject* self, PyObject* args) {
|
|
397
|
+
static PyObject* get_wave_points(PyObject* self, PyObject* args, PyObject* kwargs) {
|
|
375
398
|
int cx, cy, amplitude = 5, length = 20;
|
|
376
399
|
const char* ch = "~";
|
|
377
|
-
|
|
400
|
+
static char* kwlist[] = {"cx", "cy", "amplitude", "length", "char", NULL};
|
|
401
|
+
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "ii|iis", kwlist, &cx, &cy, &litude, &length, &ch))
|
|
402
|
+
return NULL;
|
|
378
403
|
PyObject* list = PyList_New(0);
|
|
379
404
|
for (int x = 0; x < length; x++) {
|
|
380
405
|
int y = cy + (int)(amplitude * sin(x * 0.5));
|
|
@@ -388,11 +413,13 @@ static PyObject* get_wave_points(PyObject* self, PyObject* args) {
|
|
|
388
413
|
return list;
|
|
389
414
|
}
|
|
390
415
|
|
|
391
|
-
static PyObject* get_spiral_points(PyObject* self, PyObject* args) {
|
|
416
|
+
static PyObject* get_spiral_points(PyObject* self, PyObject* args, PyObject* kwargs) {
|
|
392
417
|
int cx, cy, turns = 3, radius = 10;
|
|
393
418
|
double step = 0.1;
|
|
394
419
|
const char* ch = "*";
|
|
395
|
-
|
|
420
|
+
static char* kwlist[] = {"cx", "cy", "turns", "radius", "step", "char", NULL};
|
|
421
|
+
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "ii|iids", kwlist, &cx, &cy, &turns, &radius, &step, &ch))
|
|
422
|
+
return NULL;
|
|
396
423
|
PyObject* list = PyList_New(0);
|
|
397
424
|
double angle = 0, r = 0;
|
|
398
425
|
while (r < radius) {
|
|
@@ -410,10 +437,12 @@ static PyObject* get_spiral_points(PyObject* self, PyObject* args) {
|
|
|
410
437
|
return list;
|
|
411
438
|
}
|
|
412
439
|
|
|
413
|
-
static PyObject* get_bezier_points(PyObject* self, PyObject* args) {
|
|
440
|
+
static PyObject* get_bezier_points(PyObject* self, PyObject* args, PyObject* kwargs) {
|
|
414
441
|
int x1, y1, x2, y2, x3, y3, steps = 20;
|
|
415
442
|
const char* ch = "#";
|
|
416
|
-
|
|
443
|
+
static char* kwlist[] = {"x1", "y1", "x2", "y2", "x3", "y3", "steps", "char", NULL};
|
|
444
|
+
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "iiiiii|is", kwlist, &x1, &y1, &x2, &y2, &x3, &y3, &steps, &ch))
|
|
445
|
+
return NULL;
|
|
417
446
|
PyObject* list = PyList_New(0);
|
|
418
447
|
for (int t = 0; t <= steps; t++) {
|
|
419
448
|
double tt = (double)t / steps;
|
|
@@ -429,10 +458,12 @@ static PyObject* get_bezier_points(PyObject* self, PyObject* args) {
|
|
|
429
458
|
return list;
|
|
430
459
|
}
|
|
431
460
|
|
|
432
|
-
static PyObject* get_grid_points(PyObject* self, PyObject* args) {
|
|
461
|
+
static PyObject* get_grid_points(PyObject* self, PyObject* args, PyObject* kwargs) {
|
|
433
462
|
int x1, y1, x2, y2, step = 2;
|
|
434
463
|
const char* ch = "+";
|
|
435
|
-
|
|
464
|
+
static char* kwlist[] = {"x1", "y1", "x2", "y2", "step", "char", NULL};
|
|
465
|
+
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "iiii|is", kwlist, &x1, &y1, &x2, &y2, &step, &ch))
|
|
466
|
+
return NULL;
|
|
436
467
|
PyObject* list = PyList_New(0);
|
|
437
468
|
for (int x = x1; x <= x2; x += step) {
|
|
438
469
|
for (int y = y1; y <= y2; y += step) {
|
|
@@ -447,10 +478,12 @@ static PyObject* get_grid_points(PyObject* self, PyObject* args) {
|
|
|
447
478
|
return list;
|
|
448
479
|
}
|
|
449
480
|
|
|
450
|
-
static PyObject* get_noise_points(PyObject* self, PyObject* args) {
|
|
481
|
+
static PyObject* get_noise_points(PyObject* self, PyObject* args, PyObject* kwargs) {
|
|
451
482
|
int cx, cy, radius, count = 50;
|
|
452
483
|
const char* ch = ".";
|
|
453
|
-
|
|
484
|
+
static char* kwlist[] = {"cx", "cy", "radius", "count", "char", NULL};
|
|
485
|
+
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "iii|is", kwlist, &cx, &cy, &radius, &count, &ch))
|
|
486
|
+
return NULL;
|
|
454
487
|
PyObject* list = PyList_New(0);
|
|
455
488
|
srand(time(NULL));
|
|
456
489
|
for (int i = 0; i < count; i++) {
|
|
@@ -468,12 +501,14 @@ static PyObject* get_noise_points(PyObject* self, PyObject* args) {
|
|
|
468
501
|
return list;
|
|
469
502
|
}
|
|
470
503
|
|
|
471
|
-
static PyObject* get_cube_3d_points(PyObject* self, PyObject* args) {
|
|
504
|
+
static PyObject* get_cube_3d_points(PyObject* self, PyObject* args, PyObject* kwargs) {
|
|
472
505
|
int size = 5;
|
|
473
506
|
double rotx = 0, roty = 0, rotz = 0, scale = 10.0;
|
|
474
507
|
int cx = 40, cy = 12;
|
|
475
508
|
const char* ch = "#";
|
|
476
|
-
|
|
509
|
+
static char* kwlist[] = {"size", "rotx", "roty", "rotz", "scale", "cx", "cy", "char", NULL};
|
|
510
|
+
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|iddddis", kwlist, &size, &rotx, &roty, &rotz, &scale, &cx, &cy, &ch))
|
|
511
|
+
return NULL;
|
|
477
512
|
PyObject* list = PyList_New(0);
|
|
478
513
|
double s = size / 2.0;
|
|
479
514
|
Vec3 vertices[8] = {
|
|
@@ -511,12 +546,14 @@ static PyObject* get_cube_3d_points(PyObject* self, PyObject* args) {
|
|
|
511
546
|
return list;
|
|
512
547
|
}
|
|
513
548
|
|
|
514
|
-
static PyObject* get_sphere_3d_points(PyObject* self, PyObject* args) {
|
|
549
|
+
static PyObject* get_sphere_3d_points(PyObject* self, PyObject* args, PyObject* kwargs) {
|
|
515
550
|
int radius = 5, segments = 12;
|
|
516
551
|
double rotx = 0, roty = 0, rotz = 0, scale = 10.0;
|
|
517
552
|
int cx = 40, cy = 12;
|
|
518
553
|
const char* ch = "#";
|
|
519
|
-
|
|
554
|
+
static char* kwlist[] = {"radius", "segments", "rotx", "roty", "rotz", "scale", "cx", "cy", "char", NULL};
|
|
555
|
+
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|iidddis", kwlist, &radius, &segments, &rotx, &roty, &rotz, &scale, &cx, &cy, &ch))
|
|
556
|
+
return NULL;
|
|
520
557
|
PyObject* list = PyList_New(0);
|
|
521
558
|
for (int i = 0; i < segments; i++) {
|
|
522
559
|
double theta = (double)i / segments * M_PI;
|
|
@@ -536,12 +573,15 @@ static PyObject* get_sphere_3d_points(PyObject* self, PyObject* args) {
|
|
|
536
573
|
return list;
|
|
537
574
|
}
|
|
538
575
|
|
|
539
|
-
|
|
576
|
+
|
|
577
|
+
static PyObject* get_cylinder_3d_points(PyObject* self, PyObject* args, PyObject* kwargs) {
|
|
540
578
|
int radius = 5, height = 10, segments = 12;
|
|
541
579
|
double rotx = 0, roty = 0, rotz = 0, scale = 10.0;
|
|
542
580
|
int cx = 40, cy = 12;
|
|
543
581
|
const char* ch = "#";
|
|
544
|
-
|
|
582
|
+
static char* kwlist[] = {"radius", "height", "segments", "rotx", "roty", "rotz", "scale", "cx", "cy", "char", NULL};
|
|
583
|
+
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|iiidddis", kwlist, &radius, &height, &segments, &rotx, &roty, &rotz, &scale, &cx, &cy, &ch))
|
|
584
|
+
return NULL;
|
|
545
585
|
PyObject* list = PyList_New(0);
|
|
546
586
|
Vec3 top[100], bottom[100];
|
|
547
587
|
for (int i = 0; i < segments; i++) {
|
|
@@ -613,12 +653,14 @@ static PyObject* get_cylinder_3d_points(PyObject* self, PyObject* args) {
|
|
|
613
653
|
return list;
|
|
614
654
|
}
|
|
615
655
|
|
|
616
|
-
static PyObject* get_cone_3d_points(PyObject* self, PyObject* args) {
|
|
656
|
+
static PyObject* get_cone_3d_points(PyObject* self, PyObject* args, PyObject* kwargs) {
|
|
617
657
|
int radius = 5, height = 10, segments = 12;
|
|
618
658
|
double rotx = 0, roty = 0, rotz = 0, scale = 10.0;
|
|
619
659
|
int cx = 40, cy = 12;
|
|
620
660
|
const char* ch = "#";
|
|
621
|
-
|
|
661
|
+
static char* kwlist[] = {"radius", "height", "segments", "rotx", "roty", "rotz", "scale", "cx", "cy", "char", NULL};
|
|
662
|
+
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|iiidddis", kwlist, &radius, &height, &segments, &rotx, &roty, &rotz, &scale, &cx, &cy, &ch))
|
|
663
|
+
return NULL;
|
|
622
664
|
PyObject* list = PyList_New(0);
|
|
623
665
|
Vec3 base[100];
|
|
624
666
|
for (int i = 0; i < segments; i++) {
|
|
@@ -671,12 +713,14 @@ static PyObject* get_cone_3d_points(PyObject* self, PyObject* args) {
|
|
|
671
713
|
return list;
|
|
672
714
|
}
|
|
673
715
|
|
|
674
|
-
static PyObject* get_torus_3d_points(PyObject* self, PyObject* args) {
|
|
716
|
+
static PyObject* get_torus_3d_points(PyObject* self, PyObject* args, PyObject* kwargs) {
|
|
675
717
|
int radius = 8, tube = 3, segments = 16;
|
|
676
718
|
double rotx = 0, roty = 0, rotz = 0, scale = 10.0;
|
|
677
719
|
int cx = 40, cy = 12;
|
|
678
720
|
const char* ch = "#";
|
|
679
|
-
|
|
721
|
+
static char* kwlist[] = {"radius", "tube", "segments", "rotx", "roty", "rotz", "scale", "cx", "cy", "char", NULL};
|
|
722
|
+
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|iiidddis", kwlist, &radius, &tube, &segments, &rotx, &roty, &rotz, &scale, &cx, &cy, &ch))
|
|
723
|
+
return NULL;
|
|
680
724
|
PyObject* list = PyList_New(0);
|
|
681
725
|
for (int i = 0; i < segments; i++) {
|
|
682
726
|
double theta = (double)i / segments * 2 * M_PI;
|
|
@@ -696,12 +740,14 @@ static PyObject* get_torus_3d_points(PyObject* self, PyObject* args) {
|
|
|
696
740
|
return list;
|
|
697
741
|
}
|
|
698
742
|
|
|
699
|
-
static PyObject* get_ico_sphere_3d_points(PyObject* self, PyObject* args) {
|
|
743
|
+
static PyObject* get_ico_sphere_3d_points(PyObject* self, PyObject* args, PyObject* kwargs) {
|
|
700
744
|
int radius = 5;
|
|
701
745
|
double rotx = 0, roty = 0, rotz = 0, scale = 10.0;
|
|
702
746
|
int cx = 40, cy = 12;
|
|
703
747
|
const char* ch = "#";
|
|
704
|
-
|
|
748
|
+
static char* kwlist[] = {"radius", "rotx", "roty", "rotz", "scale", "cx", "cy", "char", NULL};
|
|
749
|
+
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|idddis", kwlist, &radius, &rotx, &roty, &rotz, &scale, &cx, &cy, &ch))
|
|
750
|
+
return NULL;
|
|
705
751
|
PyObject* list = PyList_New(0);
|
|
706
752
|
double phi = (1 + sqrt(5)) / 2.0;
|
|
707
753
|
Vec3 verts[12] = {
|
|
@@ -751,11 +797,13 @@ static PyObject* get_ico_sphere_3d_points(PyObject* self, PyObject* args) {
|
|
|
751
797
|
return list;
|
|
752
798
|
}
|
|
753
799
|
|
|
754
|
-
static PyObject* DrawPic(PyObject* self, PyObject* args) {
|
|
800
|
+
static PyObject* DrawPic(PyObject* self, PyObject* args, PyObject* kwargs) {
|
|
755
801
|
PyObject* points = NULL;
|
|
756
802
|
int width = 80, height = 25, clear_before = 0;
|
|
757
803
|
const char* default_char = " ";
|
|
758
|
-
|
|
804
|
+
static char* kwlist[] = {"points", "width", "height", "clear_before", "default_char", NULL};
|
|
805
|
+
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|Oiiis", kwlist, &points, &width, &height, &clear_before, &default_char))
|
|
806
|
+
return NULL;
|
|
759
807
|
if (clear_before) {
|
|
760
808
|
#ifdef _WIN32
|
|
761
809
|
system("cls");
|
|
@@ -788,7 +836,7 @@ static PyObject* DrawPic(PyObject* self, PyObject* args) {
|
|
|
788
836
|
Py_RETURN_NONE;
|
|
789
837
|
}
|
|
790
838
|
|
|
791
|
-
static PyObject* GetKey(PyObject* self, PyObject* args) {
|
|
839
|
+
static PyObject* GetKey(PyObject* self, PyObject* args, PyObject* kwargs) {
|
|
792
840
|
#ifdef _WIN32
|
|
793
841
|
int ch = _getch();
|
|
794
842
|
#else
|
|
@@ -803,19 +851,23 @@ static PyObject* GetKey(PyObject* self, PyObject* args) {
|
|
|
803
851
|
return PyUnicode_FromStringAndSize(&ch, 1);
|
|
804
852
|
}
|
|
805
853
|
|
|
806
|
-
static PyObject* StartPyCode(PyObject* self, PyObject* args) {
|
|
854
|
+
static PyObject* StartPyCode(PyObject* self, PyObject* args, PyObject* kwargs) {
|
|
807
855
|
const char* code;
|
|
808
856
|
int wait = 0;
|
|
809
|
-
|
|
857
|
+
static char* kwlist[] = {"code", "wait", NULL};
|
|
858
|
+
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s|i", kwlist, &code, &wait))
|
|
859
|
+
return NULL;
|
|
810
860
|
string cmd = "python -c \"" + string(code) + "\"";
|
|
811
861
|
if (!wait) cmd += " &";
|
|
812
862
|
int result = system(cmd.c_str());
|
|
813
863
|
return PyLong_FromLong(result);
|
|
814
864
|
}
|
|
815
865
|
|
|
816
|
-
static PyObject* KillPyScript(PyObject* self, PyObject* args) {
|
|
866
|
+
static PyObject* KillPyScript(PyObject* self, PyObject* args, PyObject* kwargs) {
|
|
817
867
|
int pid;
|
|
818
|
-
|
|
868
|
+
static char* kwlist[] = {"pid", NULL};
|
|
869
|
+
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i", kwlist, &pid))
|
|
870
|
+
return NULL;
|
|
819
871
|
#ifdef _WIN32
|
|
820
872
|
string cmd = "taskkill /PID " + to_string(pid);
|
|
821
873
|
#else
|
|
@@ -825,9 +877,11 @@ static PyObject* KillPyScript(PyObject* self, PyObject* args) {
|
|
|
825
877
|
return PyLong_FromLong(result);
|
|
826
878
|
}
|
|
827
879
|
|
|
828
|
-
static PyObject* IsRunning(PyObject* self, PyObject* args) {
|
|
880
|
+
static PyObject* IsRunning(PyObject* self, PyObject* args, PyObject* kwargs) {
|
|
829
881
|
int pid;
|
|
830
|
-
|
|
882
|
+
static char* kwlist[] = {"pid", NULL};
|
|
883
|
+
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i", kwlist, &pid))
|
|
884
|
+
return NULL;
|
|
831
885
|
#ifdef _WIN32
|
|
832
886
|
HANDLE process = OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, pid);
|
|
833
887
|
if (process) {
|
|
@@ -843,7 +897,7 @@ static PyObject* IsRunning(PyObject* self, PyObject* args) {
|
|
|
843
897
|
#endif
|
|
844
898
|
}
|
|
845
899
|
|
|
846
|
-
static PyObject* GetCurrentPID(PyObject* self, PyObject* args) {
|
|
900
|
+
static PyObject* GetCurrentPID(PyObject* self, PyObject* args, PyObject* kwargs) {
|
|
847
901
|
#ifdef _WIN32
|
|
848
902
|
return PyLong_FromLong(GetCurrentProcessId());
|
|
849
903
|
#else
|
|
@@ -851,10 +905,11 @@ static PyObject* GetCurrentPID(PyObject* self, PyObject* args) {
|
|
|
851
905
|
#endif
|
|
852
906
|
}
|
|
853
907
|
|
|
854
|
-
static PyObject* WaitForProcess(PyObject* self, PyObject* args) {
|
|
855
|
-
int pid;
|
|
856
|
-
|
|
857
|
-
if (!
|
|
908
|
+
static PyObject* WaitForProcess(PyObject* self, PyObject* args, PyObject* kwargs) {
|
|
909
|
+
int pid, timeout = -1;
|
|
910
|
+
static char* kwlist[] = {"pid", "timeout", NULL};
|
|
911
|
+
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i|i", kwlist, &pid, &timeout))
|
|
912
|
+
return NULL;
|
|
858
913
|
int elapsed = 0;
|
|
859
914
|
while (true) {
|
|
860
915
|
#ifdef _WIN32
|
|
@@ -874,7 +929,7 @@ static PyObject* WaitForProcess(PyObject* self, PyObject* args) {
|
|
|
874
929
|
}
|
|
875
930
|
}
|
|
876
931
|
|
|
877
|
-
static PyObject* GetProcessList(PyObject* self, PyObject* args) {
|
|
932
|
+
static PyObject* GetProcessList(PyObject* self, PyObject* args, PyObject* kwargs) {
|
|
878
933
|
PyObject* list = PyList_New(0);
|
|
879
934
|
#ifdef _WIN32
|
|
880
935
|
PyObject* tuple = PyTuple_New(2);
|
|
@@ -905,9 +960,11 @@ static PyObject* GetProcessList(PyObject* self, PyObject* args) {
|
|
|
905
960
|
return list;
|
|
906
961
|
}
|
|
907
962
|
|
|
908
|
-
static PyObject* GetProcessInfo(PyObject* self, PyObject* args) {
|
|
963
|
+
static PyObject* GetProcessInfo(PyObject* self, PyObject* args, PyObject* kwargs) {
|
|
909
964
|
int pid;
|
|
910
|
-
|
|
965
|
+
static char* kwlist[] = {"pid", NULL};
|
|
966
|
+
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i", kwlist, &pid))
|
|
967
|
+
return NULL;
|
|
911
968
|
#ifdef _WIN32
|
|
912
969
|
return PyUnicode_FromString("Not implemented on Windows");
|
|
913
970
|
#else
|
|
@@ -935,7 +992,7 @@ static PyObject* GetProcessInfo(PyObject* self, PyObject* args) {
|
|
|
935
992
|
#endif
|
|
936
993
|
}
|
|
937
994
|
|
|
938
|
-
static PyObject* clear_screen(PyObject* self, PyObject* args) {
|
|
995
|
+
static PyObject* clear_screen(PyObject* self, PyObject* args, PyObject* kwargs) {
|
|
939
996
|
#ifdef _WIN32
|
|
940
997
|
system("cls");
|
|
941
998
|
#else
|
|
@@ -944,11 +1001,13 @@ static PyObject* clear_screen(PyObject* self, PyObject* args) {
|
|
|
944
1001
|
Py_RETURN_NONE;
|
|
945
1002
|
}
|
|
946
1003
|
|
|
947
|
-
static PyObject* animate_print(PyObject* self, PyObject* args) {
|
|
1004
|
+
static PyObject* animate_print(PyObject* self, PyObject* args, PyObject* kwargs) {
|
|
948
1005
|
const char* text;
|
|
949
1006
|
double delay = 0.05;
|
|
950
1007
|
int backspace = 0;
|
|
951
|
-
|
|
1008
|
+
static char* kwlist[] = {"text", "delay", "backspace", NULL};
|
|
1009
|
+
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s|di", kwlist, &text, &delay, &backspace))
|
|
1010
|
+
return NULL;
|
|
952
1011
|
if (backspace) {
|
|
953
1012
|
for (int i = 0; text[i]; i++) {
|
|
954
1013
|
cout << text[i] << flush;
|
|
@@ -973,12 +1032,14 @@ static PyObject* animate_print(PyObject* self, PyObject* args) {
|
|
|
973
1032
|
Py_RETURN_NONE;
|
|
974
1033
|
}
|
|
975
1034
|
|
|
976
|
-
static PyObject* spinning_cursor(PyObject* self, PyObject* args) {
|
|
1035
|
+
static PyObject* spinning_cursor(PyObject* self, PyObject* args, PyObject* kwargs) {
|
|
977
1036
|
const char* message = "Loading";
|
|
978
1037
|
double duration = 3.0, delay = 0.1;
|
|
979
1038
|
int clear_before = 0;
|
|
980
|
-
|
|
981
|
-
if (
|
|
1039
|
+
static char* kwlist[] = {"message", "duration", "delay", "clear_before", NULL};
|
|
1040
|
+
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|sddi", kwlist, &message, &duration, &delay, &clear_before))
|
|
1041
|
+
return NULL;
|
|
1042
|
+
if (clear_before) clear_screen(NULL, NULL, NULL);
|
|
982
1043
|
vector<string> frames = {"|", "/", "-", "\\"};
|
|
983
1044
|
double end_time = time(NULL) + duration;
|
|
984
1045
|
int idx = 0;
|
|
@@ -991,12 +1052,14 @@ static PyObject* spinning_cursor(PyObject* self, PyObject* args) {
|
|
|
991
1052
|
Py_RETURN_NONE;
|
|
992
1053
|
}
|
|
993
1054
|
|
|
994
|
-
static PyObject* countdown(PyObject* self, PyObject* args) {
|
|
1055
|
+
static PyObject* countdown(PyObject* self, PyObject* args, PyObject* kwargs) {
|
|
995
1056
|
int seconds;
|
|
996
1057
|
const char* message = "Countdown";
|
|
997
1058
|
int clear_before = 0;
|
|
998
|
-
|
|
999
|
-
if (
|
|
1059
|
+
static char* kwlist[] = {"seconds", "message", "clear_before", NULL};
|
|
1060
|
+
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i|si", kwlist, &seconds, &message, &clear_before))
|
|
1061
|
+
return NULL;
|
|
1062
|
+
if (clear_before) clear_screen(NULL, NULL, NULL);
|
|
1000
1063
|
for (int i = seconds; i > 0; i--) {
|
|
1001
1064
|
cout << "\r" << message << ": " << i << " seconds remaining " << flush;
|
|
1002
1065
|
this_thread::sleep_for(chrono::seconds(1));
|
|
@@ -1005,7 +1068,7 @@ static PyObject* countdown(PyObject* self, PyObject* args) {
|
|
|
1005
1068
|
Py_RETURN_NONE;
|
|
1006
1069
|
}
|
|
1007
1070
|
|
|
1008
|
-
static PyObject* GetPipVer(PyObject* self, PyObject* args) {
|
|
1071
|
+
static PyObject* GetPipVer(PyObject* self, PyObject* args, PyObject* kwargs) {
|
|
1009
1072
|
#ifdef _WIN32
|
|
1010
1073
|
FILE* fp = _popen("python -m pip --version", "r");
|
|
1011
1074
|
#else
|
|
@@ -1030,10 +1093,12 @@ static PyObject* GetPipVer(PyObject* self, PyObject* args) {
|
|
|
1030
1093
|
}
|
|
1031
1094
|
|
|
1032
1095
|
#ifdef _WIN32
|
|
1033
|
-
static PyObject* Connect(PyObject* self, PyObject* args) {
|
|
1096
|
+
static PyObject* Connect(PyObject* self, PyObject* args, PyObject* kwargs) {
|
|
1034
1097
|
const char* host = "127.0.0.1";
|
|
1035
1098
|
int port = 54321;
|
|
1036
|
-
|
|
1099
|
+
static char* kwlist[] = {"host", "port", NULL};
|
|
1100
|
+
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|si", kwlist, &host, &port))
|
|
1101
|
+
return NULL;
|
|
1037
1102
|
WSADATA wsaData;
|
|
1038
1103
|
WSAStartup(MAKEWORD(2,2), &wsaData);
|
|
1039
1104
|
int sock = socket(AF_INET, SOCK_STREAM, 0);
|
|
@@ -1053,10 +1118,12 @@ static PyObject* Connect(PyObject* self, PyObject* args) {
|
|
|
1053
1118
|
return PyLong_FromLong(sock);
|
|
1054
1119
|
}
|
|
1055
1120
|
#else
|
|
1056
|
-
static PyObject* Connect(PyObject* self, PyObject* args) {
|
|
1121
|
+
static PyObject* Connect(PyObject* self, PyObject* args, PyObject* kwargs) {
|
|
1057
1122
|
const char* host = "127.0.0.1";
|
|
1058
1123
|
int port = 54321;
|
|
1059
|
-
|
|
1124
|
+
static char* kwlist[] = {"host", "port", NULL};
|
|
1125
|
+
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|si", kwlist, &host, &port))
|
|
1126
|
+
return NULL;
|
|
1060
1127
|
int sock = socket(AF_INET, SOCK_STREAM, 0);
|
|
1061
1128
|
if (sock < 0) return PyLong_FromLong(-1);
|
|
1062
1129
|
struct sockaddr_in server;
|
|
@@ -1071,9 +1138,11 @@ static PyObject* Connect(PyObject* self, PyObject* args) {
|
|
|
1071
1138
|
}
|
|
1072
1139
|
#endif
|
|
1073
1140
|
|
|
1074
|
-
static PyObject* ConnectPublic(PyObject* self, PyObject* args) {
|
|
1141
|
+
static PyObject* ConnectPublic(PyObject* self, PyObject* args, PyObject* kwargs) {
|
|
1075
1142
|
int port = 54321;
|
|
1076
|
-
|
|
1143
|
+
static char* kwlist[] = {"port", NULL};
|
|
1144
|
+
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|i", kwlist, &port))
|
|
1145
|
+
return NULL;
|
|
1077
1146
|
#ifdef _WIN32
|
|
1078
1147
|
WSADATA wsaData;
|
|
1079
1148
|
WSAStartup(MAKEWORD(2,2), &wsaData);
|
|
@@ -1123,18 +1192,21 @@ static PyObject* ConnectPublic(PyObject* self, PyObject* args) {
|
|
|
1123
1192
|
return PyUnicode_FromString("");
|
|
1124
1193
|
}
|
|
1125
1194
|
|
|
1126
|
-
static PyObject* Send(PyObject* self, PyObject* args) {
|
|
1195
|
+
static PyObject* Send(PyObject* self, PyObject* args, PyObject* kwargs) {
|
|
1127
1196
|
int sock;
|
|
1128
1197
|
const char* message;
|
|
1129
|
-
|
|
1198
|
+
static char* kwlist[] = {"sock", "message", NULL};
|
|
1199
|
+
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "is", kwlist, &sock, &message))
|
|
1200
|
+
return NULL;
|
|
1130
1201
|
int result = send(sock, message, strlen(message), 0);
|
|
1131
1202
|
return PyLong_FromLong(result);
|
|
1132
1203
|
}
|
|
1133
1204
|
|
|
1134
|
-
static PyObject* Receive(PyObject* self, PyObject* args) {
|
|
1135
|
-
int sock;
|
|
1136
|
-
|
|
1137
|
-
if (!
|
|
1205
|
+
static PyObject* Receive(PyObject* self, PyObject* args, PyObject* kwargs) {
|
|
1206
|
+
int sock, size = 1024;
|
|
1207
|
+
static char* kwlist[] = {"sock", "size", NULL};
|
|
1208
|
+
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i|i", kwlist, &sock, &size))
|
|
1209
|
+
return NULL;
|
|
1138
1210
|
char* buffer = (char*)malloc(size + 1);
|
|
1139
1211
|
int result = recv(sock, buffer, size, 0);
|
|
1140
1212
|
if (result > 0) {
|
|
@@ -1147,9 +1219,11 @@ static PyObject* Receive(PyObject* self, PyObject* args) {
|
|
|
1147
1219
|
return PyUnicode_FromString("");
|
|
1148
1220
|
}
|
|
1149
1221
|
|
|
1150
|
-
static PyObject* Disconnect(PyObject* self, PyObject* args) {
|
|
1222
|
+
static PyObject* Disconnect(PyObject* self, PyObject* args, PyObject* kwargs) {
|
|
1151
1223
|
int sock;
|
|
1152
|
-
|
|
1224
|
+
static char* kwlist[] = {"sock", NULL};
|
|
1225
|
+
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i", kwlist, &sock))
|
|
1226
|
+
return NULL;
|
|
1153
1227
|
#ifdef _WIN32
|
|
1154
1228
|
closesocket(sock);
|
|
1155
1229
|
WSACleanup();
|
|
@@ -1159,14 +1233,16 @@ static PyObject* Disconnect(PyObject* self, PyObject* args) {
|
|
|
1159
1233
|
Py_RETURN_NONE;
|
|
1160
1234
|
}
|
|
1161
1235
|
|
|
1162
|
-
static PyObject* GetPublicIP(PyObject* self, PyObject* args) {
|
|
1163
|
-
PyObject* ip = ConnectPublic(self, args);
|
|
1236
|
+
static PyObject* GetPublicIP(PyObject* self, PyObject* args, PyObject* kwargs) {
|
|
1237
|
+
PyObject* ip = ConnectPublic(self, args, kwargs);
|
|
1164
1238
|
return ip;
|
|
1165
1239
|
}
|
|
1166
1240
|
|
|
1167
|
-
static PyObject* CreateServer(PyObject* self, PyObject* args) {
|
|
1241
|
+
static PyObject* CreateServer(PyObject* self, PyObject* args, PyObject* kwargs) {
|
|
1168
1242
|
int port = 54321;
|
|
1169
|
-
|
|
1243
|
+
static char* kwlist[] = {"port", NULL};
|
|
1244
|
+
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|i", kwlist, &port))
|
|
1245
|
+
return NULL;
|
|
1170
1246
|
#ifdef _WIN32
|
|
1171
1247
|
WSADATA wsaData;
|
|
1172
1248
|
WSAStartup(MAKEWORD(2,2), &wsaData);
|
|
@@ -1205,49 +1281,49 @@ static PyObject* CreateServer(PyObject* self, PyObject* args) {
|
|
|
1205
1281
|
}
|
|
1206
1282
|
|
|
1207
1283
|
static PyMethodDef CoreMethods[] = {
|
|
1208
|
-
{"rgb", rgb, METH_VARARGS, "RGB color"},
|
|
1209
|
-
{"bg_rgb", bg_rgb, METH_VARARGS, "RGB background"},
|
|
1210
|
-
{"colorize", colorize, METH_VARARGS, "Colorize text"},
|
|
1211
|
-
{"get_line_points", get_line_points, METH_VARARGS, "Get line points"},
|
|
1212
|
-
{"get_circle_points", get_circle_points, METH_VARARGS, "Get circle points"},
|
|
1213
|
-
{"get_filled_circle_points", get_filled_circle_points, METH_VARARGS, "Get filled circle points"},
|
|
1214
|
-
{"get_rect_points", get_rect_points, METH_VARARGS, "Get rectangle points"},
|
|
1215
|
-
{"get_fill_rect_points", get_fill_rect_points, METH_VARARGS, "Get filled rectangle points"},
|
|
1216
|
-
{"get_triangle_points", get_triangle_points, METH_VARARGS, "Get triangle points"},
|
|
1217
|
-
{"get_filled_triangle_points", get_filled_triangle_points, METH_VARARGS, "Get filled triangle points"},
|
|
1218
|
-
{"get_heart_points", get_heart_points, METH_VARARGS, "Get heart points"},
|
|
1219
|
-
{"get_star_points", get_star_points, METH_VARARGS, "Get star points"},
|
|
1220
|
-
{"get_wave_points", get_wave_points, METH_VARARGS, "Get wave points"},
|
|
1221
|
-
{"get_spiral_points", get_spiral_points, METH_VARARGS, "Get spiral points"},
|
|
1222
|
-
{"get_bezier_points", get_bezier_points, METH_VARARGS, "Get bezier points"},
|
|
1223
|
-
{"get_grid_points", get_grid_points, METH_VARARGS, "Get grid points"},
|
|
1224
|
-
{"get_noise_points", get_noise_points, METH_VARARGS, "Get noise points"},
|
|
1225
|
-
{"get_cube_3d_points", get_cube_3d_points, METH_VARARGS, "Get 3D cube points"},
|
|
1226
|
-
{"get_sphere_3d_points", get_sphere_3d_points, METH_VARARGS, "Get 3D sphere points"},
|
|
1227
|
-
{"get_cylinder_3d_points", get_cylinder_3d_points, METH_VARARGS, "Get 3D cylinder points"},
|
|
1228
|
-
{"get_cone_3d_points", get_cone_3d_points, METH_VARARGS, "Get 3D cone points"},
|
|
1229
|
-
{"get_torus_3d_points", get_torus_3d_points, METH_VARARGS, "Get 3D torus points"},
|
|
1230
|
-
{"get_ico_sphere_3d_points", get_ico_sphere_3d_points, METH_VARARGS, "Get 3D ico sphere points"},
|
|
1231
|
-
{"DrawPic", DrawPic, METH_VARARGS, "Draw points"},
|
|
1232
|
-
{"GetKey", GetKey, METH_VARARGS, "Get key without Enter"},
|
|
1233
|
-
{"StartPyCode", StartPyCode, METH_VARARGS, "Start Python code"},
|
|
1234
|
-
{"KillPyScript", KillPyScript, METH_VARARGS, "Kill Python script"},
|
|
1235
|
-
{"IsRunning", IsRunning, METH_VARARGS, "Check if process is running"},
|
|
1236
|
-
{"GetCurrentPID", GetCurrentPID, METH_VARARGS, "Get current PID"},
|
|
1237
|
-
{"WaitForProcess", WaitForProcess, METH_VARARGS, "Wait for process"},
|
|
1238
|
-
{"GetProcessList", GetProcessList, METH_VARARGS, "Get process list"},
|
|
1239
|
-
{"GetProcessInfo", GetProcessInfo, METH_VARARGS, "Get process info"},
|
|
1240
|
-
{"clear_screen", clear_screen, METH_VARARGS, "Clear screen"},
|
|
1241
|
-
{"animate_print", animate_print, METH_VARARGS, "Animate print"},
|
|
1242
|
-
{"spinning_cursor", spinning_cursor, METH_VARARGS, "Spinning cursor"},
|
|
1243
|
-
{"countdown", countdown, METH_VARARGS, "Countdown"},
|
|
1244
|
-
{"GetPipVer", GetPipVer, METH_VARARGS, "Get pip version"},
|
|
1245
|
-
{"Connect", Connect, METH_VARARGS, "Connect to server"},
|
|
1246
|
-
{"Send", Send, METH_VARARGS, "Send message"},
|
|
1247
|
-
{"Receive", Receive, METH_VARARGS, "Receive message"},
|
|
1248
|
-
{"Disconnect", Disconnect, METH_VARARGS, "Disconnect"},
|
|
1249
|
-
{"GetPublicIP", GetPublicIP, METH_VARARGS, "Get public IP"},
|
|
1250
|
-
{"CreateServer", CreateServer, METH_VARARGS, "Create server"},
|
|
1284
|
+
{"rgb", (PyCFunction)rgb, METH_VARARGS | METH_KEYWORDS, "RGB color"},
|
|
1285
|
+
{"bg_rgb", (PyCFunction)bg_rgb, METH_VARARGS | METH_KEYWORDS, "RGB background"},
|
|
1286
|
+
{"colorize", (PyCFunction)colorize, METH_VARARGS | METH_KEYWORDS, "Colorize text"},
|
|
1287
|
+
{"get_line_points", (PyCFunction)get_line_points, METH_VARARGS | METH_KEYWORDS, "Get line points"},
|
|
1288
|
+
{"get_circle_points", (PyCFunction)get_circle_points, METH_VARARGS | METH_KEYWORDS, "Get circle points"},
|
|
1289
|
+
{"get_filled_circle_points", (PyCFunction)get_filled_circle_points, METH_VARARGS | METH_KEYWORDS, "Get filled circle points"},
|
|
1290
|
+
{"get_rect_points", (PyCFunction)get_rect_points, METH_VARARGS | METH_KEYWORDS, "Get rectangle points"},
|
|
1291
|
+
{"get_fill_rect_points", (PyCFunction)get_fill_rect_points, METH_VARARGS | METH_KEYWORDS, "Get filled rectangle points"},
|
|
1292
|
+
{"get_triangle_points", (PyCFunction)get_triangle_points, METH_VARARGS | METH_KEYWORDS, "Get triangle points"},
|
|
1293
|
+
{"get_filled_triangle_points", (PyCFunction)get_filled_triangle_points, METH_VARARGS | METH_KEYWORDS, "Get filled triangle points"},
|
|
1294
|
+
{"get_heart_points", (PyCFunction)get_heart_points, METH_VARARGS | METH_KEYWORDS, "Get heart points"},
|
|
1295
|
+
{"get_star_points", (PyCFunction)get_star_points, METH_VARARGS | METH_KEYWORDS, "Get star points"},
|
|
1296
|
+
{"get_wave_points", (PyCFunction)get_wave_points, METH_VARARGS | METH_KEYWORDS, "Get wave points"},
|
|
1297
|
+
{"get_spiral_points", (PyCFunction)get_spiral_points, METH_VARARGS | METH_KEYWORDS, "Get spiral points"},
|
|
1298
|
+
{"get_bezier_points", (PyCFunction)get_bezier_points, METH_VARARGS | METH_KEYWORDS, "Get bezier points"},
|
|
1299
|
+
{"get_grid_points", (PyCFunction)get_grid_points, METH_VARARGS | METH_KEYWORDS, "Get grid points"},
|
|
1300
|
+
{"get_noise_points", (PyCFunction)get_noise_points, METH_VARARGS | METH_KEYWORDS, "Get noise points"},
|
|
1301
|
+
{"get_cube_3d_points", (PyCFunction)get_cube_3d_points, METH_VARARGS | METH_KEYWORDS, "Get 3D cube points"},
|
|
1302
|
+
{"get_sphere_3d_points", (PyCFunction)get_sphere_3d_points, METH_VARARGS | METH_KEYWORDS, "Get 3D sphere points"},
|
|
1303
|
+
{"get_cylinder_3d_points", (PyCFunction)get_cylinder_3d_points, METH_VARARGS | METH_KEYWORDS, "Get 3D cylinder points"},
|
|
1304
|
+
{"get_cone_3d_points", (PyCFunction)get_cone_3d_points, METH_VARARGS | METH_KEYWORDS, "Get 3D cone points"},
|
|
1305
|
+
{"get_torus_3d_points", (PyCFunction)get_torus_3d_points, METH_VARARGS | METH_KEYWORDS, "Get 3D torus points"},
|
|
1306
|
+
{"get_ico_sphere_3d_points", (PyCFunction)get_ico_sphere_3d_points, METH_VARARGS | METH_KEYWORDS, "Get 3D ico sphere points"},
|
|
1307
|
+
{"DrawPic", (PyCFunction)DrawPic, METH_VARARGS | METH_KEYWORDS, "Draw points"},
|
|
1308
|
+
{"GetKey", (PyCFunction)GetKey, METH_VARARGS | METH_KEYWORDS, "Get key without Enter"},
|
|
1309
|
+
{"StartPyCode", (PyCFunction)StartPyCode, METH_VARARGS | METH_KEYWORDS, "Start Python code"},
|
|
1310
|
+
{"KillPyScript", (PyCFunction)KillPyScript, METH_VARARGS | METH_KEYWORDS, "Kill Python script"},
|
|
1311
|
+
{"IsRunning", (PyCFunction)IsRunning, METH_VARARGS | METH_KEYWORDS, "Check if process is running"},
|
|
1312
|
+
{"GetCurrentPID", (PyCFunction)GetCurrentPID, METH_VARARGS | METH_KEYWORDS, "Get current PID"},
|
|
1313
|
+
{"WaitForProcess", (PyCFunction)WaitForProcess, METH_VARARGS | METH_KEYWORDS, "Wait for process"},
|
|
1314
|
+
{"GetProcessList", (PyCFunction)GetProcessList, METH_VARARGS | METH_KEYWORDS, "Get process list"},
|
|
1315
|
+
{"GetProcessInfo", (PyCFunction)GetProcessInfo, METH_VARARGS | METH_KEYWORDS, "Get process info"},
|
|
1316
|
+
{"clear_screen", (PyCFunction)clear_screen, METH_VARARGS | METH_KEYWORDS, "Clear screen"},
|
|
1317
|
+
{"animate_print", (PyCFunction)animate_print, METH_VARARGS | METH_KEYWORDS, "Animate print"},
|
|
1318
|
+
{"spinning_cursor", (PyCFunction)spinning_cursor, METH_VARARGS | METH_KEYWORDS, "Spinning cursor"},
|
|
1319
|
+
{"countdown", (PyCFunction)countdown, METH_VARARGS | METH_KEYWORDS, "Countdown"},
|
|
1320
|
+
{"GetPipVer", (PyCFunction)GetPipVer, METH_VARARGS | METH_KEYWORDS, "Get pip version"},
|
|
1321
|
+
{"Connect", (PyCFunction)Connect, METH_VARARGS | METH_KEYWORDS, "Connect to server"},
|
|
1322
|
+
{"Send", (PyCFunction)Send, METH_VARARGS | METH_KEYWORDS, "Send message"},
|
|
1323
|
+
{"Receive", (PyCFunction)Receive, METH_VARARGS | METH_KEYWORDS, "Receive message"},
|
|
1324
|
+
{"Disconnect", (PyCFunction)Disconnect, METH_VARARGS | METH_KEYWORDS, "Disconnect"},
|
|
1325
|
+
{"GetPublicIP", (PyCFunction)GetPublicIP, METH_VARARGS | METH_KEYWORDS, "Get public IP"},
|
|
1326
|
+
{"CreateServer", (PyCFunction)CreateServer, METH_VARARGS | METH_KEYWORDS, "Create server"},
|
|
1251
1327
|
{NULL, NULL, 0, NULL}
|
|
1252
1328
|
};
|
|
1253
1329
|
|
|
@@ -11,7 +11,7 @@ ext_modules = [
|
|
|
11
11
|
|
|
12
12
|
setup(
|
|
13
13
|
name="ConsoleFramework",
|
|
14
|
-
version="1.3.
|
|
14
|
+
version="1.3.1",
|
|
15
15
|
description="The best Console Library of the Python.",
|
|
16
16
|
long_description="ConsoleFramework - C++ library for Python console rendering.",
|
|
17
17
|
long_description_content_type="text/plain",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{consoleframework-1.3.0 → consoleframework-1.3.1}/ConsoleFramework.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|