Comments (3)
I like the idea of verbosity. I'd like to keep the UI logic out of the two classes. So I'm thinking some kind of notification/signaling/event manager object that can be signaled for something and then that object (or maybe, if being really generic, some kind of UI handler could subscribe to it) would trigger UI output.
dry run also sounds good also.
from dots.
An event system seems overkill… was there some framework like gevent/Qt/etc you had in mind or did you want to roll your own?
Given the nature of dots, will there ever be a need for multiple UIs?
from dots.
I wasn't thinking anything complicated, just something like
class NotificationManager(object):
def __init__(self):
listeners = {}
def notify(self, event_name, *args, **kwargs):
for subscriber in self.listeners:
subscriber(*args, **kwargs)
def subscribe(self, event_name, function):
self.listeners[event_name].append(function)
And then setup a UI handler that subscribes to events or something along those lines.. Though maybe you're right. I just hate having to pass around a flag for verbosity.
from dots.
Related Issues (17)
- Manage removed files
- Emit a warning when no groups are set HOT 1
- Work out bash completion for OSX HOT 1
- Execute .install files after all configs have been installed
- Python version requirement HOT 1
- Ignore missing configuration groups with warning
- V2 Ideas
- Explicitly handle error, when .install isn't executable HOT 2
- python 2.7 support is broken HOT 2
- md5 checksum hash comparison borken between 2/3 HOT 3
- Error on directory with the same name as a file + .extension HOT 1
- Add .install files for directories HOT 1
- Python 3 HOT 2
- Make SOURCE_DIR configurable HOT 3
- Force re-running of installation scripts HOT 4
- Move config-groups into ~/.config/dots/ HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dots.