1. Trevor Caira
  2. timebook
  3. Issues
Issue #10 resolved

`t shell` does not work on paths with spaces

Steven Kryskalla
created an issue

When running t shell on Windows I got this error:

{{{ c:\code\timebook>t shell

c:\code\timebook>SQL error: near "and": syntax error }}}

Because the default path to the sqlite db is: {{{ C:\Documents and Settings\username.config\timebook\sheets.db }}}

The string isn't quoted so sqlite3 sees everything after "C:\Documents" as separate arguments ('and' happens to trigger the "SQL error: near "and": syntax error" message).

Attached is a patch to fix it, but even after you fix it os.execvp behaves oddly on Windows:

{{{ c:\code\timebook>t shell

c:\code\timebook>SQLite version 3.5.3 Enter ".help" for instructions sqlite> .help '.help' is not recognized as an internal or external command, operable program or batch file. }}}

Maybe instead of running sqlite3 it would be useful to have t shell run a Python interpreter with all timebook code / model / configs already loaded for you, kinda like what e.g. Werkzeug's manage.py shell command does:


Comments (1)

  1. Log in to comment