-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathPythonIntegration.js
More file actions
37 lines (27 loc) · 1.02 KB
/
Copy pathPythonIntegration.js
File metadata and controls
37 lines (27 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/***
* Copyright (C) Rodolfo Herrera Hernandez. All rights reserved.
* Licensed under the MIT license. See LICENSE file in the project root
* for full license information.
*
* =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
*
* For related information - https://github.com/codewithrodi/ZendaJS/
*
* =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
****/
const Code = `
# With ZendaJS you can integrate Python in your
# JavaScript programs!
# This is a example simple usage
MESSAGE = str(input('Enter a message: '))
print(f'''
Your message is {MESSAGE} and it contains {len(MESSAGE)} characteres!
''')
`;
// Calling the pythonString function for execute code
PythonString(Code);
// Calling Python File
PythonFile('Examples/PyIntegrationExample.py')
// You need enter exact python file location :)
// Use pythonFancyFile for get better perfomance, u need python in your OS.
PythonFancyFile('Examples/PyIntegrationExample.py')