IRC logs of #tryton for Sunday, 2016-08-21

chat.freenode.net #tryton log beginning Sun Aug 21 00:00:01 CEST 2016
2016-08-21 00:05 -!- sebd(~seb@aditu.ldd.fr) has joined #tryton
2016-08-21 00:32 -!- cedk(~ced@gentoo/developer/cedk) has joined #tryton
2016-08-21 02:37 -!- shrox(shrox@nat/iiit/x-qpuesxmupejfgpyz) has joined #tryton
2016-08-21 03:09 -!- cedk(~ced@gentoo/developer/cedk) has joined #tryton
2016-08-21 04:01 -!- kstenger(~karla@r190-134-148-229.dialup.adsl.anteldata.net.uy) has joined #tryton
2016-08-21 08:41 -!- cch__(~clews@188-23-206-131.adsl.highway.telekom.at) has joined #tryton
2016-08-21 08:43 -!- cedk(~ced@gentoo/developer/cedk) has joined #tryton
2016-08-21 08:45 -!- rpit(~rpit@aftr-37-24-146-168.unity-media.net) has joined #tryton
2016-08-21 08:51 -!- cedk(~ced@gentoo/developer/cedk) has joined #tryton
2016-08-21 10:40 -!- udono(~udono@ip-37-201-245-214.hsi13.unitymediagroup.de) has joined #tryton
2016-08-21 11:01 -!- scrapper(~scrapper@88.117.159.6) has joined #tryton
2016-08-21 12:11 -!- Telesight(~anthony@4dae0c97.ftth.telfortglasvezel.nl) has joined #tryton
2016-08-21 17:01 -!- rpit(~rpit@2a02:908:e674:5940:56ee:75ff:fe0d:d3c7) has joined #tryton
2016-08-21 17:10 -!- shrox1(shrox@nat/iiit/x-ioujlhteoodweytg) has joined #tryton
2016-08-21 17:17 <shrox1> cedk: "I do not think it is a good API to work with filename, it is better to work with file object like that is can be used with in-memory data." How do I proceed?
2016-08-21 17:18 <shrox1> cedk: I don't know how to take an input FOD if not by filename.
2016-08-21 17:21 <cedk> shrox1: I'm talking about the API, not the command line
2016-08-21 17:22 <shrox1> /msg nickserv identify shrox ircisnice
2016-08-21 17:23 <shrox1> cedk: What change do you want me to do?
2016-08-21 17:24 <cedk> shrox1: to not work at API level with filename
2016-08-21 17:25 <shrox1> cedk: I don't know what you mean by API level. If you can tell me in terms of what I'm doing right now, I'll understand better.
2016-08-21 17:26 <cedk> shrox1: by API, I mean when function are called
2016-08-21 17:27 -!- hispanic1234(0e8b5206@gateway/web/cgi-irc/kiwiirc.com/ip.14.139.82.6) has joined #tryton
2016-08-21 17:32 <shrox1> cedk: Okay. So I will use the file name only in __main__ ?
2016-08-21 17:33 <shrox1> cedk: but if I want to import fod2od and use convert directly, I won't be able to do so using only the filename
2016-08-21 17:33 <cedk> shrox1: yes, __main__ should only be boilerplat between command line and API
2016-08-21 17:34 <cedk> shrox1: often filename usage for API is useless
2016-08-21 17:34 <cedk> shrox1: but using fileobject API, it is easy to convert filename in such object
2016-08-21 17:35 -!- shrox(shrox@nat/iiit/x-cppsxwzggxakzrgj) has joined #tryton
2016-08-21 17:37 <shrox> cedk: the only concern I have is for when fod2py is imported into another program. __main__ will not be accessed, so the argument for convert will have to change accordingly.
2016-08-21 17:38 <cedk> shrox: I do not understand
2016-08-21 17:39 <cedk> shrox: __main__ will contain only simple boilerplt
2016-08-21 17:42 <shrox> cedk: I simply mean that this will not work if the filename is not an argument for convert - http://pastebin.ubuntu.com/23075850/
2016-08-21 17:44 <cedk> shrox: I do not understand what you mean
2016-08-21 17:45 <shrox> cedk: __name__ == _main_ only when fod2od is the main program, correct?
2016-08-21 17:46 <shrox> cedk: so if fod2od is *not* the main program, the file name cannot be used to identify the file if I the convert function does not use it as an argument
2016-08-21 17:48 <cedk> shrox: but I also think the method should not write file
2016-08-21 17:48 <cedk> shrox: it should be done in __main__ also
2016-08-21 17:48 <cedk> shrox: this is still API
2016-08-21 17:50 <shrox> cedk: Should I use StringIO in __main__ and then pass that as an argument for convert function?
2016-08-21 17:50 <cedk> shrox: Why?
2016-08-21 17:50 <cedk> shrox: for me, fileobject-like is enough
2016-08-21 17:52 <shrox> cedk: I'm sorry, I do not know what you mean by fileobject-like.
2016-08-21 17:55 <cedk> shrox: it is any kind of object who has the same API as fileobject
2016-08-21 17:55 <cedk> shrox: https://docs.python.org/2/library/stdtypes.html#bltin-file-objects
2016-08-21 17:56 <shrox> cedk: Okay, so you only want me to use the filename and get the file object in __main__ itself and not in parse_fod as I am doing right now?
2016-08-21 18:02 <cedk> shrox: yes
2016-08-21 18:03 <shrox> cedk: Okay. That's easy to do, haha.
2016-08-21 18:41 -!- nramirezuy(~nramirezu@r167-62-105-140.dialup.adsl.anteldata.net.uy) has joined #tryton
2016-08-21 21:01 -!- LordVan(~lordvan@gentoo/developer/LordVan) has joined #tryton
2016-08-21 22:12 -!- nicoe(~nicoe@109.132.45.119) has joined #tryton
2016-08-21 22:33 -!- shrox(shrox@nat/iiit/x-sbmhknkcvlfjuhzr) has joined #tryton

Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!