Hi (again)!
Hopefully a (slightly) more intelligent question this time. I've been successfully able to run shell commands from Julia through Base.run, and the first thing I did was clear the screen:
However, I wanted to ask, if there was an inbuilt function that does this. Making one yourself is trivial of course:
julia> f() = Base.run(`clear`)
f (generic function with 1 method)
But creating one for each session is rather annoying.
Second question is that I'm looking for something like Python's dir function:
In [3]: import os
In [4]: dir(os)
Out[4]:
['EX_CANTCREAT',
'EX_CONFIG',
'EX_DATAERR',
'EX_IOERR',
....
....
....
'wait',
'wait3',
'wait4',
'waitpid',
'walk',
'write']
In essence, it gives you a list of all the objects/functions that are available to that package. Now, I've taken a look at the help function in Julia, and its helpful on a function, it can give you information about a function that you know exist:
julia> help(run)
Base.run(command)
Run a command object, constructed with backticks. Throws an error
if anything goes wrong, including the process exiting with a non-
zero status.
However, it is Base that has this function. Is there a tool like dir that I can leverage to explore Julia?