from a module return a class
Wolfgang Maier
wolfgang.maier at biologie.uni-freiburg.de
Fri Mar 18 11:29:55 EDT 2016
On 18.03.2016 16:08, John Gordon wrote:
> In <cc439011-f9b3-4837-ba3b-6703f99ae9be at googlegroups.com> kevind0718 at gmail.com writes:
>
>> As requested , full code for promptUser_PWord
>
> <snip>
>
> 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.
More information about the Python-list
mailing list