Closed alex-left closed 6 years ago
Hi,
Thank you for your commit, I appreciate. I would change the way to print using a centralized function with log level, etc. But I don't know when I will do it so meanwhile, I can merge your PR.
I have some questions before to merge it. Why to you print using double parenthesis sometimes ? It works with simple parenthesis as well.
And another thing, I have tried out.strip().decode().split('\n')
on python 3.5 and it does not work with "decode". However, without it, it works.
I really want to keep the python 2.7 compatibility so maybe adding these particular synthax on a try/except would be better for me:
try:
loop = out.strip().decode().split('\n')
except:
loop = out.strip().split('\n')
for file in loop:
....
Thank you.
Hi!!! The double parenthesis is because I have not modified the print statements by hand, was via "2to3". The "decode" matter, i'm sorry, I needed this change in python3 but I forget absolutely to python2. The try block is better option.
Regards!
El vie., 29 jun. 2018 a las 17:36, AlessandroZ (notifications@github.com) escribió:
Hi,
Thank you for your commit, I appreciate. I would change the way to print using a centralized function with log level, etc. But I don't know where I will do it so meanwhile, I can merge your PR. I have some questions before to merge it. Why to you print using double parenthesis sometimes ? It works with simple parenthesis as well. And another thing, I have tried out.strip().decode().split('\n') on python 3.5 and it does not work with "decode". However, without it, it works. I really want to keep the python 2.7 compatibility so maybe adding these particular synthax on a try/except would be better for me:
try: loop = out.strip().decode().split('\n') except: loop = out.strip().split('\n')
for file in loop: ....
Thank you.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/AlessandroZ/BeRoot/pull/9#issuecomment-401391550, or mute the thread https://github.com/notifications/unsubscribe-auth/AWOyi6W2DRquvYKqvrlvVbyYe2hm50N3ks5uBklhgaJpZM4U7rAq .
Sorry I close the issue. I changed the way to print the result. I tested it on python 2 and python 3.5 and it works ok now. Thanks again for your PR and sorry to not merge it.
only tested in linux