-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added CapitalizeCleaner. More cleanups for transition to cooked_input.
- Loading branch information
Showing
10 changed files
with
74 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
|
||
import io_get_input | ||
from io_get_input import get_table_input | ||
import cooked_input | ||
from cooked_input import get_table_input | ||
|
||
|
||
if __name__ == '__main__': | ||
table = [(1, 'red'), (2, 'blue'), (4, 'green'), (6, 'yellow')] | ||
cur_val = 'red' | ||
|
||
color = get_table_input(table=table, cleaners=None, convertor=None, validators=None, input_value=io_get_input.TABLE_ID, return_value=io_get_input.TABLE_ID, show_table=True, | ||
color = get_table_input(table=table, cleaners=None, convertor=None, validators=None, input_value=cooked_input.TABLE_ID, return_value=cooked_input.TABLE_ID, show_table=True, | ||
prompt='Enter the id of the color you want', value_error='a valid color id') | ||
print('color id=%d' % (color)) | ||
|
||
color = get_table_input(table=table, cleaners=None, convertor=None, validators=None, input_value=io_get_input.TABLE_ID, return_value=io_get_input.TABLE_VALUE, show_table=True, | ||
color = get_table_input(table=table, cleaners=None, convertor=None, validators=None, input_value=cooked_input.TABLE_ID, return_value=cooked_input.TABLE_VALUE, show_table=True, | ||
default=cur_val, prompt='Enter the id of the color you want', value_error='a valid color id') | ||
print('color=%s' % (color)) | ||
|
||
color = get_table_input(table=table, cleaners=None, convertor=None, validators=None, input_value=io_get_input.TABLE_VALUE, return_value=io_get_input.TABLE_VALUE, show_table=True, | ||
color = get_table_input(table=table, cleaners=None, convertor=None, validators=None, input_value=cooked_input.TABLE_VALUE, return_value=cooked_input.TABLE_VALUE, show_table=True, | ||
default=cur_val, prompt='Enter the name of color you want', value_error='a valid color name') | ||
print('color=%s' % (color)) | ||
|
||
color = get_table_input(table=table, cleaners=None, convertor=None, validators=None, input_value=io_get_input.TABLE_ID_OR_VALUE, return_value=io_get_input.TABLE_VALUE, show_table=True, | ||
color = get_table_input(table=table, cleaners=None, convertor=None, validators=None, input_value=cooked_input.TABLE_ID_OR_VALUE, return_value=cooked_input.TABLE_VALUE, show_table=True, | ||
prompt='Enter the name or id of the color you want', value_error='a valid color name or id') | ||
print('color=%s' % (color)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters