DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
Creating A Share On Windows
Copied from John Nielson's <a href=http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/303341>recipe</a>.
import win32net
import win32netcon
shinfo={}
shinfo['netname']='python test'
shinfo['type']=win32netcon.STYPE_DISKTREE
shinfo['remark']='data files'
shinfo['permissions']=0
shinfo['max_uses']=-1
shinfo['current_uses']=0
shinfo['path']='c:\\my_data'
shinfo['passwd']=''
server='servername'
win32net.NetShareAdd(server,2,shinfo)





