Created
May 19, 2025 09:41
-
-
Save ThomasG77/af8be0815f3cb3a6676169571dd84de2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
plugin_file_to_patch = iface.userProfileManager().userProfile().folder() + '/python/plugins/' + 'cadastre' + '/dialogs/search_dialog.py' | |
# Read in the file | |
with open(plugin_file_to_patch, 'r') as file: | |
filedata = file.read() | |
# Replace the target string | |
filedata = filedata.replace("['ogc_fid', 'tex', 'idu', 'geo_section', 'geom', 'comptecommunal', 'geo_parcelle']", "['ogc_fid', 'tex', 'idu', 'geo_section', 'geom', 'geo_parcelle']") | |
# Write the file out again | |
with open(plugin_file_to_patch, 'w') as file: | |
file.write(filedata) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment