Piet van Oostrum wrote:
> Chris Angelico writes:
>
>> I'm not sure what's going on here, and it's probably not actually
>> enum-specific, but that's where I saw it.
>>
>> If you create a plain class and have an attribute with an annotation,
>> you can see that:
>>
> class Foo:
>> ... spa
Chris Angelico writes:
> I'm not sure what's going on here, and it's probably not actually
> enum-specific, but that's where I saw it.
>
> If you create a plain class and have an attribute with an annotation,
> you can see that:
>
class Foo:
> ... spam: "ham" = 1
> ...
Foo.__a
> Foo
Chris Angelico wrote:
>> Looks like everything starting with an underscore (except class, doc, and
>> module) is suppressed, probably to suppress some noise...
>>
>
> That's why dir() shows what it does, but tab completion seems to have
> some other source, as
, '__delattr__', '__dict__', '__dir__',
> > '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__',
> > '__gt__', '__hash__', '__init__', '__init_subclass__', '_
ct__', '__dir__',
> '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__',
> '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__',
> '__lt__',
27;__lt__', '__module__', '__ne__', '__new__', '__reduce__',
'__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__',
'__subclasshook__', '__weakref__', 'spam']
&g
a file. Sure, not every quoted string is a file
> > name (in fact, very few are), but I don't know of anything else that
> > would feel natural. (Also, Pike's REPL behaves this way, so presumably
> > it's of use to more people than me.)
> >
> > Where would I
mably
> it's of use to more people than me.)
>
> Where would I start looking to try to make this happen? Doesn't
> necessarily have to be pushed upstream as a core Python feature; I'm
> guessing this can probably be done in sitecustomize.py. Anyone have
> tutorials
I don't know of anything else that
would feel natural. (Also, Pike's REPL behaves this way, so presumably
it's of use to more people than me.)
Where would I start looking to try to make this happen? Doesn't
necessarily have to be pushed upstream as a core Python feature; I'm
Peter Otten <__pete...@web.de> wrote:
> > Is there a way to make TAB-completion work for other directories, too?
>
> Remove "/" from the set of delimiters:
>
> readline.set_completer_delims(
> "".join(c for c in readline.get_completer_del
Ulli Horlacher wrote:
> I need an input function with GNU readline support. So far I have:
>
> import readline
> readline.parse_and_bind("tab: complete")
>
> file = raw_input('File to send: ')
>
>
> Cursor keys are working, but TAB-c
I need an input function with GNU readline support. So far I have:
import readline
readline.parse_and_bind("tab: complete")
file = raw_input('File to send: ')
Cursor keys are working, but TAB-completion works only in the current
directory. Example:
Fil
On Tue, 23 Jun 2015 12:02 pm, Chris Angelico wrote:
> On Tue, Jun 23, 2015 at 11:41 AM, Steven D'Aprano
> wrote:
>> On Tue, 23 Jun 2015 11:23 am, Chris Angelico wrote:
>>
>>> On Tue, Jun 23, 2015 at 11:02 AM, Steven D'Aprano
>>> wrote:
How do I get the currently installed completer?
>>
On Tue, Jun 23, 2015 at 11:41 AM, Steven D'Aprano wrote:
> On Tue, 23 Jun 2015 11:23 am, Chris Angelico wrote:
>
>> On Tue, Jun 23, 2015 at 11:02 AM, Steven D'Aprano
>> wrote:
>>> How do I get the currently installed completer?
>>>
>>> Solutions for any version of Python acceptable, but if they w
On Tue, 23 Jun 2015 11:23 am, Chris Angelico wrote:
> On Tue, Jun 23, 2015 at 11:02 AM, Steven D'Aprano
> wrote:
>> How do I get the currently installed completer?
>>
>> Solutions for any version of Python acceptable, but if they work all the
>> way back to 2.4 or older, even better.
>
> Whether
On Tue, Jun 23, 2015 at 11:02 AM, Steven D'Aprano wrote:
> How do I get the currently installed completer?
>
> Solutions for any version of Python acceptable, but if they work all the way
> back to 2.4 or older, even better.
Whether there's a way to avoid the whole try/finally I can't say, but
I
I have two (or more) different types of tab completion, and I want one to
apply under certain circumstances, and the other to apply at others. For
example, let's say I want one to apply inside a function which uses
raw_input (or input in Python 3), and the other to apply the rest of the
time
I am happy to announce an upgrade to the tabhistory module, which brings
advanced tab completion and command history to Python 2.4 through 3.3 and
beyond.
Features
Tab completion
--
* At the beginning of lines, pressing the TAB key indents the line.
* Inside
On Mon, 30 Sep 2013 08:50:01 +, Antoine Pitrou wrote:
> Steven D'Aprano pearwood.info> writes:
>>
>> I don't consider either of these solutions to be satisfactory. If you
>> agree, I urge you to try it out for yourself, and then leave a comment
&g
Steven D'Aprano pearwood.info> writes:
>
> I don't consider either of these solutions to be satisfactory. If you
> agree, I urge you to try it out for yourself, and then leave a comment on
> the bug tracker asking for tab completion to still insert tabs at the
> be
By default, Python 3.4 will ship with tab completion turned on. When you
hit the tab key, Python will try to complete the current function,
method, variable or other name, if necessary displaying the alternatives
is there are more than one:
py> d = {}
py> d.pop
d.pop( d.popitem(
Steven D'Aprano wrote:
> I'm reading the part of the tutorial that talks about tab-completion, and
> I think the docs are wrong.
>
> http://docs.python.org/tutorial/interactive.html#key-bindings
>
> The "more capable startup file" example given claims:
&
I'm reading the part of the tutorial that talks about tab-completion, and
I think the docs are wrong.
http://docs.python.org/tutorial/interactive.html#key-bindings
The "more capable startup file" example given claims:
# Add auto-completion and a stored history file of commands
Could someone help me change the tab completion setting in iPython on
a Windows machine? I would like it to cycle through the available
completions
Thank you.
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, Apr 2, 2009 at 10:59 AM, Steven D'Aprano wrote:
> Does anyone use the tab-completion recipe in the docs?
>
> http://docs.python.org/library/rlcompleter.html#module-rlcompleter
>
> suggests using this to enable tab-completion:
>
> try:
> import readline
>
I have installed pyreadline, and get nice tab completion in
the normal interactive interpreter:
Python 2.4.4 (#71, Oct 18 2006, 08:34:43) [MSC v.1310 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
&g
On Fri, 03 Apr 2009 13:41:50 +1100, Ben Finney wrote:
> Steven D'Aprano writes:
>
>> I do not wish to type four literal spaces to indent the 'return' line,
>> or backspace four times to remove it, but with tab-completion I am
>> forced to. I'm used t
Steven D'Aprano writes:
> I do not wish to type four literal spaces to indent the 'return'
> line, or backspace four times to remove it, but with tab-completion
> I am forced to. I'm used to pressing the TAB key once to get an
> indent. Within the interpreter, I
On Fri, 03 Apr 2009 08:51:47 +1100, Ben Finney wrote:
> Steven D'Aprano writes:
>
>> I like tab-completion, but I'd rather not be reduced to typing spaces
>> for indents in the interpreter. What do other people do?
>
> Acknowledge that using U+0009 for indenta
On 2009-04-02 09:59, Steven D'Aprano wrote:
I like tab-completion, but I'd rather not be reduced to typing spaces for
indents in the interpreter. What do other people do?
Any other suggestions or hints?
I use IPython. The completion is set up (I don't know how) such t
Steven D'Aprano writes:
> I like tab-completion, but I'd rather not be reduced to typing
> spaces for indents in the interpreter. What do other people do?
Acknowledge that using U+0009 for indentation is wrong, and use
beautiful U+0020 always.
> The GNU readline librar
On Thu, Apr 02, 2009 at 10:59:29AM EDT, Steven D'Aprano wrote:
> Does anyone use the tab-completion recipe in the docs?
>
> http://docs.python.org/library/rlcompleter.html#module-rlcompleter
>
> suggests using this to enable tab-completion:
>
> try:
> import
readline.parse_and_bind('\C-n: complete')
Makes it Ctrl-n do the completion, like vim.
On Apr 2, 7:59 am, Steven D'Aprano wrote:
> Does anyone use the tab-completion recipe in the docs?
>
> http://docs.python.org/library/rlcompleter.html#module-rlcompleter
>
> sug
On Thu, Apr 2, 2009 at 7:59 AM, Steven D'Aprano
wrote:
> Does anyone use the tab-completion recipe in the docs?
>
> http://docs.python.org/library/rlcompleter.html#module-rlcompleter
>
> suggests using this to enable tab-completion:
>
> try:
> import readline
>
Does anyone use the tab-completion recipe in the docs?
http://docs.python.org/library/rlcompleter.html#module-rlcompleter
suggests using this to enable tab-completion:
try:
import readline
except ImportError:
print "Module readline not available."
else:
import r
Keith Hughitt <[EMAIL PROTECTED]> wrote:
>> Keith Hughitt wrote:
>> > [ ... ] I have
>> > found some ways to enable tab completion for program-related commands,
>> > but not for system filepaths.
>Currently Unix/Console.
What's wrong with the rea
Keith Hughitt wrote:
On Jul 9, 10:18 am, Tim Golden <[EMAIL PROTECTED]> wrote:
Keith Hughitt wrote:
I've been looking around on the web for a way to do this, but so far
have not come across anything for this particular application. I have
found some ways to enable tab completion
On Jul 9, 10:18 am, Tim Golden <[EMAIL PROTECTED]> wrote:
> Keith Hughitt wrote:
> > I've been looking around on the web for a way to do this, but so far
> > have not come across anything for this particular application. I have
> > found some ways to enable ta
Keith Hughitt wrote:
I've been looking around on the web for a way to do this, but so far
have not come across anything for this particular application. I have
found some ways to enable tab completion for program-related commands,
but not for system filepaths. This would be nice to have
Hi all,
I've been looking around on the web for a way to do this, but so far
have not come across anything for this particular application. I have
found some ways to enable tab completion for program-related commands,
but not for system filepaths. This would be nice to have when
promptin
Siddhant schrieb:
> Hi.
> How can I implement a tab-completing code using Python?
> Like for example, I want to design a simple shell (using Python, of
> course), which could support tab completion as well. How do I go about
> it?
http://docs.python.org/lib/module-rlcompleter.
Hi.
How can I implement a tab-completing code using Python?
Like for example, I want to design a simple shell (using Python, of
course), which could support tab completion as well. How do I go about
it?
Thanks.
Siddhant
--
http://mail.python.org/mailman/listinfo/python-list
Yes. Almost what I wanted. Thanks. :)
--
http://mail.python.org/mailman/listinfo/python-list
On Mar 4, 10:44 am, Ron DuPlain <[EMAIL PROTECTED]> wrote:
> On Mar 4, 10:13 am, Siddhant <[EMAIL PROTECTED]> wrote:
>
> > Hi people.
> > I was just wondering if a tab-completion feature in python command
> > line interface would be helpful?
> > If ye
On Mar 4, 10:13 am, Siddhant <[EMAIL PROTECTED]> wrote:
> Hi people.
> I was just wondering if a tab-completion feature in python command
> line interface would be helpful?
> If yes, then how can I implement it?
> Thanks,
> Siddhant
ipython provides auto tab completion.
On Mar 4, 8:13 am, Siddhant <[EMAIL PROTECTED]> wrote:
> Hi people.
> I was just wondering if a tab-completion feature in python command
> line interface would be helpful?
> If yes, then how can I implement it?
> Thanks,
> Siddhant
Is this what you are looking for?
ht
Hi people.
I was just wondering if a tab-completion feature in python command
line interface would be helpful?
If yes, then how can I implement it?
Thanks,
Siddhant
--
http://mail.python.org/mailman/listinfo/python-list
Dirk Loss wrote:
> Bjoern Schliessmann wrote:
>> readline module applies its autocompletion functions to (and only
>> to) sys.stdout.
>
> I see. Then I guess I'll have to avoid redirecting sys.stdout and
> come up with some kind of workaround instead.
Just use a "central" function for printing o
Bjoern Schliessmann wrote:
> readline module applies its autocompletion functions to (and only
> to) sys.stdout.
I see. Then I guess I'll have to avoid redirecting sys.stdout and
come up with some kind of workaround instead.
Nevertheless, thanks for the info.
Regards
Dirk
--
http://mail.python.o
Dirk Loss wrote:
> I want to have tab completion in my program for interactive input.
> Using readline and rlcompleter this works nicely. But I also have
> to catch and modify all "print" output, so I redirect sys.stdout
> to a custom file-like object. The problem is: A
Hi,
I want to have tab completion in my program for interactive input.
Using readline and rlcompleter this works nicely. But I also have to
catch and modify all "print" output, so I redirect sys.stdout
to a custom file-like object. The problem is: After the redirection,
readline sup
s not really intended to be used as an interactive session with all
> sorts of bells and whistles.
Or he can use ipython, which with the special ipython.el companion file and a
recent (CVS) python-mode, will give him true tab completion (with options
listed in an emacs *completions* buffer) for
h all
sorts of bells and whistles. If you want a true terminal emulator within
Emacs, try
M-x terminal-emulator RET
You can do tab completion and command recall just like a normal terminal.
(In fact, you can run Emacs within Emacs using terminal-emulator.)
Skip
--
http://mail.python.org/ma
Hi,
I am exploring python-mode on emacs. When I open foo.py in emacs and
hit C-!, it starts the python interpreter in another window. Next, I
execute -
import rlcompleter, readline
readline.parse_and_bind('tab: complete')
Now I will test the completion by trying to complete sys.v (which could
be
54 matches
Mail list logo