Reputation: 143
I have recently installed Python 3.5.2 then PyCharm (IDE), but intellisense or auto-complete not working in my Windows 10.
# Method 1: intellisense or auto-complete not working for below
city = input("Enter your City \n")
print(city)
print(city.) *#<<<--- here not working when put a "." after "city"* variable
...but surprised to see that it works fine with below code:
myCity = "New York City"
print(myCity.upper())
Upvotes: 6
Views: 20032
Reputation: 701
Another answer is:
I was facing the same problem because mistakenly I had turned on the Power Save Mode in PyCharm. To turn it Off go to File -> Power Save Mode. It solved my issue. Thanks
Upvotes: 1
Reputation: 143
Finally it working now:
I had to install the Python 3.4.1
for my PyCharm 2016.3.2
Go to File
menu >> Settings...
>> Project: Python Programs
>> Project Interpreter
>> now follow below screenshot:
...but not sure that why it was not working with Python 3.5? ---> Thank you to @Pavel Karateev for the helpful update.
Upvotes: 7
Reputation: 40894
The value that input
may give you may have any type. That is, if you happen to type {"a": 1}
, the return type of input
will be dict
. Test it.
So with input
all attribute inference is moot. The completions offered are not even attributes, it seems, but expression modifiers.
If you only want to input a string value, use raw_input
. The result should be considered a string, and attribute completion should work.
To see it work, type:
city_name = raw_input("What is your city? ")
city_name.l
Then press the completion key after the l
; i suppose you will be offered variants like lower()
and lstrip()
. This would mean that PyCharm understood that city_name
must be a string, and offers relevant methods.
Upvotes: 2