From: Patrick K. O'Brien <pobrien@or...> - 2002-05-29 17:18:55
I see what you mean. Having dialogs for stdin really sucks. I'll definitely
move this up in my list of priorities, but I can't promise when I'll have
this fixed/improved. In the mean time, I know Boa's shell does it the way
you want. You might find code there that you could patch into PyCrust. I
don't think Riaan would mind.
Patrick K. O'Brien
> -----Original Message-----
> From: Raul Cota [mailto:cota@...]
> Sent: Wednesday, May 29, 2002 12:04 PM
> To: pobrien@...
> Subject: Re: [PyCrust] bug in OnKeyDown
> > That should still work. But having the shell's wxSTC as stdin is not
> > available at this point. Boa does it that way and at some point I'll add
> > that option as well. Does the current dialog box for input not
> work for you
> > for some reason?
> not that it doesn't work, but the way it si implemented is that in a
> normal run, I write a series of commands and it is also important to see
> the output and the dialog box pops every time right after I send every
> for instance, if I run the following line by line in the dialog box...
> units SI
> thermo = VirtualMaterials.Peng-Robinson
> thermo + PROPANE n-BUTANE ISOBUTANE n-PENTANE
> flash = Flash.SimpleFlash()
> cd flash.In
> Fraction = .25 .25 .25 .25
> T = 0 C
> cd ..
> This is what I'd see if I run it from plain python2.2 (in the DOS
> D:\sim\cmd>python CommandInterface.py
> /> units SI
> /> thermo = VirtualMaterials.Peng-Robinson
> /> thermo + PROPANE n-BUTANE ISOBUTANE n-PENTANE
> /> flash = Flash.SimpleFlash()
> /> cd flash.In
> /flash.In> Fraction = .25 .25 .25 .25
> /flash.In> T = 0 C
> /flash.In> cd ..
> /flash> quit
> As you can see, if I want to drive a whole simulation (this is supposed
> to be a chemical process simulator), with the command line, it is
> important to see in which port or unit operation I'm working on (i.e.
> />, /flash>, /flash.Out>, etcetera) . And it's easier to write in the
> same shell than to a dialog box.
> I hope you see my point.
> To tell you the truth, the whole simulator is intended to be driven by a
> gui which uses PyCrust and if I run the commandinterface with PyCrust,
> the stdin would usually be a file and not sys.stdin. But some times for
> plain testing I rather type.
> Sorry the message got too long