I have content file is result form api with format like :
My code is
def display_my_file(self):
url = self.url
token = self.token
request = Request(url)
request.add_header('X-Authentication', '%s' % token)
print "================>", request
res = response.read()
print "==============>", res
res =
"=L���cl�.�k�/��X�����R��SE$�\5������j�
�+�"��pH+IEM=\�đ��{��NH:=c�����;�+a���Z�mCj�Bٮ���1˺��⾣�k��
��e]�9]�h�jE4ſ]�`H�5�PP��#O��r�`��7���V\�l��ս�U�D�Wm3M�i#Z�E���TNS�5EE��UTr�oD��{=\� +{
���e�[��Kt���TIZ����>�zl:��k�,�$��Xpk�;+$rܠ��L�^�!ץ�P�P�u5TR�q��]��*K���{����Ne�M�65�2�*.UpH�Sj,�-��b��lld��0�|��|���2E�Z|��op;p�L-��=2�5x)Qnj
�0�|2'E$)��3��}偢����f����4m���jv���\��E��ME����UB���ފԶ�v_%����|r'خ�i�掞^�w5Q��U*mAf�鋝�S�����F=���^��� k���ʯaXh�ߩv�y�I"�V�X"f 8V�L髒���Gf(��t=�����>�BVjzޖ-AWE
�u�ŝ���4њ�F�#�}����Tln��)� �dj�Y��ș��D7+]m��um�PWIT���%��j�j���2���?Y����k7Z;���6ztN��������v��2�?��I���W��?��4Ժ�����g�gF�^I�x��N�
��-w�;����ʚg���&w������̹O�k+-���u�w${r��s�ᓭwҺ��5�u
��;dX�X��_�\����2�UE�U-T+�:�oڄn�d�O ��X�U^�%���y�xܱӬ}�&F��2˳����D�9��UkM�n ��!r��Ǝs�Qx�Rkf�T6}=Sel�OB����a�d��ͽ��";>�������QwX��u�,��Zб�֫�Er�s\�sW�����<65���8[��w5���F�Vԭ~$���OOY��RM-H���
o^cUh:-U[KU%\ԳӪ�jf�BRܴ�5����짓��W�9{��m%Z�=�Us���9� nө �ѕ
�z=�b��"W7��Ҷ�5��m��M�u'
� ��/iܤ�3���̷���A�����c�)��б�u
����\+�\*��6�4Nڶ�gH����[��j����[��j�1�\Uz��"�ٵ>���5¶��5U���Qx�[�)5TP,�K
��Xdb�U��uE�aS���lh�/dn���]��>
}�U5�L�e������YU�z����٩���ct�bX�ʾv��*�*����V�RHغ�9]�-�C�,z��N�Ij�1GoV�#k�j/dѶ��{l#��Y�TS�A�j+]�>V�8�5�n��mD��I^�㚴���@CP��f|�I�q��f�����m���X�3��]�qL/�4�>��}]T����l��7��=���Z_�u�Uk
�8t��GD����*�<
%�7: -�Ď�Z�[�H��#F#z���:�j:�h��5��)�����S�y�X�iU�-��U^|��B�ݵ
�F��R�[�tΊJ)�F�9*g�z�KV�멶�l��rT2�[$r�L*��+�����jm|�Av����MX���#��j��P�e~�YC�zzZaH��j�5Uq��Ǭ�>�h�Ք芪��R}��y��e|���B�%�����^*l�xu�������Ss�Ii��)�5��=��
�Y��v�,�������*�����9*�2�$��e��"%�i�D��Q���%���\�+�U[
�;}�
Y�T��;y���k����ț�F�w��B����(�ɧgdLf�l*�b�������\����U^|@���Ɵ[��)-0ջ�ܛ�N�n�+���o�r�P��j;��Ӵ�T��,��s�V��s�&w�f�upU��"�O�\��ՠl6���)����.VI�����!c����r�ES+a�H��"��k�J�]G�tվ�UD��t�$K��D�&��cԵT\������1۪|l{=��v�
}+�P�|����g
��̮��u�j�\R"�������`�1��EZ�w��uM�e����z�
ې![@��,3��-L������
a�N��U�
|ҫ��=Z�I۵}lMz�"$�rp\�)�Y��C]{餚�>
)���I)�z'��V����v;m�+(���ʉ�s���[�W���Ku\i=d��+�������oI#s�k��;����ݝ�ەs��_
\fT�QxذYi���
u"5p���NF㶟K�y(\�S?|��-o���� j[Ѫ*1fr�}ju�h�}ٷ5� �Ȏ�ʟ�}��~ڜ���:TJU{�Wr���)�u�O�r�soF��V��
-���]c��tk.W�v=C�(5#i|14�$��9��욦�[Y-�ii���.�������ZTX�t���&��^T���8�h�M�e�V�
�Dj����G�˳�����d�5q?~)gz�����9�5\�U���>��Tɸ>U���D���j��qt݉l6��:D����\��*�{�4M��TR=xJ�o��P+:})��ln�GW
P��:\.���k����*�ի�鞬Eo
����HJ:Mg�m����t����D�?q:�����f�.j��t^�=�9�W���4�I�X�L�mC��rwq�UǴ=�#�cH�2:%U�!�{8��tr�V�Cɴ�*�v�e���D�J
�i�c�!���%5="H�s�N�^�t�����q�^���
Q��3���j���a[��2d�N�y�1���2��W�V�����L�r�2�s����w�cw�W������q2�q8�l��[h������\�W+�g@aS&�N�4w�4��[��4�T�/lQ5��h��X�TcQ����Le{M������`7S�
c�����
�^f@�Q
Q�L�����cF@��cuA��ɐ0cq3���`7S���C
�0�D�d��
endstream
endobj
9 0 obj
<< /CreationDate (D:20190411114307+02'00')
>>
endobj
xref
0 10
0000000000 65535 f
0000551908 00000 n
0000553111 00000 n
0000553301 00000 n
0000553551 00000 n
0000560637 00000 n
0001036111 00000 n
0001036361 00000 n
0001043891 00000 n
0001500074 00000 n
trailer
<<
/Size 10
/Info 9 0 R
/ID [<057963B3DA5A00D2E31A814F6DF44B1F><057963B3DA5A00D2E31A814F6DF44B1F>]
>>
startxref
138
%%EOF"
and i want to read this content using browser ?**strong text**
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
1924
Views
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
1
Dec 19
|
1921 | ||
|
1
Nov 23
|
3155 | ||
|
1
Mar 23
|
4832 | ||
|
1
Aug 20
|
7708 | ||
|
2
Dec 19
|
14461 |