Advertisement
Guest User

Untitled

a guest
Jul 7th, 2015
307
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.75 KB | None | 0 0
  1. $ python
  2. Python 2.7.6 (default, Jun 22 2015, 17:58:13)
  3. [GCC 4.8.2] on linux2
  4. Type "help", "copyright", "credits" or "license" for more information.
  5. >>> img = cStringIO.StringIO(open('st.jpg', 'rb').read())
  6. Traceback (most recent call last):
  7.   File "<stdin>", line 1, in <module>
  8. NameError: name 'cStringIO' is not defined
  9. >>> import cStringIO
  10. >>> img = cStringIO.StringIO(open('st.jpg', 'rb').read())
  11. >>> img2 = cStringIO.StringIO(open('st.jpg', 'rb').read())
  12. >>> if img == img2
  13.   File "<stdin>", line 1
  14.     if img == img2
  15.                  ^
  16. SyntaxError: invalid syntax
  17. >>> if img.getvalue() == img2.getvalue()
  18.   File "<stdin>", line 1
  19.     if img.getvalue() == img2.getvalue()
  20.                                        ^
  21. SyntaxError: invalid syntax
  22. >>>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement