rsgalloway / pyseq

Compressed sequence string module for Python
https://pyseq.rsgalloway.com/
Other
123 stars 36 forks source link

Uncompress not working for documented example #34

Closed mattdw closed 7 years ago

mattdw commented 7 years ago

The example in uncompress at https://github.com/rsgalloway/pyseq/blob/master/pyseq.py#L824

>>> seq2 = uncompress('./tests/files/a.%03d.tga 1-3 10 12-14', fmt='%h%p%t %R')

…always gives me None rather than a sequence. The %R regex seems to be looking for surrounding literal [ ], but I'm just not quite sure what the intent there is. I'd be happy to write a patch if you're able to point me in the right direction for a fix!

(This is my preferred format, and closest to Nuke's handling, so it would be great to get it working.)

Cheers, Matt.

nebukadhezer commented 7 years ago

Hey,

The docstring seems old, the syntax changed you can see that in the unittests: https://github.com/rsgalloway/pyseq/blob/master/tests/test_pyseq.py#L445

seq2 = uncompress( './tests/files/a.%03d.tga [1-3, 10, 12-14]', fmt='%h%p%t %R' )

So the numbers ought to be in square brackets. Thanks for pointing that out, I ll make a merge request with the changed docstring.

Cheers Johannes

rsgalloway commented 7 years ago

Thanks, Johannes. Closing this out.