Davo, what's up with the python?

New releases and general discussions.

Post » Wed Apr 29, 2009 2:33 am

[quote="Ashley in another thread":3bx6tmu8]Davo can say for sure, but I think he said he'd fixed some of the problems with Python in the next build.[/quote:3bx6tmu8]
Just curious about the status of the python stuff in general
especially any changes planned for the .99 build

in particular:
making it so you don't have to have the extra python file with your exe

whatever it is that makes everyone say "python is broken right now"

and also the object picking issue



wondering what the priority and/or progress is on those
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Sat May 02, 2009 7:27 am

Originally construct used Python 2.5

In 0.99 it now uses Python 2.6.2

At some point I'll make it use Python 3.0.1...but since its quite early there might be bugs etc.

Originally when you clicked preview, it linked to the libraries from the installed directory of python...most people had Python 2.6.2 and thus it had compatability problems.

I've changed it so when you preview it links the python libraries to the one in the Construct directory, so it shouldn't matter wether you have python installed at all.

If you write:

For instance in Sprite:
instance.X += 1;

It will move every sprite to the right 1...

However, when I'm not drugged out (i had my wisdom teeth removed yesterday heh) I'm gonna add sol....so you can do like:

For instance in Sprite.SOL:
instance.X += 1;

And it will just iterate the sprites which are selected...meaning if you have the python block as a sub event of anotehr event it will use the SOL
B
4
S
2
G
5
Posts: 641
Reputation: 3,011

Post » Sat May 02, 2009 11:54 am

I don't quite grasped the difference between python 2 and 3 but i heard there's some changes that might not make them compatible to each other.. So though this question is too far ahead, when you switch to python 3 for construct will it still somehow be ocmpatible with projects made wiht previous version 2.6.2?

(I know this question should only concern the actual developers but I'm curious, grandma says always ask qustions)
B
16
S
10
G
5
Posts: 255
Reputation: 3,934

Post » Sat May 02, 2009 2:57 pm

It would mean any scripts written in python that no longer work in python 3 would need to be modified. I think Python 3 comes with a program that can convert them, so you would need to paste your python code snippets into it and then paste back into construct.

I dont think it will be a problem though, the syntax (from what I've seen) hasn't changed much. The main one that breaks Python 2.x.x projects is the print "hello" being replaced with print("hello") and I dont think any construct projects would use the print command anyway.
B
4
S
2
G
5
Posts: 641
Reputation: 3,011

Post » Sat May 02, 2009 9:44 pm

thanks alot david
I can't wait for .99
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Sun May 03, 2009 12:06 am

Shweet! I have also been eagerly awaiting the reimplementation of python(well without others also needing python installed).
B
21
S
14
G
5
Posts: 106
Reputation: 3,416

Post » Sun May 03, 2009 3:09 am

Yea, with python it's easier to share scripts or code snippets needed to implement features and stuff
B
16
S
10
G
5
Posts: 255
Reputation: 3,934

Post » Sun May 03, 2009 9:14 am

Some things need to be added to Python to make it really useful, like manipulation of behaviors and effects through script. Cough David.
B
3
S
2
G
5
Posts: 1,777
Reputation: 5,529

Post » Sun May 10, 2009 9:22 pm

[quote="David":qhbyupkh]so you can do like:

For instance in Sprite.SOL:
instance.X += 1;

And it will just iterate the sprites which are selected...meaning if you have the python block as a sub event of anotehr event it will use the SOL[/quote:qhbyupkh]

I forgot to ask, is this going to be a .99 thing?

also, there's some stuff I should really keep working on with workarounds for if .99 is over a month away or so, but if it's closer it would be smarter just to wait for some of this new stuff, particularly what we've been discussing here. I completely understand the done when it's done thing, just curious if the big announcement is about to happen, or if I should proceed with my workarounds?

but my main question....the SOL python
is that going to be in 99?
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Sun May 10, 2009 9:46 pm

0.99 should be released before the end of the month (probably, maybe, perhaps).
Scirra Founder
B
359
S
214
G
72
Posts: 22,949
Reputation: 178,544

Next

Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 0 guests