Open mediter opened 6 years ago
just realised I am using iTerm, it have switched the default shell script to zsh instead of bash
after adding the two Python executable paths to .zshrc, using timed would show the following error:
error: [Errno 2] No such file or directory: '~/.timed'
only after using touch .timed
to create an empty file, timed command would work as expected
Strange, that issue should have been fixed with https://github.com/adeel/timed/commit/de86965c5854142198f96b316aeae16dac08ed66.
in the official documentation for built-in function open():
Open file and return a corresponding file object. If the file cannot be opened, an OSError is raised.
'a' for appending (which on some Unix systems, means that all writes append to the end of the file regardless of the current seek position)
'+' open a disk file for updating (reading and writing)
it doesn't seem to offer the capability we need here, which is to create a file if none exists before.
The official documentation seems to be poor in this case, but "a+" does indeed create the file if it doesn't exist. See also this MO question.
I followed the instructions to install timed:
the installation show no error. then I tried to use it, but the following error shows up:
using
pip show timed
shows the following result:after verifying both paths of executables for Python 2.7 and Python 3.6 are in .bash_profile
And using the following two commands to confirm the executable for "timed" is indeed installed in both locations:
What am I doing wrong? Do I have to log-out & log-in or restart the computer after the installation?
Mac OS X 10.13.1 (17B1003)