How do I use python code?

Get help using Construct 2

Post » Tue May 27, 2014 9:06 am

Hey guys,

I would like to know if there is any way i can incorporate python code in C2 using a plugin or sumting?

Thanks,
Ashwin
B
15
S
3
G
1
Posts: 111
Reputation: 1,664

Post » Tue May 27, 2014 9:21 am

Well, I guess you could, be it might but pretty complex and delicate.
For sure, C2's runtime is javascript and not meant by default to execute python.

A quick google search seems to return some python compiled/ers into javascript.
You could first compile your python code and then use the browser object's actions "Execute javascript" nor "ExecJS".
Be sure to read the "Risks with Javascript string execution" of the manual article, and be sure about what you're doing.

Also it's a long stretch, relying on external compilers, hoping they are compatible and compliant with the same JS standards used by C2 and browsers, and then making sure you're executing their code correctly.

Maybe you should detail a bit more what exactly is your intent by using Python.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
293
S
117
G
96
Posts: 7,310
Reputation: 71,069


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 8 guests