socket problem and html problem

2010-10-11 Thread bussiere bussiere
here is my code and two questions : why it says to me that i can't bind the socket ? normally it had closed it and kill it :/ and why it returns me plain text and not html ? Regards and a pack of mm's to the one who will help me on this two questions. import socket import sys # Create a TCP/IP

EOF while scanning triple-quoted string literal

2010-10-11 Thread bussiere bussiere
i've looked on the web and here but i didn't find an answer : here is my code zlib.decompress( xワᆳヤ=ラᄇHナs~Ʀᄑç\ムîà z...@ÑÁÔqÇlxÇÆïpp~ývãì゙m6ÛÐ|ê֭ᄁᄂヤ=)}éÓUe﬿ö3ᄎᄌú}ʿïÿ÷1þ8ñ́U÷ᄏñíLÒVi:`ᄈᄎL!Ê҆p6-%Fë^ヘ÷à,Q.K!ユô`ÄA!ÑêweÌ ÊÚAロYøøÂjôóᅠÂcñ䊧fᆴùテúN

inspect the call stack

2010-09-10 Thread bussiere bussiere
i v'e got this : i've got toto.py : import titi def niwhom(): pass and titi.py : def nipang(): pass how can i know in titi.py that's it's toto.py that is calling titi.py and the path of toto ? how can i inspect the call stack or an other way ?

Re: include a file in a python program

2010-09-08 Thread bussiere bussiere
Thanks all for your response i will try out this week, you have give me sufficient hints. Thanks again. Bussiere -- http://mail.python.org/mailman/listinfo/python-list

knowing the caller of an import exec question

2010-09-07 Thread bussiere bussiere
i've got toto.py : import titi def niwhom(): pass and titi.py : def nipang(): pass how can i know in titi.py that's it's toto.py that is calling titi.py and the path of toto ? And why : bidule.py : class bidetmusique: pass truc.py : X = __import__(bidule) why

include a file in a python program

2010-09-05 Thread bussiere bussiere
i've got a python.txt that contain python and it must stay as it (python.txt) how can i include it in my program ? import python.txt doesn't work is there a way : a) to make an include(python.txt) b) tell him to treat .txt as .py file that i can make an import python ? i'am using python3 Regards

Re: dirty problem 3 lines

2010-09-02 Thread bussiere bussiere
It seems to work perfectly thanks a lot Bussiere Google Fan boy On Thu, Sep 2, 2010 at 7:32 AM, alex23 wuwe...@gmail.com wrote: bussiere bussiere bussi...@gmail.com wrote: it's just as it seems : i want to know how does ti works to get back an object from a string in python : pickle.loads

Re: [Pickle]dirty problem 3 lines

2010-09-01 Thread bussiere bussiere
it's just as it seems : i want to know how does ti works to get back an object from a string in python : pickle.loads(b'\x80\x03]q\x00(K\x00K\x01e.') #doesn't work Google Fan boy On Wed, Sep 1, 2010 at 5:23 AM, MRAB pyt...@mrabarnett.plus.com wrote: On 01/09/2010 03:33, bussiere bussiere wrote

[Pickle]dirty problem 3 lines

2010-08-31 Thread bussiere bussiere
i know it's dirty, i know i should use json but i want to know, it's quiet late here : import pickle dump = b'\x80\x03]q\x00(K\x00K\x01e.' print(pickle.loads(dump)) how can i get back my object from this string ? the string is : b'\x80\x03]q\x00(K\x00K\x01e.' and i'am using python3 help will be

encoding problems (é and è)

2006-03-23 Thread bussiere bussiere
hi i'am making a program for formatting string, or i've added : #!/usr/bin/python # -*- coding: utf-8 -*- in the begining of my script but str = str.replace('Ç', 'C') str = str.replace('é', 'E') str = str.replace('É', 'E') str = str.replace('è', 'E') str =