Giter Site home page Giter Site logo

urwidtrees's People

Contributors

adotddot avatar bwesterb avatar edwardbetts avatar lucc avatar mrichar1 avatar patricktotzke avatar pazz avatar quantifiedcode-bot avatar rndusr avatar teapot9 avatar wernight avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

urwidtrees's Issues

Dynamic changing of tree items?

Hej everybody,
I'm looking for a way to dynamically change a tree (update/delete items), is this currently possible? Reading the urwid docs, I found that such a class has to be derived from MonitoredList but couldn't find anything here. Does anybody have an idea how to start?

Tree view with cwd as root

Hey, sorry for the question but I've been going through the examples today and I can't find a way to change the code so the root of the tree will be the current working directory. Is this possible to do?

Fix dependency specification in setup.py

The correct key name that is picked up by pip in setup.py is install_requires:
https://github.com/pazz/urwidtrees/blob/master/setup.py#L15

Trying to install urwidtrees without having urwid installed results in:

> $ pip install urwidtrees                                                                                    [±master ●]
Collecting urwidtrees
  Using cached urwidtrees-1.0.1.1.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-VGDG1V/urwidtrees/setup.py", line 4, in <module>
        import urwidtrees.version as v
      File "urwidtrees/__init__.py", line 6, in <module>
        from .decoration import DecoratedTree, CollapsibleTree
      File "urwidtrees/decoration.py", line 4, in <module>
        import urwid
    ImportError: No module named urwid

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-VGDG1V/urwidtrees/

pypi

It would be nice to have urwidtrees in pypi. If you find it a hassle, I can maintain it for you.

`pip install urwidtrees` fails if `urwid` isn't installed yet

$ virtualenv-2.7 test
New python executable in test/bin/python
Installing setuptools, pip, wheel...done.
$ source test/bin/activate
(test) $ pip install urwidtrees
You are using pip version 7.0.3, however version 7.1.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Collecting urwidtrees
  Downloading urwidtrees-1.0.1.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 20, in <module>
      File "/private/var/folders/pm/10pl16cj2mldkky06201p_7w0000gn/T/pip-build-pMpY4h/urwidtrees/setup.py", line 4, in <module>
        import urwidtrees
      File "urwidtrees/__init__.py", line 11, in <module>
        from .decoration import DecoratedTree, CollapsibleTree
      File "urwidtrees/decoration.py", line 4, in <module>
        import urwid
    ImportError: No module named urwid

I am working on a fix.

help adding/removing child nodes while SimpleTree is running

How do I add/rename/delete tree nodes while the widget is live?

I understand how to build the initial structure from your examples, I am creating a SimpleTree and adding it to a CollapsibleArrowTree, everything is working fine, i can save and reload the tree from an XML file

but while the Tree is running, what is the correct way to add a new child, or delete a child from the tree?

I have been studying this API for several days I and I feel like I'm missing something very basic here.

My first method was to do it the way I initially built the tree, but manually stepping thru SimpleTree._treelist and making the changes.

My second method was to make the changes in the XML, rebuild the tree from scratch and reassign the SimpleTree to the CollapsibleArrow tree during runtime.

both attempts I was able to create a child node where I wanted to, and I could delete a node if it had a sibling beneath it, otherwise i get "TypeError: 'NoneType' object is not subscriptable" on urwidtrees/tree.py line 192

i'm sorry to bother you with this novice question but i would appreciate any advice

thank you

Should toggle collapse via enter/space

Currently + and - are used to expand/collapse. Those aren't the intuitive keys. I'd suggest to support space and/or enter if tree element is focused.

Should handle [] as None

If you have example0.py and replace None by replaced by [] or () it doesn't work properly.

Try moving cursor down after replacing None by [] and it'll hide lines. Other strange behaviors happen with the CollapsibleIndentedTree and [].

That probably means replacing some if XXX is not None: by if not XXX: (which is usually better anyway) in tree.py and possibly elsewhere.

Gain access to pypi and automate releases using travis

travis can be used to automatically push a new release to pypi for each new git tag.

https://docs.travis-ci.com/user/deployment/pypi/

I think the best way would be to get access to the pypi account, otherwise the pypi guys need to be contacted to transfer the repository. This needs to be done anyway if the current maintainer uses the account for other packages, too.

Also for maintainability reasons, maybe more than one active collaborator should have access to the pypi account?

importing the module itself in setup.py breaks install

In 4c0e887 the line import urwidtrees was (re-)added to setup.py.
Now python setup.py install imports urwid before installing it as a dependency and raises ImportError: No module named urwid.

This was fixed in #29 where other things got broken. Sorry for that!
I can create a PR, just thought some clarification and opinions first ;)

A recommended approach is to place the version in a separate file. E.g. urwidtrees/version.py:

__version__ = '1.0.2'

Then read and execute it in setup.py:

with open('urwidtrees/version.py') as f:
    exec(f.read())

setup(
    version=__version__,

and import it in urwidtrees/__init__.py to get urwidtrees.__version__:

from .version import __version__, __version_info__

Further reading: http://stackoverflow.com/questions/458550/standard-way-to-embed-version-into-python-package

The version.py (maybe meta_info.py?) could also contain __author__, __description__, etc. to have it all in a single place and inside the module.

update version

Hi @pazz,

I'm running the testing branch of alot which require urwidtrees version 1.0.
This is tagged to be 1.0 but in __init__.py version is still 0.1, breaking manual installation.
Could you fix that? Should I send a PR for such a small thing?

cheers

Doc/Howto up-down navigate at current depth?

In trying the demos the up and down keys walked into every child, I couldn't figure out (as a dumb user) how to jump to the next sibling, which is what i feel like up and down should do instead of walking to the next child. Is that configurable? (i didn't see it in my rushed view of the examples/docs)

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.