Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1913 | jaeger | 1 | #include "tp.c" |
2 | |||
3 | const char header[]="TinyPy for kolibriOS"; |
||
4 | const int argc = 2; |
||
5 | |||
6 | void main(void) { |
||
7 | char *argv[2]={"tpmain", ""}; |
||
8 | |||
9 | CONSOLE_INIT(header); |
||
10 | con_printf("TinyPy console, version 1.1.\n"); |
||
11 | con_printf("Enter program file:"); |
||
12 | if (!(argv[1] = malloc(256))) |
||
13 | con_printf("Memory error\n"); |
||
14 | con_gets(argv[1], 256); |
||
15 | argv[1][strlen(argv[1]) - 1] = '\0'; |
||
16 | con_printf("Running file %s\n", argv[1]); |
||
17 | tp_vm *tp = tp_init(argc, argv); |
||
18 | |||
19 | tp_call(tp,"py2bc","tinypy",tp_None); |
||
20 | tp_deinit(tp); |
||
21 | return; |
||
22 | } |
||
23 | |||
24 | /**/ |