Auto-completion in Command Prompt?

245 views
Skip to first unread message

Yuxiang Wang

unread,
Apr 11, 2015, 5:03:23 PM4/11/15
to spyd...@googlegroups.com
Dear Spyder Team,

Just wondering - is there a way to do auto-completion by tab in command windows (tools - open command prompt)? 

Shawn

Adrian Klaver

unread,
Apr 11, 2015, 5:14:12 PM4/11/15
to spyd...@googlegroups.com
On my Linux machine that just opens a system shell and since that uses
Bash I have the normal system tab complete. If that is not what you are
after you will need to be more specific.

>
> Shawn
>
> --


--
Adrian Klaver
adrian...@aklaver.com

Yuxiang Wang

unread,
Apr 11, 2015, 9:47:06 PM4/11/15
to spyd...@googlegroups.com
Adrian,

Thank you for your response! Sorry that I was not being detailed enough.

I am using Windows 7, 64-bit. And it opened up cmd in Windows. In there, when I hit tab, I get a tab rather than auto completion.

Shawn

Adrian Klaver

unread,
Apr 11, 2015, 11:00:41 PM4/11/15
to spyd...@googlegroups.com
On 04/11/2015 06:47 PM, Yuxiang Wang wrote:
> Adrian,
>
> Thank you for your response! Sorry that I was not being detailed enough.
>
> I am using Windows 7, 64-bit. And it opened up cmd in Windows. In there,
> when I hit tab, I get a tab rather than auto completion.

Well the Windows autocomplete is different. I do not use Windows enough
anymore, so I would you suggest do a Google search on Windows shell
autocomplete.

Still not what sure what you want to autocomplete, shell commands or
something else?

>
> Shawn
>
> On Saturday, April 11, 2015 at 5:14:12 PM UTC-4, Adrian Klaver wrote:
>
> On 04/11/2015 02:03 PM, Yuxiang Wang wrote:
> > Dear Spyder Team,
> >
> > Just wondering - is there a way to do auto-completion by tab in
> command
> > windows (tools - open command prompt)?
>
> On my Linux machine that just opens a system shell and since that uses
> Bash I have the normal system tab complete. If that is not what you are
> after you will need to be more specific.
>
> >
> > Shawn
> >
> > --
>
>
> --
> Adrian Klaver
> adrian...@aklaver.com <javascript:>
>



--
Adrian Klaver
adrian...@aklaver.com

Yuxiang Wang

unread,
Apr 11, 2015, 11:05:33 PM4/11/15
to spyd...@googlegroups.com
Hi Adrian,

I see where the miscommunication happen now - sorry that I meant "cmd window in Spyder".

If you do tools - open command prompt in spyder, you will open a "command window".

In windows, the "command window in spyder" can work like a cmd shell without the autocomplete. For example, if I use Win + R and enter "cmd", it opens up a command window in Windows (outside of spyder), and if I type cd Wor(Tab) it will complete as cd WorkFolder. If I do the same thing in the command window inside Spyder, the tab key does not work.

Shawn

Adrian Klaver

unread,
Apr 12, 2015, 12:11:27 AM4/12/15
to spyd...@googlegroups.com
On 04/11/2015 08:05 PM, Yuxiang Wang wrote:
> Hi Adrian,
>
> I see where the miscommunication happen now - sorry that I meant "cmd
> window in Spyder".
>
> If you do tools - open command prompt in spyder, you will open a
> "command window".
>
> In windows, the "command window in spyder" can work like a cmd shell
> without the autocomplete. For example, if I use Win + R and enter "cmd",
> it opens up a command window in Windows (outside of spyder), and if I
> type cd Wor(Tab) it will complete as cd WorkFolder. If I do the same
> thing in the command window inside Spyder, the tab key does not work.

Well from what I remember Win + R opens the Run dialog. Going through
Tools --> gets you a Windows shell. I am pretty sure they are not the
same thing. That awaits a more definitive answer from someone that uses
Windows more then I do. In the meantime I would do the Google search on
'Windows shell autocomplete'.

>
> Shawn
>


--
Adrian Klaver
adrian...@aklaver.com

Yuxiang Wang

unread,
Apr 12, 2015, 1:09:33 AM4/12/15
to spyd...@googlegroups.com
Hi Adrian,

Thanks again for your response, but I do think that we are talking
about different things. I am talking about IN SPYDER. Is it a
different behavior between Windows and Linux? In Windows, Tools -->
Open command prompt will open a command console IN SPYDER, in where
the Python console is (a new tab, just like a second Python console).
You can use ctrl + shift + c to switch into this console.

To repeat:

0) Use Windows 7 64 bit, and install Python + spyderlib;
1) Open Spyder;
2) Go to Tools --> Open command prompt;
3) A command window will be launched in Spyder console panel (adding a
new panel to the right of exisiting Python consoles);
4) Set focus to the console being opened. You can see that
auto-complete does not work in here.

And, of course, if I just open a cmd in Windows, the auto-complete
will work. It is only IN SPYDER that it won't work.

Thanks again for your patience in reading through Adrian... Appreciate it :)

