SEの海馬
BlogTagsAbout
Blog
Tags
About
Published on
2020年12月31日木曜日

pythonでBinaryとBytesを相互変換

Authors
  • avatar
    Name
    Kikusan
    Twitter
        wavfile = open(config.WAV, 'rb') #read bynary
        print(type(wavfile))
        bwav = wavfile.read() # InmemoryStream to bytes
        print(type(bwav))
        wavfile2 = BytesIO(bwav) # bytes to InmemoryStream
        print(type(wavfile2))
    
    Discuss on Twitter

    Tags

    Python

    Previous Article

    PythonのList内包表記について

    Next Article

    Pythonの*argsとタプルについて
    ← Back to the blog
    github
    kikusan
    •
    © 2025
    •
    SEの海馬