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
3 registered members (AndrewAMD, Quad, 1 invisible), 927 guests, and 5 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 3 of 6 1 2 3 4 5 6
Re: python wrapper [Re: ventilator] #276085
07/03/09 11:24
07/03/09 11:24
Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Pappenheimer Offline
Senior Expert
Pappenheimer  Offline
Senior Expert

Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Thanks for the links, but they are still not basic enough, because even the editor seems to work different to what I know from Lite-C or that what I've seen of C++.

What do I have to do, when I get a window called Python Shell with this contend?
Code:
Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.

    ****************************************************************
    Personal firewall software may warn about the connection IDLE
    makes to its subprocess using this computer's internal loopback
    interface.  This connection is not visible on any external
    interface and no data is sent to or received from the Internet.
    ****************************************************************
    
IDLE 1.2.2      
>>>



Re: python wrapper [Re: Pappenheimer] #276093
07/03/09 11:36
07/03/09 11:36
Joined: May 2002
Posts: 7,441
ventilator Offline OP
Senior Expert
ventilator  Offline OP
Senior Expert

Joined: May 2002
Posts: 7,441
this is an interactive python shell. you can enter python commands there and immediately see the results. you could use it as a powerful pocket calculator, for quickly trying out short code snippets, or more experienced users can open a python shell for interacting with their running program (think of execute() in c-script just much more powerful).

IDLE by default starts with just this shell. you can open a new empty source code file with "file -> new window". enter your program there, save it and run it with f5.

Re: python wrapper [Re: ventilator] #276120
07/03/09 12:39
07/03/09 12:39
Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Pappenheimer Offline
Senior Expert
Pappenheimer  Offline
Senior Expert

Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
I gonna try this with your knights on wheels example, just have to find the resources on my harddisk.

Re: python wrapper [Re: Pappenheimer] #276136
07/03/09 13:38
07/03/09 13:38
Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Pappenheimer Offline
Senior Expert
Pappenheimer  Offline
Senior Expert

Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
I'm quite dumb, i know! :P But now, I got a step further.
Although, I don't know what I missed this time.

Which dll is it missing?
Code:
Traceback (most recent call last):
  File "C:/Programme/GStudio7/knightonwheels.py", line 10, in <module>
    from a7_scheduler import *
  File "C:/Programme/GStudio7\a7_scheduler.py", line 1, in <module>
    from a7 import level_load as _level_load
ImportError: DLL load failed: Das angegebene Modul wurde nicht gefunden.
>>>



Last edited by Pappenheimer; 07/03/09 14:20.
Re: python wrapper [Re: Pappenheimer] #276150
07/03/09 15:32
07/03/09 15:32
Joined: May 2002
Posts: 7,441
ventilator Offline OP
Senior Expert
ventilator  Offline OP
Senior Expert

Joined: May 2002
Posts: 7,441
are you using python 2.5 (since it says so in your IDLE shell)? my wrapper needs python 2.6.

(unfortunately it would be a bit cumbersome to compile the wrapper for python 2.5 since it has to be compiled with the same visual c++ version the python dll got compiled with and i think for python 2.5 it was visual c++ 2005 which i don't really want to download and install.)

the other reason could be that your acknex.dll is missing in the directory.

Re: python wrapper [Re: ventilator] #276152
07/03/09 16:04
07/03/09 16:04
Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Pappenheimer Offline
Senior Expert
Pappenheimer  Offline
Senior Expert

Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
smile Got it! smile
Installed Python 2.6.2,
extracted the pya7_alpha.exe into the python26 folder
and copied the acknex.dll into the same folder.

Started IDLE(Python GUI) from the start menu,
clicked File --> Open..,
opened the knight_on_wheels.py in the python26 folder
and hit F5!

It works!

Re: python wrapper [Re: Pappenheimer] #276154
07/03/09 16:07
07/03/09 16:07
Joined: May 2002
Posts: 7,441
ventilator Offline OP
Senior Expert
ventilator  Offline OP
Senior Expert

Joined: May 2002
Posts: 7,441
great! smile

you don't have to work directly in the python26 or gstudio7 folder though.

Re: python wrapper [Re: ventilator] #276743
07/06/09 09:13
07/06/09 09:13
Joined: Jul 2009
Posts: 40
E
enrike Offline
Newbie
enrike  Offline
Newbie
E

Joined: Jul 2009
Posts: 40
this python wrapper sounds really interesting. i have worked few years with python so i could benefit from this because i just started using game studio. Still i find C lite very easy but Python is more powerful because the standard library and hundreds of libraries and modules freely available (although is probably slower).

So far i cannot make it to work, i have python2.6 installed, then uncompressed pyA7 to my hardrive. Then edited the .bat files like this and run it
"C:\Program Files\GStudio7\wed.exe" -p c:\python26\python.exe
copy c:\python26\acknex.dll C:\Users\Administrator\Desktop\pyA7

at this point i try to run knights_on_wheels.py and I get this DLL error :

IDLE 2.6.2 ==== No Subprocess ====
>>>
Traceback (most recent call last):
File "C:\Users\Administrator\Desktop\pyA7\knights_on_wheels.py", line 12, in <module>
from a7_scheduler import *
File "C:\Users\Administrator\Desktop\pyA7\a7_scheduler.py", line 3, in <module>
from a7 import level_load as _level_load
ImportError: DLL load failed: The specified procedure could not be found.


Could this be because my A7 engine is old? I get SED > Help > About and there it says Version : 7.02.4

I am not sure if this is the right way to run it.

acknex.dll is in the same directory I uncompressed pya7_alpha.exe

I also tried to copy acknex.dll to python2.6 together with a7_scheduler.py and a7.pyd and get the same error.

it would be good to have a step by step explanation of how to set it up. maybe i have not found it?

Last edited by enrike; 07/06/09 09:19.
Re: python wrapper [Re: enrike] #276759
07/06/09 09:54
07/06/09 09:54
Joined: May 2002
Posts: 7,441
ventilator Offline OP
Senior Expert
ventilator  Offline OP
Senior Expert

Joined: May 2002
Posts: 7,441
yes, your engine is too old. you need 7.77 or newer.

Re: python wrapper [Re: ventilator] #276781
07/06/09 11:46
07/06/09 11:46
Joined: Jul 2009
Posts: 40
E
enrike Offline
Newbie
enrike  Offline
Newbie
E

Joined: Jul 2009
Posts: 40
ok, thanks for quick reply!

Page 3 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