Thanks! Where can I find help with getting the python engine to deal with the indents involved with loops, defs, and such? I read Mike Stalls article, 10 Easy Steps to Embedding..., but I still can't understand the difference between evaluate and execute methods.
<br><br>I am trying to use IPY as a scripting language for my <a href="http://ASP.NET">ASP.NET</a> app, so I really need to know how to build my own shell in C# in addition to the help you all have already given me in using my c# classes in the python code.
<br><br>Thanks!<br><br><div><span class="gmail_quote">On 10/19/07, <b class="gmail_sendername">Michael Foord</b> <<a href="mailto:fuzzyman@voidspace.org.uk">fuzzyman@voidspace.org.uk</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Joshua J. Pearce wrote:<br>> What am I doing wrong? I have a form with two text boxes and a button.<br>> When I type, "tb.clear()" into the first textbox and click the button,<br>> I get the a MissingMemberException which states, "'TextBox' object has
<br>> no attribute 'clear'".<br><br>Do you mean "tb.Clear()" ?<br><br>Michael<br><br><br>><br>><br>> public partial class Form1 : Form<br>> {<br>> public static PythonEngine pe =
PythonEngine.CurrentEngine;<br>> public Form1()<br>> {<br>> InitializeComponent();<br>><br>> ScriptDomainManager.CurrentManager.Host.DefaultModule.SetVariable("tb",<br>
> textBox2);<br>> }<br>><br>><br>> private void button1_Click(object sender, EventArgs e)<br>> {<br>> pe.ExecuteCommand (textBox1.Text);<br>><br>> }<br>
> }<br>><br>><br>> Thanks,<br>><br>> Josh Pearce<br>><br>><br>> On 10/18/07, *Joshua J. Pearce* < <a href="mailto:joshua.pearce@gmail.com">joshua.pearce@gmail.com</a><br>> <mailto:<a href="mailto:joshua.pearce@gmail.com">
joshua.pearce@gmail.com</a>>> wrote:<br>><br>> I am very sorry! I just noticed this:<br>><br>> ScriptDomainManager.CurrentMan<br>> ager.Host.DefaultModule.SetVariable("SomeName",
<br>> SomeObject);<br>><br>> SomeObject is then available to user code as SomeName...<br>><br>> That is exactly what I want to do!!!<br>><br>> Thank you very much!<br>><br>><br>>
<br>> On 10/18/07, *JoeSox* <<a href="mailto:joesox@gmail.com">joesox@gmail.com</a> <mailto:<a href="mailto:joesox@gmail.com">joesox@gmail.com</a>>><br>> wrote:<br>><br>> On 10/18/07, Joshua J. Pearce <
<a href="mailto:joshua.pearce@gmail.com">joshua.pearce@gmail.com</a><br>> <mailto:<a href="mailto:joshua.pearce@gmail.com">joshua.pearce@gmail.com</a>>> wrote:<br>> > My application is <a href="http://ASP.NET">
ASP.NET</a> <<a href="http://ASP.NET">http://ASP.NET</a>>, I hardly think<br>> integrating CPython is going to be a better choice.<br>><br>> You never mentioned you were using <a href="http://ASP.NET">
ASP.NET</a> <<a href="http://ASP.NET">http://ASP.NET</a>>.<br>> You have mentioned C#.<br>><br>> > Is is possible to 'expose' c# methods that exist in the same<br>> scope as an IPY
<br>> > engine,<br>><br>> Can you clarify what you mean by this line for me? Can you<br>> provide a<br>> C# method that exists in the same scope as an IPY engine?<br>>
<br>> There must be a custom interface, how would an outside script know<br>> about a custom method outside it's scope without an custom<br>> interface?<br>> Michael and myself have both provided examples.
<br>><br>> If you have a C# method it must be represented by something<br>> else in<br>> the script or python code that IronPythonEngine is using, then<br>> update<br>> the script or python code loaded in the IronPythonEngine using
<br>> the<br>> examples provided.<br>><br>> Since I have not seen your source, I don't know why you believe<br>> importing the AppService dll and create your own instance in
<br>> the IP<br>> engine will be too much overhead. That sounds like the bet<br>> way to go<br>> but I am not familiar with your source.<br>> Good Luck!<br>> --
<br>> Later, JoeSox<br>> _______________________________________________<br>> Users mailing list<br>> <a href="mailto:Users@lists.ironpython.com">Users@lists.ironpython.com</a> <mailto:
<a href="mailto:Users@lists.ironpython.com">Users@lists.ironpython.com</a>><br>> <a href="http://lists.ironpython.com/listinfo.cgi/users-ironpython.com">http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
</a><br>><br>><br>><br>><br>> --<br>> Joshua Pearce<br>><br>><br>><br>><br>> --<br>> Joshua Pearce<br>> ------------------------------------------------------------------------
<br>><br>> _______________________________________________<br>> Users mailing list<br>> <a href="mailto:Users@lists.ironpython.com">Users@lists.ironpython.com</a><br>> <a href="http://lists.ironpython.com/listinfo.cgi/users-ironpython.com">
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com</a><br>><br><br>_______________________________________________<br>Users mailing list<br><a href="mailto:Users@lists.ironpython.com">Users@lists.ironpython.com
</a><br><a href="http://lists.ironpython.com/listinfo.cgi/users-ironpython.com">http://lists.ironpython.com/listinfo.cgi/users-ironpython.com</a><br></blockquote></div><br><br clear="all"><br>-- <br>Joshua Pearce<br>