def ServerEnum():
 resume = 0
 while 1:
  (data, total, resume) = win32net.NetServerEnum(server, 100, win32netcon.SV_TYPE_ALL, None, resume)
  for s in data:
   verbose(('Found server %s' % s['name']))
   shareresume = 0
   while 1:
    (sharedata, total, shareresume) = win32net.NetShareEnum(server, 2, shareresume)
    for share in sharedata:
     verbose((' %(netname)s (%(path)s):%(remark)s - in use by %(current_uses)d users' % share))
    if (not shareresume):
     break
  if (not resume):
   break
 print 'Enumerated all the servers on the network'

def ServerEnum ( ) : resume = 0 while 1 : ( data , total , resume ) = win32net . NetServerEnum ( server , 100 , win32netcon . SV_TYPE_ALL , None , resume ) for s in data : verbose ( ( 'Found server %s' % s [ 'name' ] ) ) shareresume = 0 while 1 : ( sharedata , total , shareresume ) = win32net . NetShareEnum ( server , 2 , shareresume ) for share in sharedata : verbose ( ( ' %(netname)s (%(path)s):%(remark)s - in use by %(current_uses)d users' % share ) ) if ( not shareresume ) : break if ( not resume ) : break print 'Enumerated all the servers on the network'
enumerates all servers on the network .