rsgalloway / pyseq

Compressed sequence string module for Python

Home Page:https://pyseq.rsgalloway.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pyseq.walk() isn't working on Python 3.x ?

KengoSawa2 opened this issue · comments

Hi Ryan.
Thank you for your work:)

I have question about pyseq.walk()

next code can working on Python 2.7.10(Mac OS X default python).
but can't working on Python 3.5.1 and 3.4.4

-- coding: utf-8 --
import pyseq

for root, dirs, seqs in pyseq.walk('/Volumes/Rapid_TEST_SSD2/SHOTLIST_TEST/multi_seq_test'):
for seq in seqs:
print(seq.path())

Error trace is here

Traceback (most recent call last):
File "/Users/lespace/python/pyseqtest.py", line 5, in
for root, dirs, seqs in pyseq.walk('/Volumes/Rapid_TEST_SSD2/SHOTLIST_TEST/multi_seq_test'):
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pyseq.py", line 1027, in walk
assert isinstance(source, basestring) is True
NameError: name 'basestring' is not defined

I searched in google.
'basestring' does not support in python3.
'pyseq' is not supported in python3?

I want to treat a path that includes a multi-byte character of Japanese...

Hi Kengo, thanks for reporting this issue. Pull request #9 made pyseq Python 3 compatible, but looks like there was an update after that which broke that. I think this should be an easy fix. I'll create a branch to fix this issue so you can test it. If it's good, I'll merge it into the master branch.

Hi Kengo, please pull from the issue-23 branch and try again. Let me know if there are any other issues.

Hi Ryan

Thank you for your quick reply!

I tested issue-23 branch, It's no problem.
I can handle multi-byte sequence. I'm very glad!

It's my first pull:)
Forgive me if I am wrong..