Pycharm fast review
Hi there,
I've tested Pycharm beta version which has already a professional IDE features list.
i have some question about features :
1) intention actions for functions :
for example, you type :
def main():
print("hello world")
myfun(1,2,3)
if __name__=='__main__':
main()
if you put cursor on myfun and press Alt+Enter, there are no intention action for creating a function with this name. It seems that this kind of intention actions only exists for classes (missing method).
2) Can you put specific parameter in Run > Edit Configurations in order to open pop-up when execute a command in order to set a script parameter ?
for example : in menu Run > Edit Configurations, you add script parameters :
Script : .../p1.py
Script parameters : --flows=flows.xml --toxml=flow1
(here i want to set --toxml parameter value each time i run my script (flow1, flow32, flow 76) via a popup window)
this feature exists in eclipse (see variable ${string_prompt}, ${file_prompt},... (for example : http://stackoverflow.com/questions/313270/how-to-make-eclipse-prompt-me-for-command-line-arguments)
3) for refactoring purposes, an extract function similar to extract method could be interesting.
what do you think ?
regards,
volov
Please sign in to leave a comment.
Hello vo,
I've tested Pycharm beta version which has already a professional IDE
Indeed, right now we don't offer any quickfixes for unresolved unqualified
references. This will likely be implemented in a future version:
http://youtrack.jetbrains.net/issue/PY-2092
No, there is no such feature in the IntelliJ Platform (and, consequently,
in PyCharm) at the moment. You can file a YouTrack issue.
In fact the "Extract method" refactoring works just fine for functions outside
of classes. The name might be confusing, but we prefer to stick to the canon
here.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
Hello Dmitry,
thanks a lot for your feedbacks.
A) first, happy to learn about future features like quickfixes for unresolved unqualified references !
B) for the ${prompt_string}, i will take a look on how to create a track as i think more in python than in java, you could use script with required parameters that could vary (you have the feeling of the Up key in shell, replace a script argument then press Enter : i think that this one could be longer in PyCharm to setUp without this prompt and even with prompt it will be longer than shell command line + history. But IDE leverages when you could mix this feature with Run in debug mode :-) .
note : i've noticed that Run in debug mode opens a Debug tab at the bottom of the window but when your script exits with an error, you're stick to this tab with "no content" or "disconnected" msgs. A cool thing would be to focus on Console tab when an error occurs.
C) for the extract function, i've tested on a simple script and it works as you said. On another script, a little popup appears with msg like : "Cannot perform refactoring when execution flow is interrupted". As this script requires script parameters to work (filenames to work on), i wonder if this is possible to fix this point in order to refactor as my script works fine when it gets its required parameters. Do not know how to fix it.
regards,
volov.
Hello vo,
We try to minimize focus switches not controlled by the developer because
they can disrupt the development flow. We do highlight tabs which contain
new content with special icons.
Most likely this depends not on the parameters, but on the structure of the
code block you're trying to extract. If you show me a sample code fragment,
I'll try to explain what happens in that specific case.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
Hello Dmitry,
here is a piece of code where i want to use extract_method <from here> to <to here> marks (added in the source) :
Pycharm open a little popup at the beginning of the selection zone with this following message : "Cannot perform refactoring when execution flow isinterrupted".
I've installed the too big Pydev IDE to check if it fails too. In fact, it succeeds to create a function that i've called update_tree (see below) :
i don't know why this message pops up when i'm trying to refactor in pycharm.
regards,
volov.
Thanks a lot for reporting this, I've created an issue: http://youtrack.jetbrains.net/issue/PY-2102
Feel free to watch it and get notified once it is fixed.
Regards,
Oleg
Hi Oleg,
thanks a lot for your quick feedback !
i'll watch this issue.
regards,
volov
It is already fixed :-)
Regards,
Oleg