• R/O
  • SSH

execsql: Commit

Default repository for execsql.py


Commit MetaInfo

Révision292cc1b414a5597e01c77e87bfb2f2d3f482ef99 (tree)
l'heure2021-10-19 21:12:30
Auteurrdnielsen
Commiterrdnielsen

Message de Log

Modified IMPORT to recognize a leading tilde, and added the system variable.

Change Summary

Modification

diff -r 6255ed044873 -r 292cc1b414a5 CHANGELOG.rst
--- a/CHANGELOG.rst Mon Oct 18 19:28:25 2021 -0700
+++ b/CHANGELOG.rst Tue Oct 19 05:12:30 2021 -0700
@@ -1,7 +1,7 @@
11 ========== ========== =================================================================================
22 Version Date Features
33 ========== ========== =================================================================================
4-1.94.0 2021-10-18 Modified the INCLUDE metacommand to recognize leading tildes on the filename.
4+1.94.0 2021-10-19 Modified the INCLUDE and IMPORT metacommands to recognize leading tildes on the filename, and added the $PATHSEP system variable.
55 1.93.0 2021-10-02 Added the USER variant of the CONNECT metacommand.
66 1.92.0 2021-09-19 Added the TRIM_STRINGS and REPLACE_NEWLINES settings.
77 1.91.0 2021-09-16 Added the DIALOG_CANCELED() conditional.
diff -r 6255ed044873 -r 292cc1b414a5 doc/source/conf.py
--- a/doc/source/conf.py Mon Oct 18 19:28:25 2021 -0700
+++ b/doc/source/conf.py Tue Oct 19 05:12:30 2021 -0700
@@ -58,9 +58,9 @@
5858 # built documents.
5959 #
6060 # The short X.Y version.
61-version = u'1.89'
61+version = u'1.94'
6262 # The full version, including alpha/beta/rc tags.
63-release = u'1.89'
63+release = u'1.94'
6464
6565 # A string of reStructuredText that will be included at the beginning of
6666 # every source file that is read.
diff -r 6255ed044873 -r 292cc1b414a5 doc/source/substitution_vars.rst
--- a/doc/source/substitution_vars.rst Mon Oct 18 19:28:25 2021 -0700
+++ b/doc/source/substitution_vars.rst Tue Oct 19 05:12:30 2021 -0700
@@ -412,6 +412,12 @@
412412 The name of the operating system. This will be "linux", "windows",
413413 "cygwin", "darwin", "os2", "os2emx", "riscos", or "atheos".
414414
415+.. index:: ! PATHSEP system variable
416+
417+$PATHSEP
418+ The path separator used by the operating system. This is "/"
419+ on Linux and "\\" on Windows.
420+
415421 .. index:: ! PYTHON_EXECUTABLE system variable
416422
417423 $PYTHON_EXECUTABLE
diff -r 6255ed044873 -r 292cc1b414a5 execsql/execsql.py
--- a/execsql/execsql.py Mon Oct 18 19:28:25 2021 -0700
+++ b/execsql/execsql.py Tue Oct 19 05:12:30 2021 -0700
@@ -28,7 +28,7 @@
2828 # ===============================================================================
2929
3030 __version__ = "1.94.0"
31-__vdate = "2021-10-18"
31+__vdate = "2021-10-19"
3232
3333 primary_vno = 1
3434 secondary_vno = 94
@@ -11295,6 +11295,8 @@
1129511295 schemaname = kwargs['schema']
1129611296 tablename = kwargs['table']
1129711297 filename = kwargs['filename']
11298+ if len(filename) > 1 and filename[0] == "~" and filename[1] == os.sep:
11299+ filename = os.path.join(os.path.expanduser(r'~'), filename[2:])
1129811300 if not os.path.exists(filename):
1129911301 raise ErrInfo(type="cmd", command_text=kwargs['metacommandline'], other_msg='Input file %s does not exist' % filename)
1130011302 quotechar = kwargs['quotechar']
@@ -13930,6 +13932,7 @@
1393013932 subvars.add_substitution("$ERROR_MESSAGE", "")
1393113933 subvars.add_substitution("$USER", getpass.getuser())
1393213934 subvars.add_substitution("$STARTING_PATH", os.getcwd() + os.sep)
13935+ subvars.add_substitution("$PATHSEP", os.sep)
1393313936 osys = sys.platform
1393413937 if osys.startswith('linux'):
1393513938 osys = 'linux'
Afficher sur ancien navigateur de dépôt.