python-printr-4.9


توضیحات

printr
ویژگی مقدار
سیستم عامل -
نام فایل python-printr-4.9
نام python-printr
نسخه کتابخانه 4.9
نگهدارنده []
ایمیل نگهدارنده []
نویسنده -
ایمیل نویسنده -
آدرس صفحه اصلی https://github.com/xjxckk/python-printr/
آدرس اینترنتی https://pypi.org/project/python-printr/
مجوز -
### python-printr Python print functions to beautify output Installation: `pip install python-printr` Usage: ``` from printr import logger logger = logger(filename='test.log') log, current_time = logger.log, logger.current_time log('Here') # Prints to terminal and saves message to test.log ``` ``` from printr import print, same_line, current_time test_list = [{'id': 1, 'name': 'Leanne Graham', 'username': 'Bret', 'email': 'Sincere@april.biz', 'address': {'street': 'Kulas Light', 'suite': 'Apt. 556', 'city': 'Gwenborough', 'zipcode': '92998-3874', 'geo': {'lat': '-37.3159', 'lng': '81.1496'}}, 'phone': '1-770-736-8031 x56442', 'website': 'hildegard.org', 'company': {'name': 'Romaguera-Crona', 'catchPhrase': 'Multi-layered client-server neural-net', 'bs': 'harness real-time e-markets'}}, {'id': 2, 'name': 'Ervin Howell', 'username': 'Antonette', 'email': 'Shanna@melissa.tv', 'address': {'street': 'Victor Plains', 'suite': 'Suite 879', 'city': 'Wisokyburgh', 'zipcode': '90566-7771', 'geo': {'lat': '-43.9509', 'lng': '-34.4618'}}, 'phone': '010-692-6593 x09125', 'website': 'anastasia.net', 'company': {'name': 'Deckow-Crist', 'catchPhrase': 'Proactive didactic contingency', 'bs': 'synergize scalable supply-chains'}}] print(test_list) # Formats dictionary with indents print() # Print a line break same_line('test', current_time=True) # Print the current_time with the message test to the same line sleep(1) same_line('testing', current_time=True) # Print the current_time with the message testing to the same line ``` Output: ``` [ { "id": 1, "name": "Leanne Graham", "username": "Bret", "email": "Sincere@april.biz", "address": { "street": "Kulas Light", "suite": "Apt. 556", "city": "Gwenborough", "zipcode": "92998-3874", "geo": { "lat": "-37.3159", "lng": "81.1496" } }, "phone": "1-770-736-8031 x56442", "website": "hildegard.org", "company": { "name": "Romaguera-Crona", "catchPhrase": "Multi-layered client-server neural-net", "bs": "harness real-time e-markets" } }, { "id": 2, "name": "Ervin Howell", "username": "Antonette", "email": "Shanna@melissa.tv", "address": { "street": "Victor Plains", "suite": "Suite 879", "city": "Wisokyburgh", "zipcode": "90566-7771", "geo": { "lat": "-43.9509", "lng": "-34.4618" } }, "phone": "010-692-6593 x09125", "website": "anastasia.net", "company": { "name": "Deckow-Crist", "catchPhrase": "Proactive didactic contingency", "bs": "synergize scalable supply-chains" } } ] 14:25:49:620170: test # One second later this line was overwritten with testing 14:25:50:620170: testing ```


نحوه نصب


نصب پکیج whl python-printr-4.9:

    pip install python-printr-4.9.whl


نصب پکیج tar.gz python-printr-4.9:

    pip install python-printr-4.9.tar.gz