You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is the ability - given a copy of txt2tags in the PYTHONPATH with a .py
extension - to, from within a Python script, import txt2tags as a module and
pass a list of strings (each one corresponding to a line) and to receive as a
return value a similar list representing the output file. There seems to have
already been some work done working towards this, but (at least as far as I can
tell) it isn't quite there yet.
This was quite simple for me to fix - there were two functions,
"process_source_file" and "convert_this_files", which accepted an optional
parameter specifying the contents of a file. This parameter simply wasn't
passed in by the "exec_command_line" and "get_infiles_config" functions.
Though this patch did pass the tests to the same degree as r643 does (flying
colors except the sample module complains about the aap target and the art
module complains about the aat target) and it does work with one "virtual"
file, I would be very uncertain about attempting to use multiple such files.
Also, to avoid the Python misfeature of mutable default arguments of a function
not being emptied with multiple calls to said function, both default arguments
to "exec_command_line" are now tuples instead of lists, though they are
immediately converted to lists.
Original issue reported on code.google.com by joker...@bellsouth.net on 29 Dec 2010 at 6:01
I believe what the original reporter was trying to accomplish is now possible in txt2tags. The code under samples/module/ shows how to do it. One of the two files is currently broken. I'll try to fix this.
Original issue reported on code.google.com by
joker...@bellsouth.net
on 29 Dec 2010 at 6:01Attachments:
The text was updated successfully, but these errors were encountered: