Hello
Le 03/05/2010 04:01, Forgeot Eric a écrit :
>
> I've patched my current txt2tags (devel version with some beamer patch
> also I think), and while it's working fine with python 2.6.5 on Linux, I
> had some errors with python 2.5.5 skipped with cygwin on windows:
>
> python ../txt2tags -t xhtml --toc --outfile sample_en.html sample_en.t2t
> Sorry! Txt2tags aborted by an unknown error.
> Please send the following Error Traceback to the author (########):
>
> Traceback (most recent call last):
> File "../txt2tags_old", line 5800, in <module>
> exec_command_line()
> File "../txt2tags_old", line 5794, in exec_command_line
> convert_this_files(infiles_config)
> File "../txt2tags_old", line 4723, in convert_this_files
> target_body, marked_toc = convert(source_body, myconf,
> firstlinenr=first_body_line)
> File "../txt2tags_old", line 5303, in convert
> line = add_inline_tags(line)
> File "../txt2tags_old", line 4797, in add_inline_tags
> line = parse_images(line)
> File "../txt2tags_old", line 4761, in parse_images
> txt = os.path.relpath(imgpath,os.path.dirname(CONF['outfile']))
> AttributeError: 'module' object has no attribute 'relpath'
>
>
>
From the python doc:
os.path.relpath(path[, start])
Return a relative filepath to path either from the current
directory or from an optional start point.
start defaults to os.curdir. Availability: Windows, Unix.
==> New in version 2.6.
clearly, this patch will not work for python 2.5, but the function
relpath is *so* handy for the incl...@include feature... Maybe the 2.6
code for this function can be copied/pasted here...
Regards,
Emmanuel
------------------------------------------------------------------------------
_______________________________________________
txt2tags-list mailing list
https://lists.sourceforge.net/lists/listinfo/txt2tags-list