Giter Club home page Giter Club logo

Comments (8)

kislyuk avatar kislyuk commented on July 18, 2024

Not compatible, as far as I know. The reason is lack of time.

from argcomplete.

kislyuk avatar kislyuk commented on July 18, 2024

Done in 9bce49c

from argcomplete.

kislyuk avatar kislyuk commented on July 18, 2024

Released in v0.3.5

from argcomplete.

neithere avatar neithere commented on July 18, 2024

Thanks, this is awesome! I've found a couple of bugs though:

$ sudo activate-global-python-argcomplete 
  File "/usr/bin/activate-global-python-argcomplete", line 29
    print open(activator).read()
             ^
SyntaxError: invalid syntax

Obviously, print() should be a function.

And another bug related to Python 3:

$ cat issue14.py 
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# PYTHON_ARGCOMPLETE_OK
import argparse, argcomplete
parser = argparse.ArgumentParser()
parser.add_argument('foo', nargs='*')
argcomplete.autocomplete(parser)

$ ./issue14.py [TAB]
Traceback (most recent call last):
  File "./issue14.py", line 7, in <module>
    argcomplete.autocomplete(parser)
  File "/usr/lib/python3.3/site-packages/argcomplete/__init__.py", line 236, in autocomplete
    output_stream.write(ifs.join(completions).encode(locale.getpreferredencoding()))
TypeError: sequence item 2: expected str instance, bytes found
Non-zero exit

This problem seems to be closely related to #2. Not sure where exactly the report should go.

from argcomplete.

kislyuk avatar kislyuk commented on July 18, 2024

Thanks for reporting.

Your second issue should be fixed in bd7127e.

Still figuring out how to address your first issue. This is my first time using setup.py:setup(use_2to3=True), and it looks like I need to figure out how to force it to convert my scripts in addition to Python module files.

from argcomplete.

neithere avatar neithere commented on July 18, 2024

Frankly speaking, I'm a bit afraid of using 2to3 :-) and prefer six or rather bits of it, so I have no idea about how to automatically convert the scripts. Anyway, this particular problem should be easy to fix without 2to3 or six as both target Pythons (2.7, 3.3) provide the print() function (at least via from __future__ import print_function).

from argcomplete.

kislyuk avatar kislyuk commented on July 18, 2024

Thank you for the advice.

Should be fixed in 0734377. Released in https://github.com/kislyuk/argcomplete/tree/v0.3.7. Please test.

from argcomplete.

neithere avatar neithere commented on July 18, 2024

Yay, it works! No bug spotted this time. Thanks.

from argcomplete.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.