<div>Agreed that could work :), but would still hang if a kid writes an infinite loop without actions inside.</div><div><br></div><div>I am really into making something robust for kids to play with.</div><div><br></div>Tax<br>


<br><br><div class="gmail_quote">2012/7/24 Markus Schaber <span dir="ltr">&lt;<a href="mailto:m.schaber@3s-software.com" target="_blank">m.schaber@3s-software.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">








<div lang="DE" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#1f497d">Hi, Jesper,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#1f497d">Let me suggest some different design: Do not use variables, but offer an “Action” function / delegate which is provided by the hosting code, and
 called by the player scripts. It gets the possible actions (left_wheel_speed, right_wheel_speed and fire) as Parameters. Inside this Action, you synchronize to some internal “cycle” mechanism, e. G. 50 ticks per second. When a player script wants to perform
 more than one action per tick, the Action() function waits for the next tick to come before it proceeds.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#1f497d">Also you need to properly synchronize the input variables, one idea is that the Action() function takes a snapshot of them after setting the output.<u></u><u></u></span></p>



<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#1f497d">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.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#1f497d">Grüße,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#1f497d">Markus<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">Von:</span></b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> ironpython-users-bounces+m.schaber=<a href="mailto:3s-software.com@python.org" target="_blank">3s-software.com@python.org</a> [mailto:<a href="mailto:ironpython-users-bounces%2Bm.schaber" target="_blank">ironpython-users-bounces+m.schaber</a>=<a href="mailto:3s-software.com@python.org" target="_blank">3s-software.com@python.org</a>]
<b>Im Auftrag von </b>Jesper Taxbøl<br>
<b>Gesendet:</b> Dienstag, 24. Juli 2012 00:18<br>
<b>An:</b> Kevin Hazzard<br>
<b>Cc:</b> <a href="mailto:ironpython-users@python.org" target="_blank">ironpython-users@python.org</a><br>
<b>Betreff:</b> Re: [Ironpython-users] Gradually executing a python script<u></u><u></u></span></p>
</div>
</div><div><div>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">First of all, thank you for your time.  I am not that experienced when it comes to all the terms used in this area of software, so please be patient with me.   <u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">To give you a more clear idea of what I am doing I have posted a video of the current progress here <a href="http://www.youtube.com/watch?v=HER6WSIwSBQ&amp;feature=youtu.be" target="_blank">http://www.youtube.com/watch?v=HER6WSIwSBQ&amp;feature=youtu.be</a> .
 This is a simple gameengine, with a physics based robot. It has simple senes (A vector to the nearest bot and the length of a raycast in front of the robot) and three actions (left_wheel_speed, right_wheel_speed and fire). IronPython is embeeded inside the
 Unity3D game engine which runs on .NET 2.0. I am using the dll version of ironpython in the project. (I could not figure out how to integrate the source into my game project.) <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">The whole prototype was made at  48 hour game jam called &quot;No More Sweden&quot; in Malmö the past weekend. <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">I did not know that the python code is compiled in IronPython before it is executed, and therefore will catch syntax errors before execution. That will be very usefull. :)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">I will need to look into the settrace advice, but my gut feeling is that it is not the direction I want to be going in. It might be later during work on the GUI / programming interface. <u></u><u></u></p>



