Auto Completion of Function Arguments.

1,335 views
Skip to first unread message

FENG Xu

unread,
Jan 7, 2013, 3:00:20 PM1/7/13
to spyd...@googlegroups.com
I would like to suggest an enhancement for Spyder: Is it possible for Spyder to provider automatic completion of function arguments? Many other interpretors like SPE have this feature. It would be cool if Spyder has this. For example,
import scipy
When I type 'scipy.all(', the autocompletion will automatically complete it as
scipy.all(a,axis=None,out=None)

Thanks

Jonatan Hjul

unread,
Jan 9, 2013, 4:14:07 AM1/9/13
to spyd...@googlegroups.com
Spyder does have some support for it, but you have to explicitly request it by ctrl+space. It could probably be improved, also with the possibility to jump between (positional) arguments. I am not sure however how the best way would be to do so. I would be annoyed if spyder automatically inserted all arguments.

Anyway, the place to request features is at http://code.google.com/p/spyderlib/issues/list

Carlos Córdoba

unread,
Jan 9, 2013, 11:23:38 AM1/9/13
to spyd...@googlegroups.com
Hi Feng,

Interesting point, but right now there are two ways in which you can get
function args:

1. Checking the function docs through the Object Inspector.

2. Seeing the calltip that is shown when you open a parenthesis after
the function's name.

In any case you can complete the keyword args using Ctrl+Space, as
Jonatan mentioned.

Cheers,
Carlos

El 07/01/13 15:00, FENG Xu escribió:
> --
> You received this message because you are subscribed to the Google
> Groups "spyder" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/spyderlib/-/hquai3wcf4YJ.
> To post to this group, send email to spyd...@googlegroups.com.
> To unsubscribe from this group, send email to
> spyderlib+...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/spyderlib?hl=en.

FENG Xu

unread,
Jan 10, 2013, 10:18:51 PM1/10/13
to spyd...@googlegroups.com
Hi Carlos/Janatan,
    Thanks for your reply. I tried Ctr + Space but unfortunately it did not seem to give what I wanted. I attached a screen shot. It has hints for arguments as a drop down list. But when I type Ctr+space, the hints disappears instead of inserting the arguments. Am I missing something?
     Ctr + space does help to provide the drop down choices for functions in scipy if I type "scipy." but that is not exactly I wanted.
Thanks again
Feng

To unsubscribe from this group, send email to spyderlib+unsubscribe@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/spyderlib?hl=en.
--
You received this message because you are subscribed to the Google Groups "spyder" group.
To post to this group, send email to spyd...@googlegroups.com.
To unsubscribe from this group, send email to spyderlib+unsubscribe@googlegroups.com.
Screenshot from 2013-01-10 22:12:24.png

Jonatan Hjul

unread,
Jan 14, 2013, 3:54:33 AM1/14/13
to spyd...@googlegroups.com
I thought you were in the editor and not in the console. If you try the same thing in the editor then you can see what I was talking about.

I guess we should have the same capabilities in the console, even though the capabilities are provided by a different library. You may want to raise a ticket on that.



Den fredag den 11. januar 2013 04.18.51 UTC+1 skrev FENG Xu:
Hi Carlos/Janatan,
    Thanks for your reply. I tried Ctr + Space but unfortunately it did not seem to give what I wanted. I attached a screen shot. It has hints for arguments as a drop down list. But when I type Ctr+space, the hints disappears instead of inserting the arguments. Am I missing something?
     Ctr + space does help to provide the drop down choices for functions in scipy if I type "scipy." but that is not exactly I wanted.
Thanks again
Feng

On Wed, Jan 9, 2013 at 11:23 AM, Carlos Córdoba <ccord...@gmail.com> wrote:
Hi Feng,

Interesting point, but right now there are two ways in which you can get function args:

1. Checking the function docs through the Object Inspector.

2. Seeing the calltip that is shown when you open a parenthesis after the function's name.

In any case you can complete the keyword args using Ctrl+Space, as Jonatan mentioned.

Cheers,
Carlos

El 07/01/13 15:00, FENG Xu escribió:
I would like to suggest an enhancement for Spyder: Is it possible for Spyder to provider automatic completion of function arguments? Many other interpretors like SPE have this feature. It would be cool if Spyder has this. For example,
import scipy
When I type 'scipy.all(', the autocompletion will automatically complete it as
scipy.all(a,axis=None,out=None)

Thanks

--
You received this message because you are subscribed to the Google Groups "spyder" group.
To view this discussion on the web visit https://groups.google.com/d/msg/spyderlib/-/hquai3wcf4YJ.

To post to this group, send email to spyd...@googlegroups.com.
To unsubscribe from this group, send email to spyderlib+...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/spyderlib?hl=en.

--
You received this message because you are subscribed to the Google Groups "spyder" group.
To post to this group, send email to spyd...@googlegroups.com.
To unsubscribe from this group, send email to spyderlib+...@googlegroups.com.

Carlos Córdoba

unread,
Jan 14, 2013, 7:37:05 PM1/14/13
to spyd...@googlegroups.com
Hi Feng,

Sorry for not being clear enough: at the moment there is no way to do what you want, neither in Editor nor in the Console. What I described were just some possible alternatives to get what you want.

Cheers,
Carlos

El 10/01/13 22:18, FENG Xu escribió:
Hi Carlos/Janatan,
    Thanks for your reply. I tried Ctr + Space but unfortunately it did not seem to give what I wanted. I attached a screen shot. It has hints for arguments as a drop down list. But when I type Ctr+space, the hints disappears instead of inserting the arguments. Am I missing something?
     Ctr + space does help to provide the drop down choices for functions in scipy if I type "scipy." but that is not exactly I wanted.
Thanks again
Feng

On Wed, Jan 9, 2013 at 11:23 AM, Carlos Córdoba <ccord...@gmail.com> wrote:
Hi Feng,

Interesting point, but right now there are two ways in which you can get function args:

1. Checking the function docs through the Object Inspector.

2. Seeing the calltip that is shown when you open a parenthesis after the function's name.

In any case you can complete the keyword args using Ctrl+Space, as Jonatan mentioned.

Cheers,
Carlos

El 07/01/13 15:00, FENG Xu escribió:
I would like to suggest an enhancement for Spyder: Is it possible for Spyder to provider automatic completion of function arguments? Many other interpretors like SPE have this feature. It would be cool if Spyder has this. For example,
import scipy
When I type 'scipy.all(', the autocompletion will automatically complete it as
scipy.all(a,axis=None,out=None)

Thanks

--
You received this message because you are subscribed to the Google Groups "spyder" group.
To view this discussion on the web visit https://groups.google.com/d/msg/spyderlib/-/hquai3wcf4YJ.

To post to this group, send email to spyd...@googlegroups.com.
To unsubscribe from this group, send email to spyderlib+...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/spyderlib?hl=en.

--
You received this message because you are subscribed to the Google Groups "spyder" group.
To post to this group, send email to spyd...@googlegroups.com.
To unsubscribe from this group, send email to spyderlib+...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/spyderlib?hl=en.


--
You received this message because you are subscribed to the Google Groups "spyder" group.
To post to this group, send email to spyd...@googlegroups.com.
To unsubscribe from this group, send email to spyderlib+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages