How do I get a full path as an output in sl4a?

52 views Asked by At

Please refer to the following link first:

File dialog in python sl4a

If I modify the return statement to the following:

return '{}'.format(target_path)

And add the script to run the main function and modifying the function show_dir(path=base_dir) to main(path=base_dir) and call the main using the script below

if __name__ == '__main__':
    print(main())

The output shows of the dialog box shows what I want as output:

/sdcard/qpython/projects3/StudentIDCard/rva_student_data.xlsx,

However the console output shows only:

/sdcard

I am at a loss why the two outputs are different?

I need the full path information to the file as the output for further processing.

How do I get that?

0

There are 0 answers