![]() Pretty sure it had something to do with encoding though (because that's the worst about this whole migration). Instead of open if I remember correctly, though I cannot for the life of me right now remember what exactly was special about that. Will keep their hands off of anything that's already in the correct type. Two helper methods built into OctoPrint ( octoprint.util package) that should hopefully make it easier to ensure the expected data type. Not Python 3 specific, but something we switched to in the code base with the P圓 changes. Instead of just except: for broad catch-all blocks. I also have a post-it note attached to my main screen for more than a year now that currently says (from OctoPrint's code base): # -*- coding: utf-8 -*-įrom _future_ import absolute_import, division, print_function, unicode_literals What I've made good use of is this cheat sheet by the Python-Future project:Īnd in general it seems to be a good idea to turn on P圓 behaviour as far as possible in your source files through various from _future_ imports. I will add steps for this as soon as I can.ĭoes that support 2 and 3 concurrently? I always took it to be more a case of "once that's run the code won't run under Py2 anymore", which at least for now would be counter productive. The next step is making both of these environments work in your IDE.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |