Skip to content

Latest commit

 

History

History
23 lines (18 loc) · 757 Bytes

README.md

File metadata and controls

23 lines (18 loc) · 757 Bytes

vfp

Few python utils, f.e. file utils. Syntax of some of them is similar to visual foxpro.

.filetostr(filename)                        # read the file (in its coding)
.filelines(filename)                        # get lines of file as list
.strtofile(content, filename, additive)     # write str or encode&write unicode
.strtoutf8file(content, filename, additive) # write unicode or decode&write str
                                            #       into utf8 file
.suredir(path)                              # create dir if not present

see source code for more parameters and parameters details

how to instal

copy vfp.py somewhere into PYTHONPATH

import vfp
content = vfp.filetostr('/dirname/filename.txt')