File: PKG-INFO

package info (click to toggle)
python-clint 0.5.1-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 328 kB
  • sloc: python: 1,815; makefile: 3
file content (329 lines) | stat: -rw-r--r-- 9,896 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
Metadata-Version: 1.1
Name: clint
Version: 0.5.1
Summary: Python Command Line Interface Tools
Home-page: https://github.com/kennethreitz/clint
Author: Kenneth Reitz
Author-email: me@kennethreitz.com
License: ISC
Description: Clint: Python Command-line Application Tools
        ============================================
        
        **Clint** is a module filled with a set of awesome tools for developing
        commandline applications.
        
        .. image:: https://raw.github.com/kennethreitz/clint/master/misc/clint.jpeg
        
        **C** ommand
        **L** ine
        **IN** terface
        **T** ools
        . 
        
        
        Clint is awesome. Crazy awesome. It supports colors, but detects if the session is a TTY, so doesn't render the colors if you're piping stuff around. Automagically.
        
        Awesome nest-able indentation context manager. Example: (``with indent(4): puts('indented text')``). It supports custom email-style quotes. Of course, it supports color too, if and when needed.
        
        It has an awesome Column printer with optional auto-expanding columns. It detects how wide your current console is and adjusts accordingly. It wraps your words properly to fit the column size. With or without colors mixed in. All with a single function call.
        
        The world's easiest to use implicit argument system w/ chaining methods for filtering. Seriously. 
        
        
        Run the various executables in examples_ to get a good feel for what Clint offers.
        
        .. _examples: https://github.com/kennethreitz/clint/tree/master/examples
        
        You'll never want to not use it.
        
        
        
        Current Features:
        -----------------
        - Little Documentation (bear with me for now)
        - CLI Colors and Indents
        - Extremely Simple + Powerful Column Printer
        - Iterator-based Progress Bar
        - Implicit Argument Handling
        - Simple Support for Incoming Unix Pipes
        - Application Directory management
        
        
        Future Features:
        ----------------
        - Documentation!
        - Simple choice system ``Are you sure? [Yn]``
        - Suggestions welcome.
        
        
        Example
        -------
        
        I want to indent my console text. ::
        
            >>> from clint.textui import puts, indent
        
            >>> puts('not indented text')
            >>> with indent(4):
            >>>     puts('indented text')
            not indented text
                indented text
        
        I want to quote my console text (like email). ::
        
            >>> puts('not indented text')
            >>> with indent(4, quote=' >'):
            >>>     puts('quoted text')
            >>>     puts('pretty cool, eh?')
            
            not indented text
             >  quoted text
             >  pretty cool, eh?
        
        I want to color my console text. ::
        
            >>> from clint.textui import colored, puts
        
            >>> puts(colored.red('red text'))
            red text
        
            # It's red in Windows, OSX, and Linux alike.
        
        I want to get data piped to stdin. ::
        
            >>> clint.piped_in()
            
            # if no data was piped in, piped_in returns None
        
        
        I want to get the first commandline argument passed in. ::
        
            >>> from clint import arguments
            >>> args = arguments.Args()
            >>> args.get(0)
        
            # if no argument was passed, get returns None
        
        
        I want to store a configuration file. ::
        
            >>> from clint import resources
        
            >>> resources.init('Company', 'AppName')
            >>> resources.user.write('config.ini', file_contents)
        
            # OSX: '/Users/appuser/Library/Application Support/AppName/config.ini'
            # Windows: 'C:\\Users\\appuser\\AppData\\Local\\Company\\AppName\\config.ini'
            # Linux: '/home/appuser/.config/appname/config.ini'
        
        I want to force color output even if stdout is not a TTY:
        
            $ export CLINT_FORCE_COLOR=1
        
        I want to ask for input. ::
        
            >>> from clint.textui import prompt, validators
            >>> path = prompt.query('Installation Path', default='/usr/local/bin/', validators=[validators.PathValidator()])
        
        
        Installation
        ------------
        
        To install clint, simply: ::
        
            $ pip install clint
        
        Or, if you absolutely must: ::
        
            $ easy_install clint
        
        But, you really shouldn't do that.
        
        
        
        License:
        --------
        
        ISC License. ::
        
            Copyright (c) 2011, Kenneth Reitz <me@kennethreitz.com>
        
            Permission to use, copy, modify, and/or distribute this software for any
            purpose with or without fee is hereby granted, provided that the above
            copyright notice and this permission notice appear in all copies.
        
            THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
            WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
            MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
            ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
            WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
            ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
            OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
        
        
        Contribute
        ----------
        
        If you'd like to contribute, simply fork `the repository`_, commit your changes
        to the **master** branch (or branch off of it), and send a pull request. Make
        sure you add yourself to AUTHORS_.
        
        
        Roadmap
        -------
        - Unittests
        - Sphinx Documentation
        
        
        
        .. _`the repository`: http://github.com/kennethreitz/clint
        .. _AUTHORS: http://github.com/kennethreitz/clint/blob/master/AUTHORS
        
        
        History
        -------
        
        0.5.1
        +++++
        * Fix line width calculation in max_width when using coloured text (thanks to @wkentaro) 
        
        0.5.0
        +++++
        * Added option prompt
        
        
        0.4.1
        +++++
        * Fix bug in logic that decides whether progress bars should be hidden or not
        
        
        0.4.0
        +++++
        * clint.textui.prompt now has a query function with validators! (thanks to @aeby) - see `examples/prompt.py`
        * Clint docs are now included in sdist (thanks to @alunduil)
        * Misc. bug fixes
        
        
        0.3.7
        +++++
        * Clint now obeys the CLINT_FORCE_COLOR environmental variable
        
        
        0.3.6
        +++++
        * Fixed faulty PyPI deployment
        
        
        0.3.5
        +++++
        * progress.bar is now a context manager - doesn't require an iterable anymore (thanks to @jric)
        * Bug fixes
        
        
        0.3.4
        +++++
        * Fixed Python 3 basestring deprecation
        * Fixed examples
        
        
        0.3.3
        +++++
        * Fixed Python 3 build issues
        * Fixed README and HISTORY being installed to /usr
        * Support added for bold text
        
        
        0.3.2
        +++++
        * Unknown
        
        
        0.3.1
        +++++
        * Unknown
        
        
        0.3.0
        +++++
        
        * Python 3 support!
        
        
        0.2.4
        +++++
        
        * New eng module
        * Win32 Bugfix
        
        
        0.2.3
        +++++
        
        * Only init colors if they are used (iPython compatability)
        * New progress module
        * Various bugfixes
        
        
        0.2.2
        +++++
        
        * Auto Color Disabling
        * Progress Namespace Change
        * New Progress Bars
        * textui.puts newline fix
        
        
        0.2.1 (2011-03-24)
        ++++++++++++++++++
        
        * Python 2.5 Support
        * List of available colors
        
        
        0.2.0 (2011-03-23)
        ++++++++++++++++++
        
        * Column Printing!!!
        * (Auto/Manual) Disabling of Colors
        * Smarter Colors
        * max_width, min_width
        * Strip cli colors
        * bug fixes
        
        
        0.1.2 (2011-03-21)
        ++++++++++++++++++
        
        * Bugfixes
        
        
        0.1.1 (2011-03-20)
        ++++++++++++++++++
        
        * Bugfixes
        * Indent Newline Injection
        * resources: flags, not_flags, files, not_files
        * Lots of Examples
        
        
        0.1.0 (2011-03-20)
        ++++++++++++++++++
        
        * Initial Release!
        
        
Platform: UNKNOWN
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: License :: OSI Approved :: ISC License (ISCL)
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.1
Classifier: Programming Language :: Python :: 3.2
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Topic :: Terminals :: Terminal Emulators/X Terminals