Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Programming Language for Systems Administrator

Reply
Thread Tools

Programming Language for Systems Administrator

 
 
Kanthi Kiran Narisetti
Guest
Posts: n/a
 
      04-11-2005
Hi All,

I am Windows Systems Administrator(planning to migrate to Linux
administration in near future), I have occassionally written few batch
files and Vbscripts to automate my tasks.

Now I have strong interest to learn a programming language that would
help me to write Scripts or Application ( In Systems Administrative
point of view) .

I have read on net that Python is the best way to start of for beginers
, Please let me your suggestions and help me out to chose to the right
programming language to write scripts ranging from simple automation
scripts to appliations for my workflow.

I am confused to chose between C++,Python,Perl.

Thanks in Advance

Kk

 
Reply With Quote
 
 
 
 
Grig Gheorghiu
Guest
Posts: n/a
 
      04-11-2005
In my experience, Python is more Windows-friendly than Perl. Mark
Hammond's Python Extensions for Windows are a lifesaver. You can
download the package from http://sourceforge.net/projects/pywin32/ or
install the ActiveState Python package, which includes the Windows
extensions.

I use Python for example to automate user and mailbox management in
Active Directory and Exchange. I also use the mxODBC module to interact
with SQL Server.

I warmly recommend "Python Programming on Win32" by Mark Hammond and
Andy Robinson (O'Reilly).

Grig

 
Reply With Quote
 
 
 
 
johnny.shz@gmail.com
Guest
Posts: n/a
 
      04-11-2005

Kanthi Kiran Narisetti wrote:
> Hi All,
>
> I am Windows Systems Administrator(planning to migrate to Linux
> administration in near future), I have occassionally written few

batch
> files and Vbscripts to automate my tasks.
>
> Now I have strong interest to learn a programming language that would
> help me to write Scripts or Application ( In Systems Administrative
> point of view) .
>
> I have read on net that Python is the best way to start of for

beginers
> , Please let me your suggestions and help me out to chose to the

right
> programming language to write scripts ranging from simple automation
> scripts to appliations for my workflow.
>
> I am confused to chose between C++,Python,Perl.
>
> Thanks in Advance
>
> Kk


 
Reply With Quote
 
Sizer
Guest
Posts: n/a
 
      04-11-2005
"Kanthi Kiran Narisetti" <> wrote in
news: ps.com:

> I am Windows Systems Administrator(planning to migrate to Linux
> administration in near future), I have occassionally written few batch
> files and Vbscripts to automate my tasks.
>
> Now I have strong interest to learn a programming language that would
> help me to write Scripts or Application ( In Systems Administrative
> point of view) .
> [...]
> I am confused to chose between C++,Python,Perl.


I admin both Windows and Linux (Slackware, Debian) boxes, and I think
your best choice is either Python or learning bash scripting. C++ is just
no good - I use it for some large applications, but for sysadmin and
utility stuff it just takes 10 times as much work to get anything done as
Python does.

bash scripting is still the way most people seem to do these things on
linux (it's equivalent to batch files under Windows/DOS but far more
powerful), which is the reason I suggest you take a look at it - it's
still useful for writing small things that you want to send to other
people where you don't know if they have python installed. Of course this
is made less useful for you because you need to install a bash
interpreter on Windows so it's no longer cross platform.

I suggest you learn Python instead of Perl. Perl and Python are close
enough in terms of functionality (with a little give and take, please no
holy wars), so I wouldn't say one is Better than the other if you already
know it. But for someone starting from scratch I think you will find that
while the perl program may be smaller the python program will be far more
readable, maintainable, and easier to write.

I use bash scripting for small stuff (just simple command lines in
sequence), C++ and Java for a few things that require it (though I really
hate them both after using Python) and Python whenever I can. Python on
Linux/Windows is amazingly cross platform as long as you use functions
like os.path.join('dir','file') instead of hardcoding 'dir\\file' into
your code. And use the glob, shutil, and os libraries to do all your
hard work for you.
 
Reply With Quote
 
rbt
Guest
Posts: n/a
 
      04-11-2005
Kanthi Kiran Narisetti wrote:
> Hi All,
>
> I am Windows Systems Administrator(planning to migrate to Linux
> administration in near future), I have occassionally written few batch
> files and Vbscripts to automate my tasks.
>
> Now I have strong interest to learn a programming language that would
> help me to write Scripts or Application ( In Systems Administrative
> point of view) .
>
> I have read on net that Python is the best way to start of for beginers
> , Please let me your suggestions and help me out to chose to the right
> programming language to write scripts ranging from simple automation
> scripts to appliations for my workflow.
>
> I am confused to chose between C++,Python,Perl.
>
> Thanks in Advance
>
> Kk
>


I use Python for all sorts of Windows administration tasks. I can honestly say that
I've yet to find a better Windows scripting language. I've used it to migrate Mac
users to PCs (file conversions), laptop location reporting (ipconfig, route, etc.)...
to help recover stolen laptops, and most recently a social security number search
utility to identify files that should be safe guarded from identity theft hacks. See
the latter here:

http://filebox.vt.edu/users/rtilley/...find_ssns.html

In short, Python is the ideal language for scripting/programming on Windows computers.

Best of luck,

rbt
 
Reply With Quote
 
Sizer
Guest
Posts: n/a
 
      04-11-2005
Looking at my followup, I really didn't make it clear that you'll have to
learn some bash scripting to be an effective *nix administrator, just
because so many parts of the system use bash scripting. But python is much
nicer to write anything non-trivial in.
 
Reply With Quote
 
Ville Vainio
Guest
Posts: n/a
 
      04-12-2005
>>>>> "Sizer" == Sizer <> writes:

Sizer> Looking at my followup, I really didn't make it clear that
Sizer> you'll have to learn some bash scripting to be an effective
Sizer> *nix administrator, just because so many parts of the
Sizer> system use bash scripting. But python is much nicer to
Sizer> write anything non-trivial in.

If you don't need to edit already existing system scripts, you don't
really need to know bash scripting. For debugging purposes, it's easy
to see what commands the script executes to perform a task.

You just need to know about `backticks` and $ENV_VARS, but that's more
general Unix knowledge than actual shell scripting.

So IMHO learning bash scripting might be a waste of time, and it
should be learnt 'as you go' - i.e. if/when you eventually bump into a
problem where you need to be able to do bash scripting. There's the
'Unix romantic' movement that still thinks shell scripts are a good
idea, but this is my .02EUR to point out that not everyone agrees with
them.

--
Ville Vainio http://tinyurl.com/2prnb
 
Reply With Quote
 
Peter Maas
Guest
Posts: n/a
 
      04-12-2005
Ville Vainio schrieb:
> If you don't need to edit already existing system scripts, you don't
> really need to know bash scripting. For debugging purposes, it's easy
> to see what commands the script executes to perform a task.


This is only true for trivial bash scripts. I have seen bash scripts
which were quite hard to read especially for beginners.

--
-------------------------------------------------------------------
Peter Maas, M+R Infosysteme, D-52070 Aachen, Tel +49-241-93878-0
E-mail 'cGV0ZXIubWFhc0BtcGx1c3IuZGU=\n'.decode('base64')
-------------------------------------------------------------------
 
Reply With Quote
 
=?iso-8859-15?Q?Pierre-Fr=E9d=E9ric_Caillaud?=
Guest
Posts: n/a
 
      04-12-2005
> I am confused to chose between C++,Python,Perl.

Writing scripts in C++, you'll just die of brain burn.

Python has very good shell integration and I heard it can do funky stuff
with COM/OLE with a few lines of code where you'd need a few pages worth
of impossible to understand COM code to do the same in C. Also basic shell
tasks like spawning processes, piping from / to their output, regular
expressions, parsing files, etc are a breeze. There are modules for INI
files, csv files, etc.

Perl should be about the same, but you have to like the scary syntax.
 
Reply With Quote
 
beliavsky@aol.com
Guest
Posts: n/a
 
      04-12-2005
Ville Vainio wrote:

> If you don't need to edit already existing system scripts, you don't
> really need to know bash scripting. For debugging purposes, it's easy
> to see what commands the script executes to perform a task.
>
> You just need to know about `backticks` and $ENV_VARS, but that's

more
> general Unix knowledge than actual shell scripting.
>
> So IMHO learning bash scripting might be a waste of time, and it
> should be learnt 'as you go' - i.e. if/when you eventually bump into

a
> problem where you need to be able to do bash scripting. There's the
> 'Unix romantic' movement that still thinks shell scripts are a good
> idea, but this is my .02EUR to point out that not everyone agrees

with
> them.


The simplest script is just a set of commands one could run from the
command line. One step above is learning how to pass arguments (for
cmd.exe in Windows, they are just %1, %2, etc.) and set variables. I
think every computer user, not just system administrators, show know
this much about the shell language of his OS, regardless of whether
it's Windows, Unix, or something else. On Windows I often see people
"mousing around" instead of getting things done faster from the command
line.

I actually like the Windows cmd language (it's an acquired taste), but
I have read it is going away in Windows Longhorn (WH). That's an
argument for writing more complicated scripts in Python. WH is supposed
to get a much better shell, called Monad, inspired by the philosophy of
Gottfried Wilhelm Leibniz .

Between a low-level shell scripting language and a higher-level
language like Python, and intermediate level language such as Rexx
could be considered. Many IBM people swear by it.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
2473-1 Systems Administrator - IBM RequisitePro Administrator,Chicago,Illinois.- Isaac Java 0 10-20-2010 07:44 PM
Voip PBX,Private Phone Systems,PBX Telephone Systems, Business Phone Systems broadbandera@gmail.com UK VOIP 9 07-24-2006 03:44 PM
Programming Language for Systems Administrator Kanthi Kiran Narisetti C++ 1 04-11-2005 11:31 PM
Programming Language for Systems Administrator Kanthi Kiran Narisetti C++ 0 04-11-2005 09:10 PM
java as a systems administration/systems programming language? Mike Java 2 06-17-2004 03:33 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57