Exemplo n.º 1
0
def save(
    fn: str,
    gpx: GPX,
) -> None:
    with open(fn, 'w') as fh:
        gpx.write_to_file(fh)
Exemplo n.º 2
0
def save_gpx(data: GPX, filepath: str):
    print_info("Saving GPX file to: {}".format(os.path.realpath(filepath)))
    with open(filepath, 'w') as outfile:
        # outfile.write(data.to_xml())
        data.write_to_file(outfile)
    print_info("{} tracks saved".format(len(data.tracks)))