[CRIU] [PATCH 2/7] pycriu: add python package, v3

Pavel Emelyanov xemul at parallels.com
Tue Dec 2 06:32:39 PST 2014


On 12/02/2014 05:26 PM, Ruslan Kuprieiev wrote:
> On 12/02/2014 04:20 PM, Pavel Emelyanov wrote:
>>>> Let's make this call be ParseFromFile and pass here not
>>>> sting, but an object from which we can read().
>>>>
>>>
>>> It might be useful to have both ParseFromString and ParseFromFile.
>>> I'll take a look.
>>
>> Having a filename at hands in criu_image class can be used to
>> auto-detect the format by the filename "extension". E.g. the .img
>> is the criu image, .txt is human-readable, .json is JSON and .xml
>> is youknowwhat.
>>
>> So the convertion would look like
>>
>> crit convert --in reg-files.txt --out reg-files.img and it's
>> clear what user wants.
>>
> 
> But CRIT allows us to use stdin\stdout by default, and they don't have
> any extensions. Currently we are eading first few bites and judging
> from them what type it is, which makes extension analysis redundant.

Absolutely :) These will be just two ways of doing things.



More information about the CRIU mailing list