|
View:
New views
8 Messages
—
Rating Filter:
Alert me
|
|
|
System Commands.Hello, I am new to Boo. Mostly new to programming in whole. I have looked all over for support but going here is all that I can find. So, I wanted to know how I would go about running system commands.
Kind of like the subprocess.call on python.
Thanks, Montel Edwards --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Boo Programming Language" group. To post to this group, send email to boolang@... To unsubscribe from this group, send email to boolang+unsubscribe@... For more options, visit this group at http://groups.google.com/group/boolang?hl=en -~----------~----~----~----~------~----~------~--~--- |
|
|
Re: System Commands.2009/9/20 Montel Edwards <mde@...> Hello, I am new to Boo. Mostly new to programming in whole. I have looked all over for support but going here is all that I can find. So, I wanted to know how I would go about running system commands. Hi, AFAIK, boo has very few specific libraries. For most things, it relies on the underlying .NET/Mono libraries. So you should study those, for which there is documentation at mono site (if you are on Linux/ OS X) or at Microsoft .NET sites if you are on Windows. They are both easily googable, so I will spare the links ... (and no, I can't give you a direct answer because I am also new to .NET) Ciao ------- FB --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Boo Programming Language" group. To post to this group, send email to boolang@... To unsubscribe from this group, send email to boolang+unsubscribe@... For more options, visit this group at http://groups.google.com/group/boolang?hl=en -~----------~----~----~----~------~----~------~--~--- |
|
|
Re: System Commands.On Sun, Sep 20, 2009 at 8:14 AM, Montel Edwards <mde@...> wrote: Hello, I am new to Boo. Mostly new to programming in whole. I have looked all over for support but going here is all that I can find. So, I wanted to know how I would go about running system commands. Hi and welcome to Boo :) You want to look at System.Diagnostics.Process : http://msdn.microsoft.com/en-us/library/system.diagnostics.process_members.aspx Cheers, --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Boo Programming Language" group. To post to this group, send email to boolang@... To unsubscribe from this group, send email to boolang+unsubscribe@... For more options, visit this group at http://groups.google.com/group/boolang?hl=en -~----------~----~----~----~------~----~------~--~--- |
|
|
Re: System Commands.On Sat, Sep 19, 2009 at 9:14 PM, Montel Edwards <mde@...> wrote: > Hello, I am new to Boo. Mostly new to programming in whole. I have looked > all over for support but going here is all that I can find. So, I wanted to > know how I would go about running system commands. > Kind of like the subprocess.call on python. > For that particular case there's actually a buitin function: shell(command as string, args as string). Ex: print shell("ls", "") --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Boo Programming Language" group. To post to this group, send email to boolang@... To unsubscribe from this group, send email to boolang+unsubscribe@... For more options, visit this group at http://groups.google.com/group/boolang?hl=en -~----------~----~----~----~------~----~------~--~--- |
|
|
Re: System Commands.Oh, thanks. I did find something else earlier it was like
import System Systen.Diagnostics.Process.Start("ls") What is the difference? On Sun, 2009-09-20 at 16:39 -0300, Rodrigo B. de Oliveira wrote: > On Sat, Sep 19, 2009 at 9:14 PM, Montel Edwards <mde@...> wrote: > > Hello, I am new to Boo. Mostly new to programming in whole. I have looked > > all over for support but going here is all that I can find. So, I wanted to > > know how I would go about running system commands. > > Kind of like the subprocess.call on python. > > > > For that particular case there's actually a buitin function: > shell(command as string, args as string). Ex: > > print shell("ls", "") > > --~--~---------~--~----~------------~-------~--~----~ > You received this message because you are subscribed to the Google Groups "Boo Programming Language" group. > To post to this group, send email to boolang@... > To unsubscribe from this group, send email to boolang+unsubscribe@... > For more options, visit this group at http://groups.google.com/group/boolang?hl=en > -~----------~----~----~----~------~----~------~--~--- > |
|
|
Re: System Commands.shell is implemented on top of System.Diagnostics.Process. All it does is to capture the process output and return it as a string. On Sun, Sep 20, 2009 at 5:07 PM, Montel Edwards <mde@...> wrote: > Oh, thanks. I did find something else earlier it was like > import System > Systen.Diagnostics.Process.Start("ls") > > What is the difference? > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Boo Programming Language" group. To post to this group, send email to boolang@... To unsubscribe from this group, send email to boolang+unsubscribe@... For more options, visit this group at http://groups.google.com/group/boolang?hl=en -~----------~----~----~----~------~----~------~--~--- |
|
|
Re: System Commands.On Mon, Sep 21, 2009 at 3:39 AM, Rodrigo B. de Oliveira <rodrigobamboo@...> wrote:
Oops, indeed. It almost screams for a gendarme rule to detect patterns which would better be boo-ified :-p --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Boo Programming Language" group. To post to this group, send email to boolang@... To unsubscribe from this group, send email to boolang+unsubscribe@... For more options, visit this group at http://groups.google.com/group/boolang?hl=en -~----------~----~----~----~------~----~------~--~--- |
|
|
Re: System Commands.While this is all true, it is probably worth asking what it is you're trying to do through the shell? I can't guarantee it but the underlying framework is very robust and probably has a better way to do what you're wanting to do than through shell commands. For example if you're trying to do an "ls" you could use the System.IO.Directory class instead. This will save you a lot of string parsing. If you need to call some 3rd party application then you're probably stuck with the shell but anything having to do with the file system is probably a heck of a lot easier through the built-in classes.
On Sun, Sep 20, 2009 at 2:39 PM, Rodrigo B. de Oliveira <rodrigobamboo@...> wrote:
-- Justin Chase http://www.justnbusiness.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Boo Programming Language" group. To post to this group, send email to boolang@... To unsubscribe from this group, send email to boolang+unsubscribe@... For more options, visit this group at http://groups.google.com/group/boolang?hl=en -~----------~----~----~----~------~----~------~--~--- |
| Free embeddable forum powered by Nabble | Forum Help |