I tried to use the package called "titlecase" (https://pypi.python.org/pypi/titlecase) My code works on jupyter notebook but it does not work when I tried to run it in cmd.
Here is my code:
from __future__ import print_function
import datetime
now = datetime.datetime.now()
from titlecase import titlecase
f=open(r'C:\Users\GX\everyFirstLetterCapitalized.txt')
f.seek(0)
message = f.read()
outPut=titlecase(message)
f=open(r'C:\Users\GX\everyFirstLetterCapitalizedOutput.txt', 'w')
f.write("new output:-- {a}\n".format(a=now)+outPut)
f.close()
But, I always got the result: ImportError: No module named titlecase
I tried to use the following code to find the package, it does exist:
import imp
imp.find_module('titlecase')