</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">I agree that I should have a simple singlethreaded, turn based solution, as that can be made deterministic and its far easier to implement. That is definitely the way I want to go. The threading was only used in the prototype because I
 could not execute my script gradually. I saw the execute command as the only way to have Ironpython run my script, and saw a thread as the only way out. (at 3 am in the morning) <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">The reason I keep mentioning gradually execution requires some backstory: The reference project I have been inspired by is an old game called GunTactyx (<a href="http://www.youtube.com/watch?v=vT8PYETav7A&amp;feature=relmfu" target="_blank">http://www.youtube.com/watch?v=vT8PYETav7A&amp;feature=relmfu</a>),
 where you program robots to hunt down other robots. It uses an old version of the PAWN Language/abstract machine (<a href="http://www.compuphase.com/pawn/pawn.htm" target="_blank">http://www.compuphase.com/pawn/pawn.htm</a>). As far as I understand each robot there has an
 isolated abstract machine with limited memory and it is ticked gradually, like you control the clock on its CPU. If a robot crashes, has an infinite loop or a memory leak it does not affect the cpu in the other robots. The reason I am not using PAWN is that
 it is C++ based and my target platform runs .NET 2.0. Besides that I prefer Python over the PAWN language.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Kevin: When you say statemachine, I imagined Ironpython had something of that sort inside its belly? That might be where I am wrong. Is a statemachine and an abstract machine the same thing in this context?<u></u><u></u></p>



</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">With regard to the dostuff() functions, I dont mind the robots firing many instructions at a time. I just need to be able to let the robots run the same number of &quot;ticks&quot; between each game cycle. I imagine assigning a tick cost to the dostuff()
 functions, as they probably will do stuff inside the game world. <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">I have been looking at other solutions to allow me to make a programming game. During the 48 hours I briefly used the AluminumLua project which I was able to tick, but it lacked debelopment on the language side. (for loops was not implemented)
 I would prefer to stick to Pythoon as I love the language and I feel it contains the elements needed to write an interristing AI. <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">I need to read up on the IronPython  system and have therefore just ordered &quot;Ironpython in action&quot; book, I hope it will give me a better understanding. Other recommendations are welcome.<u></u><u></u></p>



</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Kind regards and thank you again for your feedback.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Tax<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">  <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">2012/7/23 Kevin Hazzard &lt;<a href="mailto:wkhazzard@gmail.com" target="_blank">wkhazzard@gmail.com</a>&gt;<u></u><u></u></p>
<div>
<p class="MsoNormal">What you&#39;re describing is a state machine. There are many ways to build such a thing and honestly, I&#39;ve never thought of single-stepping through code as a way to do that. It&#39;s actually quite an intriguing idea, if not inefficient. But efficiency
 isn&#39;t always measured with elegance (and vice versa). Keith&#39;s settrace idea is good, too. You should check that out.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">What it really comes down to is this: do you want the controller to also define the code or merely to drive it? For the example you posted, do you want the while loops implemented in Python to execute your dostuff() and dootherstuff() methods?
 Or do you want the controller that authorizes a &quot;step&quot; to do that? In that context, you could write the controller in Python, too, but the design of your code would look very different than what you proposed.<u></u><u></u></p>



</div>
<div>
<p class="MsoNormal"><span style="color:#888888"> <u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="color:#888888">Kevin<u></u><u></u></span></p>
</div>
<div>
<div>
<div>
<p class="MsoNormal">On Mon, Jul 23, 2012 at 1:48 PM, Jesper Taxbøl &lt;<a href="mailto:jesper@taxboel.dk" target="_blank">jesper@taxboel.dk</a>&gt; wrote:<u></u><u></u></p>
<p class="MsoNormal">The reason I want to do it gradually is that I cant be sure that the script ever terminates or has syntax errors. Would that not be a problem in a turn based setup?
<u></u><u></u></p>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><u></u> <u></u></p>
<div>
<p class="MsoNormal">2012/7/23 Keith Rome &lt;<a href="mailto:rome@wintellect.com" target="_blank">rome@wintellect.com</a>&gt;<u></u><u></u></p>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">You may want to look into leveraging the sys.settrace() feature of Python for controlling
 line-by-line execution. This API allows you to install a profiling function that gets invoked for every frame of script code that is executed. In your profiling function, you could compute the amount of memory being used by variables within the ScriptScope,
 and halt execution if you need to. Just be careful about what you do in your profiling function, as it will be called extremely often by the runtime.</span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"> </span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><a href="http://docs.python.org/library/sys.html#sys.settrace" target="_blank">http://docs.python.org/library/sys.html#sys.settrace</a><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"> </span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"> </span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">The reason you are seeing variant results is probably due to how you have implemented
 multithreading. The IronPython runtime is mostly thread-safe (as long as you don’t use libraries that make use of mutable objects, and as long as you import all libraries used at least once prior to forking threads). But your code must also be thread-safe
 as well. From your descriptions of your game engine, it sounds like your game engine is not designed to be thread-safe so I would strongly recommend avoiding multithreading as a means of providing resource sharing. It is very difficult to write 100% thread-safe
 code, and nothing will stop people from writing unsafe scripts in your game.</span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"> </span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Instead, I would 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 since the program will become deterministic.</span><span lang="EN-US"><u></u><u></u></span></p>



<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"> </span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"> </span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"> </span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:14.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Keith Rome</span></b><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Senior Consultant and Architect</span></b><span lang="EN-US"><u></u><u></u></span></p>



<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">MCPD-EAD, MCSD, MCDBA, MCTS-WPF, MCTS-TFS, MCTS-WSS</span><span lang="EN-US"><u></u><u></u></span></p>



<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Wintellect |
<a href="tel:770.617.4016" target="_blank">770.617.4016</a> | <a href="mailto:rome@wintellect.com" target="_blank">
krome@wintellect.com</a></span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><a href="http://www.wintellect.com/" target="_blank">www.wintellect.com</a></span><span lang="EN-US"><u></u><u></u></span></p>



<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"> </span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> ironpython-users-bounces+rome=<a href="mailto:wintellect.com@python.org" target="_blank">wintellect.com@python.org</a>
 [mailto:<a href="mailto:ironpython-users-bounces%2Brome" target="_blank">ironpython-users-bounces+rome</a>=<a href="mailto:wintellect.com@python.org" target="_blank">wintellect.com@python.org</a>]
<b>On Behalf Of </b>Jesper Taxbøl<br>
<b>Sent:</b> Monday, July 23, 2012 11:05 AM<br>
<b>To:</b> Kevin Hazzard<br>
<b>Cc:</b> <a href="mailto:ironpython-users@python.org" target="_blank">ironpython-users@python.org</a><br>
<b>Subject:</b> Re: [Ironpython-users] Gradually executing a python script</span><span lang="EN-US"><u></u><u></u></span></p>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US"> <u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Would that allow me to step gradually through a loop?<u></u><u></u></span></p>
<div>
<p class="MsoNormal"><span lang="EN-US"> <u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US">like:<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US"> <u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US">x = 0<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US">while x &lt; 10:<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US">   dostuff()<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US">   x=x+1<u></u><u></u></span></p>
</div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US">while x &gt; 0:<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US">   dootherstuff()<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US">   x=x-1<u></u><u></u></span></p>
</div>
<p class="MsoNormal"><span lang="EN-US"> <u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US"> <u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span lang="EN-US"> <u></u><u></u></span></p>
<div>
<p class="MsoNormal"><span lang="EN-US">2012/7/23 Kevin Hazzard &lt;<a href="mailto:wkhazzard@gmail.com" target="_blank">wkhazzard@gmail.com</a>&gt;<u></u><u></u></span></p>
<div>
<p class="MsoNormal"><span lang="EN-US">Why don&#39;t you use a scripting host and inject commands into a ScriptEngine reusing a ScriptScope as you need to execute them?<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US"> <u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span lang="EN-US">Kevin<u></u><u></u></span></p>
</div>
<div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US">On Mon, Jul 23, 2012 at 5:31 AM, Jesper Taxbøl &lt;<a href="mailto:jesper@taxboel.dk" target="_blank">jesper@taxboel.dk</a>&gt; wrote:<u></u><u></u></span></p>
</div>
</div>
<blockquote style="border:none;border-left:solid windowtext 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt;border-color:currentColor currentColor currentColor rgb(204,204,204)">



<div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="color:#222222">Hi,</span><span lang="EN-US"><u></u><u></u></span></p>
<div>
<p class="MsoNormal"><span lang="EN-US"> <u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="color:#222222">I am not that familiar with Ironpython yet, but I have a question that I hope you can help me answer.</span><span lang="EN-US"><u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US"> <u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="color:#222222">I am working on a programming-game where I will allow users to do some simple python scripting against a simple API that I will control
 a game character. Instructions like move and shoot etc, alongside some simple sense functions that return info on the game world. </span><span lang="EN-US"><u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US"> <u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="color:#222222">My current prototype creates an ironpython engine for each game character and executes the script in a thread by itself, which sort of works.
 But I have the problem that the outcome of executing the game gives different results every time. Therefore I would like to ask the question:</span><span lang="EN-US"><u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US"> <u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="color:#222222">Is it possible to execute a script inside the Ironpython engine gradually?</span><span lang="EN-US"><u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US"> <u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="color:#222222">I imagine that I could update a list of engines with a tick(int cycles) and get a fair sharing of resources between engines and ensure the
 same result every time.</span><span lang="EN-US"><u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US"> <u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="color:#222222">Kind regards </span><span lang="EN-US"><u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US"> <u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="color:#222222">Tax</span><span lang="EN-US"><u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US"> <u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US"> <u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="color:#222222">P.S:</span><span lang="EN-US"><u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="color:#222222">As this is a programming game I would also like to be able to limit the available memory each script is using. Is there a way to limit this,
 so a script like this would be killed.</span><span lang="EN-US"><u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US"> <u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="color:#222222">x = 0</span><span lang="EN-US"><u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="color:#222222">v = {}</span><span lang="EN-US"><u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="color:#222222">while True:</span><span lang="EN-US"><u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="color:#222222">   v[x]=x</span><span lang="EN-US"><u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="color:#222222">   x= x + 1</span><span lang="EN-US"><u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US"> <u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US"> <u></u><u></u></span></p>
</div>
<p class="MsoNormal"><span lang="EN-US"> <u></u><u></u></span></p>
</div>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span lang="EN-US">_______________________________________________<br>
Ironpython-users mailing list<br>
<a href="mailto:Ironpython-users@python.org" target="_blank">Ironpython-users@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/ironpython-users" target="_blank">http://mail.python.org/mailman/listinfo/ironpython-users</a><u></u><u></u></span></p>
</blockquote>
</div>
<p class="MsoNormal"><span lang="EN-US" style="color:#888888"><br>
<br clear="all">
<br>
-- <br>
</span><b><span lang="EN-US" style="font-family:&quot;Garamond&quot;,&quot;serif&quot;;color:#888888">W. Kevin Hazzard</span></b><span lang="EN-US"><u></u><u></u></span></p>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:8.0pt;font-family:&quot;Garamond&quot;,&quot;serif&quot;;color:#888888">Consultant, Author, Teacher, Microsoft MVP</span><span lang="EN-US"><u></u><u></u></span></p>



</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:8.0pt;font-family:&quot;Garamond&quot;,&quot;serif&quot;;color:#888888"><a href="tel:%28804%29%20928-3444" target="_blank">(804) 928-3444</a></span><span lang="EN-US"><u></u><u></u></span></p>



</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:8.0pt;font-family:&quot;Garamond&quot;,&quot;serif&quot;;color:#888888"><a href="http://manning.com/hazzard" target="_blank">book</a> |
<a href="https://mvp.support.microsoft.com/profile/Kevin.Hazzard" target="_blank">
mvp</a> | <a href="http://twitter.com/#%21/KevinHazzard" target="_blank">twitter</a> |
<a href="http://www.facebook.com/wkhazzard" target="_blank">facebook</a> | <a href="http://www.linkedin.com/in/kevinhazzard" target="_blank">
linkedin</a> | <a href="http://captechconsulting.com" target="_blank">captech</a></span><span lang="EN-US"><u></u><u></u></span></p>
</div>
<p class="MsoNormal"><span lang="EN-US"> <u></u><u></u></span></p>
</div>
<p class="MsoNormal"><span lang="EN-US"> <u></u><u></u></span></p>
</div>
</div>
</div>
</div>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
</div>
<p class="MsoNormal"><br>
<br clear="all">
<br>
-- <br>
<strong><span style="font-family:&quot;Garamond&quot;,&quot;serif&quot;">W. Kevin Hazzard</span></strong><u></u><u></u></p>
<div>
<p class="MsoNormal"><span style="font-size:8.0pt;font-family:&quot;Garamond&quot;,&quot;serif&quot;">Consultant, Author, Teacher, Microsoft MVP</span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:8.0pt;font-family:&quot;Garamond&quot;,&quot;serif&quot;"><a href="tel:%28804%29%20928-3444" target="_blank">(804) 928-3444</a></span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:8.0pt;font-family:&quot;Garamond&quot;,&quot;serif&quot;"><a href="http://manning.com/hazzard" target="_blank">book</a> |
<a href="https://mvp.support.microsoft.com/profile/Kevin.Hazzard" target="_blank">
mvp</a> | <a href="http://twitter.com/#!/KevinHazzard" target="_blank">twitter</a> |
<a href="http://www.facebook.com/wkhazzard" target="_blank">facebook</a> | <a href="http://www.linkedin.com/in/kevinhazzard" target="_blank">
linkedin</a> | <a href="http://captechconsulting.com" target="_blank">captech</a></span><u></u><u></u></p>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div></div></div>
</div>
</div>

</blockquote></div><br>