Andrew2012-05-15 17:30:15
Andrew, 2012-05-15 17:30:15

1C unload parser in python?

Good afternoon! Many probably know a system called 1C, and, for sure, many have come across it)
There was a problem - you need to parse the upload with goods from 1C to python, so that you can then load it into the django database. Maybe someone had ready-made solutions? Or is 1C such a universal tool that each upload is unique?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
Andrey Velichko, 2014-01-03

Here is the code that helped me rename Russian tags to English:
infile = open('ex.xml')
outfile = open('out.xml', 'w')
replacements = {'Sentence':'mynum', 'Id' :'id',}
for line in infile:
for src, target in replacements.iteritems():
line = line.replace(src, target)

Vladislav Klimanov, 2012-05-15

I unloaded xml from 1C, python replaced tags from Russian to English and parsed as xml.
Perhaps there is a more elegant solution, but time was running out.

TyVik, 2012-05-15

I once wrote an export of the entire database from 1C dbf files to MySQL (in python). If this option is suitable, then write in a personal - I will throw off the source code and comment on the code.

Michael, 2012-05-15

this is the commerzeml format. It is open and I saw a description for it on the net. For oscommerze even saw the importer of goods orders and prices.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question