I'm currently working on a strategy for managing multiple Windows Server 2003 to 2008 running SQL Server 2000 - 2008 and I want/need a unified scripting platform for automating tasks. I'm becoming a big fan of Python and as such I'd like to know if Python has been used effectively as a scripting language for administering a various set of Windows Server installations with various SQL Server installations running various jobs. I'm familiar with IronPython which executes against the .Net framework but I'm unsure what syntax version of Python IronPython uses.
我目前正在研究一种管理多个Windows Server 2003到2008运行SQL Server 2000 - 2008的策略,我需要一个用于自动化任务的统一脚本平台。我越来越喜欢Python,因此我想知道Python是否已经被有效地用作一种脚本语言,用于管理一组不同的Windows服务器安装,以及运行不同作业的各种SQL服务器安装。我熟悉针对。net框架执行的IronPython,但我不确定Python IronPython使用的语法版本是什么。
EDIT: FYI: I am familiar with Powershell but the more I know about it and it's syntax the more I don't like it.
编辑:我对Powershell很熟悉,但是我对它的语法了解得越多,我就越不喜欢它。
EDIT: Please, if you can, I'd like to know of your success story of implementing Python as a script solution on Windows.
编辑:如果可以的话,我想知道您在Windows上实现Python作为脚本解决方案的成功故事。
5 个解决方案
#1
9
Notwithstanding my love of Python
, I think PowerShell
fits more.
尽管我喜欢Python,但我认为PowerShell更适合。
From Wikipedia:
从*:
Windows PowerShell is Microsoft's task automation framework, consisting of a command-line shell and associated scripting language built on top of, and integrated with the .NET Framework. PowerShell provides full access to COM and WMI, enabling administrators to perform administrative tasks on both local and remote Windows systems.
Windows PowerShell是微软的任务自动化框架,它由一个命令行shell和与之相关的脚本语言组成,并与。net框架集成在一起。PowerShell提供对COM和WMI的完全访问,使管理员能够在本地和远程Windows系统上执行管理任务。
#2
3
2 essentials for working on Windows with Python are:
使用Python处理Windows的两个要点是:
Tim Golden's WMI module:
* http://timgolden.me.uk/python/wmi/cookbook.html
Tim Golden的WMI模块:* http://timgolden.uk/python/wmi/cookbook.html。
Mark Hammond's PyWin32 package:
* http://docs.activestate.com/activepython/2.4/pywin32/PyWin32.HTML
Mark Hammond的PyWin32包:* http://docs.activestate.com/activepython/2.4/pywin32/PyWin32.HTML
#3
1
I'm not sure about Windows, but Python is used a lot in Linux for administrative scripts and it is way better that a native Windows shell. And I think that Python is quite good for your tasks.
我对Windows不太确定,但是在Linux中,Python在管理脚本中被大量使用,而且它比本地Windows shell要好得多。我认为Python非常适合您的任务。
As another option you can take a look at cygwin and bash.
作为另一个选项,您可以查看cygwin和bash。
#4
1
I'm unsure what syntax version of Python IronPython uses.
我不确定Python IronPython的语法版本使用什么。
IronPython's syntax is currently at the same level as Python 2.6.
IronPython的语法目前与Python 2.6处于同一级别。
IronPython integrates very well with .NET and COM and IMO, fits the programmer mindset better than Powershell (I'm not really a fan of the Powershell syntax). However, Powershell is certainly the safer option because it's actively supported by Microsoft.
IronPython与。net、COM和IMO很好地集成在一起,比Powershell更适合程序员的思维模式(我并不是Powershell语法的爱好者)。然而,Powershell肯定是更安全的选择,因为它得到了微软的积极支持。
#5
0
I've never done complex Windows system administration in Python myself (not involving SQL server anyway), but i think you could take a look at the winsys project.
我自己从来没有在Python中做过复杂的Windows系统管理(也不涉及SQL server),但是我认为您可以看看winsys项目。
#1
9
Notwithstanding my love of Python
, I think PowerShell
fits more.
尽管我喜欢Python,但我认为PowerShell更适合。
From Wikipedia:
从*:
Windows PowerShell is Microsoft's task automation framework, consisting of a command-line shell and associated scripting language built on top of, and integrated with the .NET Framework. PowerShell provides full access to COM and WMI, enabling administrators to perform administrative tasks on both local and remote Windows systems.
Windows PowerShell是微软的任务自动化框架,它由一个命令行shell和与之相关的脚本语言组成,并与。net框架集成在一起。PowerShell提供对COM和WMI的完全访问,使管理员能够在本地和远程Windows系统上执行管理任务。
#2
3
2 essentials for working on Windows with Python are:
使用Python处理Windows的两个要点是:
Tim Golden's WMI module:
* http://timgolden.me.uk/python/wmi/cookbook.html
Tim Golden的WMI模块:* http://timgolden.uk/python/wmi/cookbook.html。
Mark Hammond's PyWin32 package:
* http://docs.activestate.com/activepython/2.4/pywin32/PyWin32.HTML
Mark Hammond的PyWin32包:* http://docs.activestate.com/activepython/2.4/pywin32/PyWin32.HTML
#3
1
I'm not sure about Windows, but Python is used a lot in Linux for administrative scripts and it is way better that a native Windows shell. And I think that Python is quite good for your tasks.
我对Windows不太确定,但是在Linux中,Python在管理脚本中被大量使用,而且它比本地Windows shell要好得多。我认为Python非常适合您的任务。
As another option you can take a look at cygwin and bash.
作为另一个选项,您可以查看cygwin和bash。
#4
1
I'm unsure what syntax version of Python IronPython uses.
我不确定Python IronPython的语法版本使用什么。
IronPython's syntax is currently at the same level as Python 2.6.
IronPython的语法目前与Python 2.6处于同一级别。
IronPython integrates very well with .NET and COM and IMO, fits the programmer mindset better than Powershell (I'm not really a fan of the Powershell syntax). However, Powershell is certainly the safer option because it's actively supported by Microsoft.
IronPython与。net、COM和IMO很好地集成在一起,比Powershell更适合程序员的思维模式(我并不是Powershell语法的爱好者)。然而,Powershell肯定是更安全的选择,因为它得到了微软的积极支持。
#5
0
I've never done complex Windows system administration in Python myself (not involving SQL server anyway), but i think you could take a look at the winsys project.
我自己从来没有在Python中做过复杂的Windows系统管理(也不涉及SQL server),但是我认为您可以看看winsys项目。