Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (7th_zorro, 1 invisible), 942 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rating: 5
Page 5 of 6 1 2 3 4 5 6
Re: python wrapper [Re: ventilator] #278503
07/14/09 09:15
07/14/09 09:15
Joined: Jul 2009
Posts: 40
E
enrike Offline
Newbie
enrike  Offline
Newbie
E

Joined: Jul 2009
Posts: 40
well... nice work. now i have to concentrate on C-lite but if we continue working with 3DGS it might be worth for me checking in depth the python wrapper... i will post here if i have some feedback for you.

Re: python wrapper [Re: ventilator] #281398
07/27/09 04:19
07/27/09 04:19
Joined: Aug 2005
Posts: 186
Beneath the Surface
alpha12 Offline
Member
alpha12  Offline
Member

Joined: Aug 2005
Posts: 186
Beneath the Surface
This is how to make your games distributable without making your client installing python runtime.

Compiling to executable :

1.Add python dir "C:\Python26" into your "PATH" environment variables.

2. Download & install py2exe : http://sourceforge.net/projects/py2exe/files/py2exe/0.6.9/py2exe-0.6.9.win32-py2.6.exe/download

3. In your working directory : create setup.py with this following code inside
Code:
from distutils.core import setup
import py2exe

setup(console=['your_main_python_script.py'])



4.Open cmd go to your working dir and run this command "python setup.py install"

5.And run this command "python setup.py py2exe"

6.Don't forget to add required resource files into dist folder!

your distributable exe should be in working_dir\dist


have phun!

@ventilator
GREAT WORK!!hope you gonna finish this wrapper..anyway i test this with 64 bit python26 runtime but cann't run :(,would add compatibility for python 64 bit?

Re: python wrapper [Re: alpha12] #281461
07/27/09 12:35
07/27/09 12:35
Joined: May 2002
Posts: 7,441
ventilator Offline OP
Senior Expert
ventilator  Offline OP
Senior Expert

Joined: May 2002
Posts: 7,441
thanks for the py2exe how-to! i think as step 7 you should bind your acknex.dll to the distributable exe.

...
can 64bit python use extensions that use 32bit libraries (since acknex.dll is 32bit)?

Re: python wrapper [Re: ventilator] #281539
07/27/09 16:49
07/27/09 16:49
Joined: Aug 2005
Posts: 186
Beneath the Surface
alpha12 Offline
Member
alpha12  Offline
Member

Joined: Aug 2005
Posts: 186
Beneath the Surface
Originally Posted By: ventilator
thanks for the py2exe how-to! i think as step 7 you should bind your acknex.dll to the distributable exe.

...
can 64bit python use extensions that use 32bit libraries (since acknex.dll is 32bit)?


thats the main problem i think,cause when i tried to run the code it's said "not valid win32 application" :(,i thought that we can make sort of performance 'hack' by mixing python64+legacy(acknex32) but yeah failed smirk

Re: python wrapper [Re: alpha12] #310658
02/16/10 11:40
02/16/10 11:40
Joined: Jul 2007
Posts: 424
EUROPE
maslone1 Offline
Senior Member
maslone1  Offline
Senior Member

Joined: Jul 2007
Posts: 424
EUROPE
Hi ventilator!

Nochmals danke für den wrapper!

Frage: wo gibts tutorials wie mann wrapper schreibt?
Hab mich noch nie über das thema wrapper näher beschäftigt....
(Bin grad dabei python zu lernen und um das wissen in blender nutzen zu können)


A8c, Blender, FlStudio, Unity3d
Re: python wrapper [Re: maslone1] #310661
02/16/10 12:03
02/16/10 12:03
Joined: May 2002
Posts: 7,441
ventilator Offline OP
Senior Expert
ventilator  Offline OP
Senior Expert

Joined: May 2002
Posts: 7,441
um wrapper zu schreiben kannst du entweder direkt das python c-api verwenden (anleitungen gibt es auf der python webseite. das ist aber viel arbeit und ziemlich schwierig.) oder es gibt verschiedene projekte wie ctypes oder cython die das schreiben eines wrappers sehr erleichtern (anleitungen finden sich auf deren webseiten).

