Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

update REAME

  • Loading branch information...
commit d0fe30ccb7818517d13e5e05357a3745215ba922 1 parent 72abb84
Benoit Chesneau authored June 03, 2011

Showing 1 changed file with 15 additions and 2 deletions. Show diff stats Hide diff stats

  1. 17  README.rst
17  README.rst
Source Rendered
@@ -10,7 +10,7 @@ Project url: https://github.com/benoitc/http-parser/
10 10
 Requirements:
11 11
 -------------
12 12
 
13  
-- Python 2.6 or sup.
  13
+- Python 2.5 or sup. Pypy latest version.
14 14
 - Cython if you need to rebuild the C code
15 15
 
16 16
 Installation
@@ -25,6 +25,12 @@ Or install from source::
25 25
     $ git clone git://github.com/benoitc/http-parser.git
26 26
     $ cd http-parser && python setup.py install
27 27
 
  28
+
  29
+Note: if you get an error on MacOSX try to install with the following
  30
+arguments:
  31
+
  32
+    $ env ARCHFLAGS="-arch i386 -arch x86_64" python setup.py install
  33
+
28 34
 Usage
29 35
 -----
30 36
 
@@ -41,6 +47,9 @@ io.RawIOBase object.
41 47
 Example of HttpStream
42 48
 +++++++++++++++++++++
43 49
 
  50
+Note: HttpStream object works only with python 2.6 and sup (and pypy),
  51
+Only HttpParser object is available for Python 2.5.
  52
+
44 53
 ex::
45 54
     
46 55
     #!/usr/bin/env python
@@ -72,7 +81,11 @@ Example of HttpParser:
72 81
     #!/usr/bin/env python
73 82
     import socket
74 83
 
75  
-    from http_parser.parser import HttpParser
  84
+    # try to import C parser then fallback in pure python parser.
  85
+    try:
  86
+        from http_parser.parser import HttpParser
  87
+    except ImportError:
  88
+        from http_parser.pyparser import HttpParser
76 89
 
77 90
 
78 91
     def main():

0 notes on commit d0fe30c

Please sign in to comment.
Something went wrong with that request. Please try again.