summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven-Hendrik Haase <sh@lutzhaase.com>2015-01-06 20:49:29 +0100
committerSven-Hendrik Haase <sh@lutzhaase.com>2015-01-06 20:49:29 +0100
commit996c29277e6b16fb71ef0195b3b213e6133435c7 (patch)
tree4e68f148171f493ce33ddf11eb6b0339478dcaae
parent04b656bad6834809db1d8c3a9cace25a040a9519 (diff)
Add entry point
I'm a distro packager and the generated /usr/bin/pgcli doesn't work for me and I need more control. I need my own entry point so I can execute the module using python -m pgcli.main.
-rwxr-xr-xpgcli/main.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/pgcli/main.py b/pgcli/main.py
index 7e6a5d36..59be3ad0 100755
--- a/pgcli/main.py
+++ b/pgcli/main.py
@@ -178,3 +178,6 @@ def refresh_completions(pgexecute, completer):
for table in tables:
completer.extend_column_names(table, pgexecute.columns(table))
completer.extend_database_names(pgexecute.databases())
+
+if __name__ == "__main__":
+ cli()