z.b. kann mit dem ctypes modul direkt von python aus auf c-datentypen zugegriffen werden. du kannst also den wrapper direkt in python schreiben. kann performance nachteile haben...

cython ist eine art python zu c compiler. damit habe ich meinen a7 wrapper geschrieben.

es gibt auch noch tools wie swig oder py++ die sich eher für c++ libraries eignen. aber das ist dann auch etwas komplizierter...

Re: python wrapper [Re: ventilator] #310663
02/16/10 12:19
02/16/10 12:19
Joined: Jul 2007
Posts: 424
EUROPE
maslone1 Offline
Senior Member
maslone1  Offline
Senior Member

Joined: Jul 2007
Posts: 424
EUROPE
Danke für die guten tips. Das Cython hab ich mir schon kurz angesehen.
Du hast da mein interesse geweckt. Du hast geschrieben, dass dein wrapper noch nicht fertig ist. Ich werde mal python (fertig) lernen und mich dann mal daran versuchen einen wrapper zu schreiben. Gestern hab ich erstmals mit phyton versuche gestartet. Man muss sich etwas an die schreibweise gewöhnen, aber es ist wirklich eine einfache und überschaubare sprache.

Hast du dich schon mal an der ogre-python versucht?
Ich habs gestern nur vorab runtergeladen um später versuche zu starten....

Last edited by maslone1; 02/16/10 12:21.

A8c, Blender, FlStudio, Unity3d
Re: python wrapper [Re: maslone1] #311058
02/18/10 12:48
02/18/10 12:48
Joined: May 2002
Posts: 7,441
ventilator Offline OP
Senior Expert
ventilator  Offline OP
Senior Expert

Joined: May 2002
Posts: 7,441
mein wrapper ist schon ziemlich komplett. manche kleinigkeiten, die ich persönlich nicht gebraucht habe, sind halt noch nicht gewrappt und hier war das interesse nicht wirklich groß...

mit python-ogre habe ich ein wenig experimentiert. es wäre ziemlich interessant, zu versuchen dafür ein gamestudio artiges scripting api zu schreiben. dann könnte mit ogre fast wie mit gamestudio gearbeitet werden und der umstieg wäre sehr leicht. tongue

Re: python wrapper [Re: ventilator] #311093
02/18/10 15:59
02/18/10 15:59
Joined: Jul 2007
Posts: 424
EUROPE
maslone1 Offline
Senior Member
maslone1  Offline
Senior Member

Joined: Jul 2007
Posts: 424
EUROPE
Stimmt, interessant wäre es wirklich.
Auch interessant ist die blender gameengine.
Mit blender hat man alles in einem und python als "skriptsprache". Ne tolle kombination.

Ich freu mich schon wieder auf etwas freizeit um weiter python lernen zu können! laugh


A8c, Blender, FlStudio, Unity3d
Re: python wrapper [Re: maslone1] #311175
02/18/10 18:55
02/18/10 18:55
Joined: Jul 2007
Posts: 424
EUROPE
maslone1 Offline
Senior Member
maslone1  Offline
Senior Member

Joined: Jul 2007
Posts: 424
EUROPE
hi ventilator!

Ich habe nun deinen wrapper probiert.

Bei mir erscheint nun ein völlig neuer fehler beim start-up-fenster, welcher wie folgt aussieht:

-nc: Unsupported feature - any key to abort

ich habe version 7.82.3 und python 2.6.2 sowie idle installiert.
das starup fenster öffnet sich und produziert lediglich den beschriebenen fehler.....?

Einzig funktioniert e-tutorial, wobei auch hier etwas nicht 100% akzeptiert wird, aber das programm an sich läuft....

Woran kann das liegen?

Last edited by maslone1; 02/18/10 18:58.

A8c, Blender, FlStudio, Unity3d
Page 5 of 6 1 2 3 4 5 6

Moderated by  aztec, Blink, HeelX 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1