Skip to content

Instantly share code, notes, and snippets.

View DennisOng's full-sized avatar

Dennis Ong DennisOng

View GitHub Profile
@DennisOng
DennisOng / sqlparse_delimiters.py
Created April 18, 2024 08:04 — forked from srittau/sqlparse_delimiters.py
sqlparse with delimiter support
# Split SQL file using sqlparse with delimiter handling.
#
# The SQL string is pre-processed before handing it off to sqlparse.split:
# DELIMITER statements are removed, semicolons within non-standard
# delimiter blocks are replaced by the Unicode Object Replacement
# Character, and custom delimiters replaced with semicolons. After
# processing the string with sqlparse.split, the Object Replacement Characters
# are replaced with semicolons again.
import re
#!/usr/bin/python
"""
Example to create a Mininet topology and connect it to the internet via NAT
through eth0 on the host.
Glen Gibb, February 2011
(slight modifications by BL, 5/13)
"""