Aha! That looks like exactly what I need! It will take some tweaking of
the code, but this should give me the information I need to route things
properly.
Now, I just need to find out if I can do something similar for
System.Console, but I can live with it if I can't for that one. Python
output wa
Can you run each document on its own thread?
Oh, it also looks like we actually flow CodeContext through to the caller. So
you could do something like:
class MyFile {
public void write(CodeContext context, string data) {
Scope curScope = context.Scope; // this gi
Dino Viehland wrote:
> You can always provide your own stream which is aware of what the current
> output window is. It could store this in a thread static or just some
> variable that you update whenever the active window changes. You can set
> that via ScriptRuntime.IO.OutputStream. You cou
You can always provide your own stream which is aware of what the current
output window is. It could store this in a thread static or just some variable
that you update whenever the active window changes. You can set that via
ScriptRuntime.IO.OutputStream. You could conceptually do the exact
I have a bit of a problem that I'm not sure how to solve. In my
application, I have multiple documents, and each can possibly be
performing script operations that print text out via the "print"
function. I have one "script output" window, which, only shows the
output of whichever is the active docu
Hello all,
It occurs to me; CPython doesn't have optimised tail calls, but no
reason that IronPython shouldn't!
Please vote up:
http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=20927
:-)
Michael
--
http://www.ironpythoninaction.com/
http://www.voidspace.org.uk/blog
___
Dino Viehland wrote:
Yep, and I'm happy to move back to the old behavior - being consistent w/
ourselves and broken seems better than being inconsistent w/ ourselves and
broken :)
Better a foolish consistency than uhm... the opposite. :-)
Michael
-Original Message-
From: users-bo
Yep, and I'm happy to move back to the old behavior - being consistent w/
ourselves and broken seems better than being inconsistent w/ ourselves and
broken :)
-Original Message-
From: users-boun...@lists.ironpython.com
[mailto:users-boun...@lists.ironpython.com] On Behalf Of Michael Foo
Dino Viehland wrote:
You're right that it worked in 1.0 - but of course in 1.0 we would also end up
with an arbitrary ordering between engines. For example you could have:
Engine 1:
Sys.path = C:\
Contains "Foo.dll"
Engine 2:
Sys.Path = D:\
Cont
You're right that it worked in 1.0 - but of course in 1.0 we would also end up
with an arbitrary ordering between engines. For example you could have:
Engine 1:
Sys.path = C:\
Contains "Foo.dll"
Engine 2:
Sys.Path = D:\
Contains "Foo.dll"
Which F
How do we love thee, Fusion? Let me count the ways...
On Fri, Jan 30, 2009 at 10:34 AM, Tom Wright wrote:
> Hi,
>
> Having two engines in the same AppDomain causes interesting behaviour when
> trying trying to add references.
>
> Only the sys.path of the first engine that was created seems to be
Hi,
Having two engines in the same AppDomain causes interesting behaviour
when trying trying to add references.
Only the sys.path of the first engine that was created seems to be taken
into account when calling clr.AddReference, the second sys.path is ignored.
See
http://www.codeplex.com/I
http://www.network-theory.co.uk/docs/pytut/Packages.html
That will explain better.
slide
On Fri, Jan 30, 2009 at 10:39 AM, Severin wrote:
> Ok, that's very helpful.
> I didn't know that.
> Thanks,
> Severin
>
> On Fri, Jan 30, 2009 at 6:29 PM, Michael Foord
> wrote:
>>
>> Severin wrote:
>>>
>>
Ok, that's very helpful.
I didn't know that.
Thanks,
Severin
On Fri, Jan 30, 2009 at 6:29 PM, Michael Foord wrote:
> Severin wrote:
>
>> Good point! I forgot that I was having the *.py files in a subdirectory.
>>
>> Is it also possible to set the 'current' directory for the engine?
>>
>> For ins
You could also make the files in the subdirectory a module and write a
__init__.py to import the other items.
On Fri, Jan 30, 2009 at 10:28 AM, Severin wrote:
> yes, thats what I did.
>
> but then I have relative path's in the python code. to open a file for
> instance.
> lets say ./py is my subd
Severin wrote:
yes, thats what I did.
but then I have relative path's in the python code. to open a file for
instance.
lets say ./py is my subdirectory.
there I have a settings.ini and a main.py file. adding ./py to the
path I am able to run main.py with the DLR but not doing something
li
Severin wrote:
Good point! I forgot that I was having the *.py files in a subdirectory.
Is it also possible to set the 'current' directory for the engine?
For instance I would like to have the engine living in a subfolder of
my project and then all path's would be relative to this subfolder.
yes, thats what I did.
but then I have relative path's in the python code. to open a file for
instance.
lets say ./py is my subdirectory.
there I have a settings.ini and a main.py file. adding ./py to the path I am
able to run main.py with the DLR but not doing something like
open('settings.ini'
On Fri, Jan 30, 2009 at 10:01 AM, Severin wrote:
> Good point! I forgot that I was having the *.py files in a subdirectory.
> Is it also possible to set the 'current' directory for the engine?
> For instance I would like to have the engine living in a subfolder of my
> project and then all path's
I've created a C# dll that I call from Ironpython (Silverlight)
application. I receive an Overflow error when I call it but I can't
see that anything is wrong. Everything works as expected. The error is
below:
"OverflowError: Arithmetic operation resulted in an overflow."
But when I call the same
Good point! I forgot that I was having the *.py files in a subdirectory.
Is it also possible to set the 'current' directory for the engine?
For instance I would like to have the engine living in a subfolder of my
project and then all path's would be relative to this subfolder.
thank you,
Severin
Severin wrote:
Hello,
I'm digging out this thread again.
I'm trying to run python scripts from C# using the DLR.
Simple examples work, namely if I have just one function in one python
file.
How does it work when one python file imports from another python
file? I get "No module named x" Im
Hello,
I'm digging out this thread again.
I'm trying to run python scripts from C# using the DLR.
Simple examples work, namely if I have just one function in one python file.
How does it work when one python file imports from another python file? I
get "No module named x" ImportExceptions when t
23 matches
Mail list logo