Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pyodbc
- #### --->>>Connection to SQL Server
- conn = pyodbc.connect('Driver={SQL Server};'
- 'Server=****Mi servidor****;'
- 'UID=***Usuario****;'
- 'PWD=***password***;'
- 'database=voiceData;'
- 'Trusted_Connection=yes;'
- )
- cursor = conn.cursor()
- cursor.execute('EXECUTE dbo.GET_localOfficeAvayaFilePaths')
- #### --->>>Changes on the 46xxsettings.txt file
- for row in cursor:
- print('', row[3])
- string_map = {'## SET SLMSRVR': 'SET SLMSRVR 192.168.1.1', '## SET SLMSTAT
- 1': 'SET SLMSTAT 1',
- '## SET SLMPERF 1': 'SET SLMPERF 1',
- '## SET SLMCAP 1': 'SET SLMCAP 2', 'SET SLMCTRL 1': 'SET SLMCTRL 1'}
- for line in cursor.readlines():
- if line.startswith('## SET'):
- for original, new in string_map.items():
- if original in line:
- line = new
- break
- print(line.strip())
- cursor.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement