Win32 extensions??? not OLE

R

Rain

Hello
I'm new to programming and Ruby.
My question is, "does Ruby have a Windows extensions module that allows
access to windows OS? "
Something like the windows extension for Python written by Mark Hammond
where you can import OS and peform file copies, dir, get OS versions
ect..

I'm not looking for API or OLE control. Just direct OS control.
 
D

Dave Burt

Rain said:
Hello
I'm new to programming and Ruby.
My question is, "does Ruby have a Windows extensions module that allows
access to windows OS? "
Something like the windows extension for Python written by Mark Hammond
where you can import OS and peform file copies, dir, get OS versions
ect..

I'm not looking for API or OLE control. Just direct OS control.

For direct control of Windows, you use the API.

If, however, you want a more abstract, high-level interface to files,
pathnames, etc., such as Python's os library provides, you won't find
them collected into one module. Check out classes IO, File, FileTest,
Find, FileUtils, Tempfile, Process, Pathname, and the constant ENV.

If you ask a more specific question about what you want to do, we can
probably narrow that down for you.

Cheers,
Dave
 
T

Taisuke Yamada

If you need platform neutral interface like "file handling",
"network socket", and such, just check out class library bundled
with Ruby itself. OTOH, if you want certain OS-specific
features (like "shutting down Windows", "get OS version", etc.),
use "win32ole" module and invoke a call through obtained WMI
instance. WMI should do the job for most management tasks.

I've never heard of any wrapper library that provides simple
methods to perform common Windows management tasks. You
probably need to call/use WMI directly through "win32ole" module.
It's actually easy and more useful than limited wrapper as
tons of sample scripts (in VBScript or JavaScript) are floating
on the net, especially at MSDN site.
I'm new to programming and Ruby.
My question is, "does Ruby have a Windows extensions module that
allows access to windows OS? "
Something like the windows extension for Python written by Mark
Hammond where you can import OS and peform file copies, dir, get
OS versions ect..

I'm not looking for API or OLE control. Just direct OS control.

--
Taisuke Yamada <[email protected]>, http://rakugaki.org/
2268 E9A2 D4F9 014E F11D 1DF7 DCA3 83BC 78E5 CD3A

Message to my public address may not be handled in a timely manner.
For a direct contact, please use my private address on my namecard.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top