Solving The Invalid Name For Python Module Warning In PyDev
I encountered the Invalid name for Python module: ...filename (it'll not be analyzed) warning message in PyDev and I tried to resolve it by replacing - in the filename with _ but t
Solution 1:
See http://docs.python.org/tutorial/modules.html for information about modules.
To find out what characters are valid, have a look at the syntax of the import
statement. It shows you that a module name needs to be a valid identifier which has the following rule:
identifier ::= (letter|"_") (letter | digit | "_")*
Solution 2:
I had the similar message and when I checked the script file name, I had a "-" [dash character] in the script name. After I removed the dash character and replaced with " _ " [an under score character], the warning message was gone.
Post a Comment for "Solving The Invalid Name For Python Module Warning In PyDev"