On Friday, March 18, 2016 at 12:16:13 PM UTC-4, John Gordon wrote: > In <mailman.332.1458315013.12893.python-l...@python.org> Wolfgang Maier > <wolfgang.ma...@biologie.uni-freiburg.de> writes: > > > > So promptUser_PWord is a module? Well, I'm confused. You gave us this > > > bit of code: > > > > > > user_pword = promptUser_PWord() > > > > > > But that can't work if promptUser_PWord is a module; modules aren't > > > callable. promptUser_PWord() has to be a function or a class. > > > > > > Yes, but I guess the OP's program will run into the SyntaxError when > > trying to import the module, i.e., before it ever encounters the > > TypeError: 'module' object is not callable. > > Good point; I hadn't thought of that. > > -- > John Gordon A is for Amy, who fell down the stairs > gor...@panix.com B is for Basil, assaulted by bears > -- Edward Gorey, "The Gashlycrumb Tinies"
true I get the following: File "H:\dev\eclipse\workspace\genXls\src\genXls\genXlswPrompt.py", line 11, in <module> import promptUser_PWord File "H:\dev\eclipse\workspace\genXls\src\genXls\promptUser_PWord.py", line 58 return user_pword SyntaxError: 'return' outside function so what I get from the various postings is promptUser_PWord must be converted to a class. True? -- https://mail.python.org/mailman/listinfo/python-list