Popular recipes tagged "meta:requires=win32com"http://code.activestate.com/recipes/tags/meta:requires=win32com/2014-03-31T18:39:16-07:00ActiveState Code RecipesConvert doc and docx files to pdf (Python) 2014-03-31T18:39:16-07:00Fabian Mayerhttp://code.activestate.com/recipes/users/4189629/http://code.activestate.com/recipes/578858-convert-doc-and-docx-files-to-pdf/ <p style="color: grey"> Python recipe 578858 by <a href="/recipes/users/4189629/">Fabian Mayer</a> (<a href="/recipes/tags/doc/">doc</a>, <a href="/recipes/tags/pdf/">pdf</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/win32com/">win32com</a>). Revision 2. </p> <p>The Script converts all doc and docx files in a specified folder to pdf files. It checks whether the provided absolute path does actually exist and whether the specified folder contains any doc and docx files. It does not travers the directory recursively. The script is not portable and runs only a Windows machine. Based on the experience I made, I recommend closing MS Word before running the script.</p> Convert Audio CD track in iTunes with Python (Python) 2011-10-12T05:29:30-07:00Kai Xiahttp://code.activestate.com/recipes/users/4168327/http://code.activestate.com/recipes/577904-convert-audio-cd-track-in-itunes-with-python/ <p style="color: grey"> Python recipe 577904 by <a href="/recipes/users/4168327/">Kai Xia</a> (<a href="/recipes/tags/itunes/">itunes</a>, <a href="/recipes/tags/win32com/">win32com</a>). </p> <p>This script would do convert tracks from an audio cd into Apple lossless music using iTunes.</p> <p>When we have a bad cd rom or a bad disk, conversion would usually fail and iTunes would not complain about it. I usually have to check every converted track manually. This script would save the pain: it would check every converted track, if the duration of the converted track is less than the original track, the script would retry the conversion.</p> <p>This script is inspired by <a href="http://code.activestate.com/recipes/users/4010550/">Fabien C.</a> 's <a href="http://code.activestate.com/recipes/498241/">Recipe 498241</a>.</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> Recreate MS Access table in SQLite (Python) 2008-07-01T16:22:39-07:00K. Killebrewhttp://code.activestate.com/recipes/users/4144739/http://code.activestate.com/recipes/572165-recreate-ms-access-table-in-sqlite/ <p style="color: grey"> Python recipe 572165 by <a href="/recipes/users/4144739/">K. Killebrew</a> (<a href="/recipes/tags/database/">database</a>). Revision 9. </p> <p>A function to create and load a table in SQLite from a Microsoft Jet table, using DAO. Also recreates indexes. Fetches and loads records in blocks with a default size of 1000 rows.</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> create an account in MS active directory (Python) 2004-09-03T13:58:34-07:00John Nielsenhttp://code.activestate.com/recipes/users/135654/http://code.activestate.com/recipes/303345-create-an-account-in-ms-active-directory/ <p style="color: grey"> Python recipe 303345 by <a href="/recipes/users/135654/">John Nielsen</a> (<a href="/recipes/tags/sysadmin/">sysadmin</a>). </p> <p>This is the basic code to create an account in active directory that shows how to do things like set your own exension attributes, force a reset of the password when the user logs in, and set the home directory. It makes used of python's excellent COM support in win32com.</p> Get attributes of an object in MS Active Directory (Python) 2004-09-03T14:41:32-07:00John Nielsenhttp://code.activestate.com/recipes/users/135654/http://code.activestate.com/recipes/303348-get-attributes-of-an-object-in-ms-active-directory/ <p style="color: grey"> Python recipe 303348 by <a href="/recipes/users/135654/">John Nielsen</a> (<a href="/recipes/tags/sysadmin/">sysadmin</a>). </p> <p>Sometimes it is useful to know what attributes are available to you for an object in active directory. You cannot ask the object directly for that, instead you need to use the schema of the object. All of this is done with python's COM support using win32com. By default only attributes that have values are returned.</p> accessing MS exchange with webdav part 1 (Python) 2004-08-05T10:51:30-07:00John Nielsenhttp://code.activestate.com/recipes/users/135654/http://code.activestate.com/recipes/298338-accessing-ms-exchange-with-webdav-part-1/ <p style="color: grey"> Python recipe 298338 by <a href="/recipes/users/135654/">John Nielsen</a> (<a href="/recipes/tags/sysadmin/">sysadmin</a>). Revision 3. </p> <p>If you want to talk to a MS exchange server, webdav offers a convenient way to do so. The code below shows the very basics for searching, deleting, and creating.</p> getting properties of an object in webdav/exchange part 2 (Python) 2004-08-05T12:45:06-07:00John Nielsenhttp://code.activestate.com/recipes/users/135654/http://code.activestate.com/recipes/298342-getting-properties-of-an-object-in-webdavexchange-/ <p style="color: grey"> Python recipe 298342 by <a href="/recipes/users/135654/">John Nielsen</a> (<a href="/recipes/tags/sysadmin/">sysadmin</a>). </p> <p>Webdav is useful to get information on something in exchange. Often you need to know what you can ask for. Here is a simple recipe to get a list of the attributes available for a specific item.</p>