| I have been trying to figure out how to create an IIS Virtual | Directory through Python but can't find anything that works. | I have done it in the past with Perl with the script below | but can't seem to figure out how to do it in Python. I was | wondering if someone could point me in the right direction. | | Thank you, | -Todd | | P.S."Hope everyone who reads this has a nice Thanksgiving!"
Caveat: I don't run IIS myself, so I'm working on paper here. Couple of starting points. Basically everything you're doing there looks like it could be handled by the win32com.client module of the pywin32 extensions. (Looks like an almost literal translation). Vague code example: <code> from win32com.client import GetObject virtual_dir = GetObject ("IIS://blah/blah") virtual_dir.DoStuff ("param1", "param2") </code> As an alternative, you might be able to use WMI (altho' I'm not sure why you'd want to if you could use the technique above). Still, for completeness, here's a reference. http://tgolden.sc.sabren.com/python/wmi_cookbook.html#create_iis_site TJG ________________________________________________________________________ This e-mail has been scanned for all viruses by Star. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________ _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor