Popular recipes tagged "meta:requires=win32com.client"http://code.activestate.com/recipes/tags/meta:requires=win32com.client/2012-10-09T07:00:55-07:00ActiveState Code RecipesRead tabular data from Excel spreadsheets the fast and easy way (Python) 2012-10-09T07:00:55-07:00wei.Liuhttp://code.activestate.com/recipes/users/4183853/http://code.activestate.com/recipes/578283-read-tabular-data-from-excel-spreadsheets-the-fast/ <p style="color: grey"> Python recipe 578283 by <a href="/recipes/users/4183853/">wei.Liu</a> (<a href="/recipes/tags/database/">database</a>). </p> <p>Sometimes you get an Excel spreadsheet (say, from the marketing departement) and you want to read tabular data from it (i.e. a line with column headers and lines of data). There are many ways to do this (including ODBC + mxODBC), but the easiest way I've found is this one : provide a file name and a sheet name, and read the data !</p> working with GroupWise (Python) 2010-09-28T15:11:15-07:00Shamil Bikineyevhttp://code.activestate.com/recipes/users/4173185/http://code.activestate.com/recipes/577410-working-with-groupwise/ <p style="color: grey"> Python recipe 577410 by <a href="/recipes/users/4173185/">Shamil Bikineyev</a> . </p> <p>some utilities for working with <a href="http://developer.novell.com/wiki/index.php/GroupWise_Object_API">GroupWise</a> through COM-interface</p> Win Shortcuts wrapper. (Python) 2010-07-23T08:10:44-07:00Louis RIVIEREhttp://code.activestate.com/recipes/users/4035877/http://code.activestate.com/recipes/577321-win-shortcuts-wrapper/ <p style="color: grey"> Python recipe 577321 by <a href="/recipes/users/4035877/">Louis RIVIERE</a> (<a href="/recipes/tags/shortcuts/">shortcuts</a>, <a href="/recipes/tags/windows/">windows</a>, <a href="/recipes/tags/wrapper/">wrapper</a>). Revision 3. </p> <p>Reads or Creates Windows shortcuts (links).</p> Retrieve Dell Warranty Information for all machines in AD Domain (Python) 2010-02-18T15:51:28-08:00Kenneth Keiterhttp://code.activestate.com/recipes/users/4173089/http://code.activestate.com/recipes/577056-retrieve-dell-warranty-information-for-all-machine/ <p style="color: grey"> Python recipe 577056 by <a href="/recipes/users/4173089/">Kenneth Keiter</a> (<a href="/recipes/tags/active_directory_scripts/">active_directory_scripts</a>, <a href="/recipes/tags/ad/">ad</a>, <a href="/recipes/tags/dell/">dell</a>, <a href="/recipes/tags/domain/">domain</a>, <a href="/recipes/tags/network/">network</a>, <a href="/recipes/tags/warranty/">warranty</a>, <a href="/recipes/tags/windows/">windows</a>). </p> <p>This snippet retrieves warranty information for all Dell machines in a domain and outputs a CSV of the results. </p> <p>Should be run on a machine joined to an active directory or NT4 domain. May need to be updated to parse Dell's website if they update it (since they have no service tag API).</p> Run screensaver from Python (Python) 2009-07-03T10:30:58-07:00Jordan Thorntonhttp://code.activestate.com/recipes/users/4170973/http://code.activestate.com/recipes/576828-run-screensaver-from-python/ <p style="color: grey"> Python recipe 576828 by <a href="/recipes/users/4170973/">Jordan Thornton</a> (<a href="/recipes/tags/run/">run</a>, <a href="/recipes/tags/saver/">saver</a>, <a href="/recipes/tags/screen/">screen</a>, <a href="/recipes/tags/screensaver/">screensaver</a>, <a href="/recipes/tags/win32/">win32</a>, <a href="/recipes/tags/win32com/">win32com</a>, <a href="/recipes/tags/win32com_client/">win32com_client</a>, <a href="/recipes/tags/windows/">windows</a>). </p> <p>Simple script that will allow you to locate and run the set screensaver from python, if available.</p> Super Shorcuts for Windows (Python) 2009-04-26T11:09:39-07:00Akira Forahttp://code.activestate.com/recipes/users/4114779/http://code.activestate.com/recipes/576730-super-shorcuts-for-windows/ <p style="color: grey"> Python recipe 576730 by <a href="/recipes/users/4114779/">Akira Fora</a> (<a href="/recipes/tags/process/">process</a>, <a href="/recipes/tags/windows/">windows</a>, <a href="/recipes/tags/wmi/">wmi</a>). </p> <p>This script allows one to launch or kill several applications at once. It works on MS Windows.</p> Changing shortcut on a usb key V2 (Python) 2008-08-22T13:34:57-07:00bussiere bussierehttp://code.activestate.com/recipes/users/4050557/http://code.activestate.com/recipes/576437-changing-shortcut-on-a-usb-key-v2/ <p style="color: grey"> Python recipe 576437 by <a href="/recipes/users/4050557/">bussiere bussiere</a> (<a href="/recipes/tags/key/">key</a>, <a href="/recipes/tags/raccourcis/">raccourcis</a>, <a href="/recipes/tags/shortcut/">shortcut</a>, <a href="/recipes/tags/usb/">usb</a>, <a href="/recipes/tags/windows/">windows</a>). Revision 2. </p> <p>i've made some shortcut on my usb key for launchy and i had always to change them if on one pc the usb drive was i: on an other it was k: it was such a pain each time. Now it change all the shortcut automatically.</p> simple ado example (Python) 2008-08-26T01:47:34-07:00alexander bakerhttp://code.activestate.com/recipes/users/4166679/http://code.activestate.com/recipes/576455-simple-ado-example/ <p style="color: grey"> Python recipe 576455 by <a href="/recipes/users/4166679/">alexander baker</a> . </p> <p>simple example of how to use ado from windows with python</p> Update stock quote using Yahoo! Finance web services (Python) 2008-06-22T18:33:50-07:00Wai Yip Tunghttp://code.activestate.com/recipes/users/2382677/http://code.activestate.com/recipes/573471-update-stock-quote-using-yahoo-finance-web-service/ <p style="color: grey"> Python recipe 573471 by <a href="/recipes/users/2382677/">Wai Yip Tung</a> (<a href="/recipes/tags/excel/">excel</a>, <a href="/recipes/tags/math/">math</a>). Revision 2. </p> <p>This script update the stock quote on your spreadsheet by fetching the latest quote from Yahoo!Finance web services. It uses the pywin32 library to update the cells on an Excel spreadsheet.</p> Extraction and manipulation class for Microsoft Access (Python) 2008-03-01T07:15:52-08:00Grant Paton-Simpsonhttp://code.activestate.com/recipes/users/4074475/http://code.activestate.com/recipes/528868-extraction-and-manipulation-class-for-microsoft-ac/ <p style="color: grey"> Python recipe 528868 by <a href="/recipes/users/4074475/">Grant Paton-Simpson</a> (<a href="/recipes/tags/database/">database</a>). Revision 2. </p> <p>Class for extracting and manipulating data from Microsoft Access - identifying tables, getting recordsets, iterating through the results, counting rows, getting field names, getting index information, deleting indexes, and adding and deleting relationships.</p> Data Processing Shell (Python) 2008-01-24T16:26:43-08:00Brian Davishttp://code.activestate.com/recipes/users/4119187/http://code.activestate.com/recipes/543265-data-processing-shell/ <p style="color: grey"> Python recipe 543265 by <a href="/recipes/users/4119187/">Brian Davis</a> . </p> <p>I've found that I frequently need to open a file, do some processing on it and then load it into excel. This script provides a nice interface for opening the file using a wxPython dialog box, some code to load the result .csv file into excel using win32com and a function to contain the processing code. I should probably turn this into a module sometime...</p> Class for writing content to Excel and formatting it (Python) 2007-09-07T03:08:02-07:00Grant Paton-Simpsonhttp://code.activestate.com/recipes/users/4074475/http://code.activestate.com/recipes/528870-class-for-writing-content-to-excel-and-formatting-/ <p style="color: grey"> Python recipe 528870 by <a href="/recipes/users/4074475/">Grant Paton-Simpson</a> (<a href="/recipes/tags/database/">database</a>). Revision 4. </p> <p>Class for creating Excel spreadsheets - esp writing data and formatting them. NB OpenOffice Calc will be easily able to open the outputs too.</p> Dump all Active Directory Information using LDAP scripting (Python) 2007-04-04T17:07:38-07:00Manuel Garciahttp://code.activestate.com/recipes/users/2827266/http://code.activestate.com/recipes/511451-dump-all-active-directory-information-using-ldap-s/ <p style="color: grey"> Python recipe 511451 by <a href="/recipes/users/2827266/">Manuel Garcia</a> (<a href="/recipes/tags/network/">network</a>). </p> <p>From Active Directory (or any other LDAP server) dump ALL information about computers, users, and groups, in a nicely formatted report.</p> Add account to group in Active Directory (Python) 2007-04-03T22:13:42-07:00Thomas Dimsonhttp://code.activestate.com/recipes/users/4046694/http://code.activestate.com/recipes/511447-add-account-to-group-in-active-directory/ <p style="color: grey"> Python recipe 511447 by <a href="/recipes/users/4046694/">Thomas Dimson</a> (<a href="/recipes/tags/sysadmin/">sysadmin</a>). Revision 2. </p> <p>This code will add a previously created user to a previously created group in Active Directory.</p> Scripting iTunes (for Windows) with Python (Python) 2006-11-03T01:23:57-08:00Fabien C.http://code.activestate.com/recipes/users/4010550/http://code.activestate.com/recipes/498241-scripting-itunes-for-windows-with-python/ <p style="color: grey"> Python recipe 498241 by <a href="/recipes/users/4010550/">Fabien C.</a> . </p> <p>Here are two examples showing how to script iTunes for Windows with Python. See below under "Discussion" for additional comments and explainations.</p> Recursively look up groups in Active Directory (Python) 2006-09-14T06:49:46-07:00Devin Leunghttp://code.activestate.com/recipes/users/111400/http://code.activestate.com/recipes/498096-recursively-look-up-groups-in-active-directory/ <p style="color: grey"> Python recipe 498096 by <a href="/recipes/users/111400/">Devin Leung</a> (<a href="/recipes/tags/sysadmin/">sysadmin</a>). </p> <p>Script to enumerate the members of groups in the domain.</p> Is scraping easiest with Internet Explorer on Windows? (Python) 2006-06-10T15:32:40-07:00Bill Bellhttp://code.activestate.com/recipes/users/98151/http://code.activestate.com/recipes/496789-is-scraping-easiest-with-internet-explorer-on-wind/ <p style="color: grey"> Python recipe 496789 by <a href="/recipes/users/98151/">Bill Bell</a> (<a href="/recipes/tags/web/">web</a>). </p> <p>Used in conjunction with Mozilla's "DOM Inspector" and Mozilla's "View | Page Source" and (say) PythonWin, the parser component of IE can make scraping fairly easy in large part because the parse tree that it produces is rigorously self-similar from root to leaf. Here's an example that parallels the one offered for ScrapeNFeed.</p> Read tabular data from Excel spreadsheets the fast and easy way (Python) 2005-12-14T20:36:30-08:00Nicolas Lehuenhttp://code.activestate.com/recipes/users/1599156/http://code.activestate.com/recipes/440661-read-tabular-data-from-excel-spreadsheets-the-fast/ <p style="color: grey"> Python recipe 440661 by <a href="/recipes/users/1599156/">Nicolas Lehuen</a> (<a href="/recipes/tags/database/">database</a>). Revision 3. </p> <p>Sometimes you get an Excel spreadsheet (say, from the marketing departement) and you want to read tabular data from it (i.e. a line with column headers and lines of data). There are many ways to do this (including ODBC + mxODBC), but the easiest way I've found is this one : provide a file name and a sheet name, and read the data !</p> Get all active email addresses from Windows Exchange Server (Python) 2006-03-24T19:04:23-08:00Manuel Garciahttp://code.activestate.com/recipes/users/2827266/http://code.activestate.com/recipes/475179-get-all-active-email-addresses-from-windows-exchan/ <p style="color: grey"> Python recipe 475179 by <a href="/recipes/users/2827266/">Manuel Garcia</a> (<a href="/recipes/tags/sysadmin/">sysadmin</a>). </p> <p>For Windows Exchange Server running on Windows Server 2000/2003, from Exchange and Active Directory, get all email addresses (and aliases) from all active users. Uses ASDI scripting, LDAP paths to get user info from Active Directory. Uses Pythonwin</p> VSS Integration Module (Python) 2006-02-13T07:14:10-08:00Tim Watsonhttp://code.activestate.com/recipes/users/2565684/http://code.activestate.com/recipes/473884-vss-integration-module/ <p style="color: grey"> Python recipe 473884 by <a href="/recipes/users/2565684/">Tim Watson</a> . </p> <p>This class automates connection to Microsoft's delightful* Visual Source Safe source control system. * -> :D</p>