[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Wxruby-dev] RubyRunner Tool for Mac OS X
From: |
C. B. Schofield |
Subject: |
Re: [Wxruby-dev] RubyRunner Tool for Mac OS X |
Date: |
Wed, 13 Aug 2003 08:36:13 -0600 |
User-agent: |
Microsoft-Entourage/10.1.1.2418 |
On 8/13/03 12:50 AM, "Torsten Rueger" wrote:
> I don't have wxRuby yet, so I tried with python. A good test also. In
> short it doesn't work, but that doesn't mean much at this stage.
> For python I need to set PYTHONPATH correctly for my app, how would I
> achieve this with the runner ?
Thanks for the feedback.
Well, you can include command line parameters in the she-bang line of your
script (like #!/usr/local/bin/ruby -C /Users/MyDir), if that helps. If not,
you'll have to add some setup lines to the source before "[aTask launch]",
like:
[aTask setEnvironment:[NSDictionary
dictionaryWithObjectsAndKeys:@"/Users/MyDir", @"PYTHONPATH", nil]];
[aTask setArguments:[NSArray arrayWithObjects:@"-w", @"-rdebug"]];
[aTask setCurrentDirectoryPath:@"/Users/MyDir"];
[aTask launch];
If this turns out to be a major shortcoming, I may add a bit of UI to
RubyRunner to allow you to set these parameters on-the-fly.
> Also it would be helpful to be able to read the output, is that possible ?
Yes, you can read the output using the Console application (in
/Applications/Utilities).
However, this brings up an issue I would really like to solve. I can use
NSTask::setStandardInput and NSTask::setStandardOutput to set the stdin and
stdout of the script, but I haven't figured out how to attach these to a
terminal window. I don't know if it's even possible, but it sure would be
useful (for debugging, etc.) to be able to get input from the terminal.
Craig
Re: [Wxruby-dev] MinGW build, a problem + what about bcc build, Kevin Smith, 2003/08/12