Shawn
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "spyder" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/spyderlib/oFUdofL1i1M/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> spyderlib+...@googlegroups.com.
> To post to this group, send email to spyd...@googlegroups.com.
> Visit this group at http://groups.google.com/group/spyderlib.
> For more options, visit https://groups.google.com/d/optout.



--
Yuxiang "Shawn" Wang
Gerling Research Lab
University of Virginia
yw...@virginia.edu
+1 (434) 284-0836
https://sites.google.com/a/virginia.edu/yw5aj/

Adrian Klaver

unread,
Apr 12, 2015, 9:30:27 AM4/12/15
to spyd...@googlegroups.com
On 04/11/2015 10:09 PM, Yuxiang Wang wrote:
> Hi Adrian,
>
> Thanks again for your response, but I do think that we are talking
> about different things. I am talking about IN SPYDER. Is it a
> different behavior between Windows and Linux? In Windows, Tools -->
> Open command prompt will open a command console IN SPYDER, in where
> the Python console is (a new tab, just like a second Python console).
> You can use ctrl + shift + c to switch into this console.
>
> To repeat:
>
> 0) Use Windows 7 64 bit, and install Python + spyderlib;
> 1) Open Spyder;
> 2) Go to Tools --> Open command prompt;
> 3) A command window will be launched in Spyder console panel (adding a
> new panel to the right of exisiting Python consoles);
> 4) Set focus to the console being opened. You can see that
> auto-complete does not work in here.

On Linux I have Open a terminal which opens an independent terminal
window for a system shell. There is no option for a command prompt. I do
not have access to a Windows machine so I have no way of testing what
you are seeing. That will have to wait for someone else on this list
that uses Spyder with Windows.

I am still not sure what you are using the command console for, is it a
system console or a Python console? The reason I ask is that the
keyboard shortcut you give, on my machine, takes you to a Python
console. If it is a Python console have you gone to Preferences -->
Console --> Introspection and checked Automatic code completion?

>
> And, of course, if I just open a cmd in Windows, the auto-complete
> will work. It is only IN SPYDER that it won't work.
>
> Thanks again for your patience in reading through Adrian... Appreciate it :)
>
> Shawn
>



--
Adrian Klaver
adrian...@aklaver.com

Carlos Córdoba

unread,
Apr 12, 2015, 11:50:03 AM4/12/15
to spyd...@googlegroups.com
Hi,

@Adrian, we don't embed a system terminal on Linux (under the Console pane) because our terminal is very simple and Linux users (usually) know how to use it very well. That was a decision taken a long time ago :-)

@Shawn, I think our terminal doesn't do code completion. As I said, it just comes in handy to run simple commands but not much more than that :-)


Cheers,
Carlos

El 12/04/15 a las 08:30, Adrian Klaver escribió:

Yuxiang Wang

unread,
Apr 12, 2015, 11:57:14 AM4/12/15
to spyd...@googlegroups.com

Hi Carlos,

Thanks for your answer! Sounds good to me :) Just wanted to make sure that I didn't configured anything wrong. Opening a stand alone console is totally cool.

Thanks again!

Shawn

Ariel Balter

unread,
Feb 27, 2016, 2:38:35 AM2/27/16
to spyder
Hi @Carlos,

If you are developing a python script meant to be run at the command line where you would pass in command line arguments, then you really need a shell to test it. It would be really nice if the integrated Windows command prompt were better equipped. I would like to be able to tab complete directories, and even the name of the python script. Is it difficult to get tab completion? I'm pretty sure there are full-featured terminal emulators out there for linux written in python. None for Windows?

Side note:

@Adrian -- I really think you were less than helpful to the OP. You repeated the same answer over and over, even though the OP said repeatedly you weren't understanding. Looking up how to do things in the native Windows prompt has NOTHING to do with what works in the Spyder implementation. That is a Spyder issue. You acted as though the OP was being either lazy (not wanting to research the Windows shell) or stupid (not simply understanding that it is a property of the Windows shell). In fact, the OP had a very real question, which I also share.

I'm not trying to flame you. But as a community, I think we can take constructive criticism.

Carlos Córdoba

unread,
Feb 27, 2016, 9:27:12 AM2/27/16
to spyd...@googlegroups.com
Hi,

You can pass command line arguments to a script that's been developed in Spyder by using our Run dialog. You just need to press F6 (Ctrl+F6 in Spyder 3.0) and then go to

    Command line options

About your question: I don't know about terminal emulators for Windows that we could embed on Spyder, and we don't plan our current terminal, sorry.


Cheers,
Carlos

El 27/02/16 a las 02:38, Ariel Balter escribió:
--
You received this message because you are subscribed to the Google Groups "spyder" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spyderlib+...@googlegroups.com.

To post to this group, send email to spyd...@googlegroups.com.

Carlos Córdoba

unread,
Feb 27, 2016, 9:28:46 AM2/27/16
to spyd...@googlegroups.com
Sorry, we don't plan *to improve* our current terminal :-)

El 27/02/16 a las 09:27, Carlos Córdoba escribió:
Reply all
Reply to author
Forward
0 new messages