Re: [Ironpython-users] Gradually executing a python script

2012-07-25 Thread Dino Viehland
Markus wrote: > I always found it a deficiency of IronPython settrace that it does not offer > events for calls to non-IronPython .NET methods (either statically compiled > from C#/VB/F#... or from other dynamic languages). > > cPython has c_call, c_return and c_exception for this. Maybe IronPyt

Re: [Ironpython-users] Gradually executing a python script

2012-07-25 Thread Jeff Hardy
On Wed, Jul 25, 2012 at 12:06 AM, Markus Schaber wrote: > Hi, Jeff, > > Von: Jeff Hardy [mailto:[email protected]] >> >> On Tue, Jul 24, 2012 at 11:22 AM, Jeff Hardy wrote: >> > >> > sys.settrace is your friend here. Basically, if a robot tries to >> > execute too many lines between yields (i.e.

Re: [Ironpython-users] Gradually executing a python script

2012-07-25 Thread Markus Schaber
Hi, Jeff, Von: Jeff Hardy [mailto:[email protected]] > > On Tue, Jul 24, 2012 at 11:22 AM, Jeff Hardy wrote: > > > > sys.settrace is your friend here. Basically, if a robot tries to > > execute too many lines between yields (i.e. per turn), remove it from > > the list of valid robots and show an

Re: [Ironpython-users] Gradually executing a python script

2012-07-24 Thread Jeff Hardy
On Tue, Jul 24, 2012 at 11:22 AM, Jeff Hardy wrote: > On Tue, Jul 24, 2012 at 5:54 AM, Jesper Taxbøl wrote: >> Agreed that could work :), but would still hang if a kid writes an infinite >> loop without actions inside. >> >> I am really into making something robust for kids to play with. >> > > s

Re: [Ironpython-users] Gradually executing a python script

2012-07-24 Thread Jeff Hardy
On Tue, Jul 24, 2012 at 5:48 AM, Markus Schaber wrote: > Another idea is that you could use the “yield return” with yield parameters > – the script yields the actions, and gets the next snapshot in return. Here, > you still can synchronize internally. IIRC, this is how UnrealScript works. It's a

Re: [Ironpython-users] Gradually executing a python script

2012-07-24 Thread Jesper Taxbøl
us > > ** ** > > *Von:* Jesper Taxbøl [mailto:[email protected]] > *Gesendet:* Dienstag, 24. Juli 2012 14:55 > *An:* Markus Schaber > > *Cc:* [email protected] > *Betreff:* Re: [Ironpython-users] Gradually executing a python script > > ** ** &g

Re: [Ironpython-users] Gradually executing a python script

2012-07-24 Thread Markus Schaber
mailto:ironpython-users-bounces%2Brome>[email protected]<mailto:[email protected]>] On Behalf Of Jesper Taxbøl Sent: Monday, July 23, 2012 11:05 AM To: Kevin Hazzard Cc: [email protected]<mailto:[email protected]> Subject: Re: [Ironpyth

Re: [Ironpython-users] Gradually executing a python script

2012-07-24 Thread Markus Schaber
ot; to clean up player scripts which don't play nicely. Grüße, Markus Von: Jesper Taxbøl [mailto:[email protected]] Gesendet: Dienstag, 24. Juli 2012 14:55 An: Markus Schaber Cc: [email protected] Betreff: Re: [Ironpython-users] Gradually executing a python script Agreed that could wor

Re: [Ironpython-users] Gradually executing a python script

2012-07-24 Thread Jesper Taxbøl
ld suggest implementing your game engine as a turn-based > system. For each turn, the script for each character is executed > completely. This will allow you to cycle through all characters one turn at > a time, equally, and will also eliminate the problem of having variant > outcomes si

Re: [Ironpython-users] Gradually executing a python script

2012-07-23 Thread Keith Rome
lect.com/> From: [email protected]<mailto:[email protected]> [mailto:ironpython-users-bounces+rome<mailto:ironpython-users-bounces%2Brome>[email protected]<mailto:[email protected]>] On Behalf Of Jesper Taxbøl Sent

Re: [Ironpython-users] Gradually executing a python script

2012-07-23 Thread Jesper Taxbøl
ince the program will become deterministic. >>> >>> ** ** >>> >>> ** ** >>> >>> ** ** >>> >>> *Keith Rome* >>> >>> *Senior Consultant and Architect* >>> >>> MCPD-EAD, MCSD, MC

Re: [Ironpython-users] Gradually executing a python script

2012-07-23 Thread Kevin Hazzard
* >> >> Wintellect | 770.617.4016 | [email protected] *** >> * >> >> www.wintellect.com >> >> ** ** >> >> *From:* [email protected] [mailto: >> ironpython-users-bounces+rome=wintellect@p

Re: [Ironpython-users] Gradually executing a python script

2012-07-23 Thread Keith Rome
tellect.com<mailto:[email protected]> www.wintellect.com<http://www.wintellect.com/> From: Jesper Taxbøl [mailto:[email protected]] Sent: Monday, July 23, 2012 1:49 PM To: Keith Rome Cc: Kevin Hazzard; [email protected] Subject: Re: [Ironpython-users] Gradually executing a python sc

Re: [Ironpython-users] Gradually executing a python script

2012-07-23 Thread Jesper Taxbøl
[email protected]] *On Behalf Of *Jesper > Taxbøl > *Sent:* Monday, July 23, 2012 11:05 AM > *To:* Kevin Hazzard > *Cc:* [email protected] > *Subject:* Re: [Ironpython-users] Gradually executing a python script > > ** ** > > Would that allow me to step gr

Re: [Ironpython-users] Gradually executing a python script

2012-07-23 Thread Keith Rome
ct.com<http://www.wintellect.com/> From: [email protected] [mailto:[email protected]] On Behalf Of Jesper Taxbøl Sent: Monday, July 23, 2012 11:05 AM To: Kevin Hazzard Cc: [email protected] Subject: Re: [Ironpython

Re: [Ironpython-users] Gradually executing a python script

2012-07-23 Thread Jesper Taxbøl
Sorry for the spam, but the reason is that I am interrested is that I aim to run my avatar's "ai" in a script like this: while True: shoot == (sense == True) Where the gameworld writes to the variable sense and reads from shoot. The script will run forever and therefore needs to be updated gr

Re: [Ironpython-users] Gradually executing a python script

2012-07-23 Thread Jesper Taxbøl
Would that allow me to step gradually through a loop? like: x = 0 while x < 10: dostuff() x=x+1 while x > 0: dootherstuff() x=x-1 2012/7/23 Kevin Hazzard > Why don't you use a scripting host and inject commands into a ScriptEngine > reusing a ScriptScope as you need to execute t

Re: [Ironpython-users] Gradually executing a python script

2012-07-23 Thread Kevin Hazzard
Why don't you use a scripting host and inject commands into a ScriptEngine reusing a ScriptScope as you need to execute them? Kevin On Mon, Jul 23, 2012 at 5:31 AM, Jesper Taxbøl wrote: > Hi, > > I am not that familiar with Ironpython yet, but I have a question that I > hope you can help me ans