[Tutor] code to generate my own text captchas
Hello all, I am looking for simple python code that will take a given string and distort it, captcha like. it is for artistic purposes, so no verification required. I just need the image q text distortion code. Thanks!!! tsila -- -- missdata.org ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
[Tutor] problems to install python 2.5
Hello all I downloaded Python 2.5 (final release) from python.org. I am trying to install it on my Mac 0s 10.4 the current working version i have of python is 2.3 (also built as a framework) It goes through the ./configure part ok, but the make install produces the following errors : Modules/posixmodule.c:22: warning: ignoring #pragma weak lchown Modules/posixmodule.c:23: warning: ignoring #pragma weak statvfs Modules/posixmodule.c:24: warning: ignoring #pragma weak fstatvfs Modules/posixmodule.c: In function `posix_lchown': Modules/posixmodule.c:1681: warning: implicit declaration of function `lchown' Modules/posixmodule.c: In function `initposix': Modules/posixmodule.c:8588: error: `fstatvfs' undeclared (first use in this function) Modules/posixmodule.c:8588: error: (Each undeclared identifier is reported only once Modules/posixmodule.c:8588: error: for each function it appears in.) Modules/posixmodule.c:8596: error: `statvfs' undeclared (first use in this function) Modules/posixmodule.c:8604: error: `lchown' undeclared (first use in this function) make: *** [Modules/posixmodule.o] Error 1 I can't find any documentation of such a problem on the net, does anyone have a clue to what might be the problem ? thanks! Tsila ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] problems to install python 2.5
I also tried that build as well - it says that installation completed succesfully - and when i try to launch IDLE - it won't open... On 3/11/07, Kent Johnson [EMAIL PROTECTED] wrote: Tsila Hassine wrote: Hello all I downloaded Python 2.5 (final release) from python.org. I am trying to install it on my Mac 0s 10.4 the current working version i have of python is 2.3 (also built as a framework) It goes through the ./configure part ok, but the make install produces the following errors : No clue about your errors, but you can download a framework build of Python 2.5 from http://www.pythonmac.org/packages/py25-fat/index.html You might have better luck with build questions on the python-mac list: http://www.python.org/community/sigs/current/pythonmac-sig/ Kent ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] problems to install python 2.5
2.3 is still around indeed, but i launched the IDLE from the python 2.5folder, so i don't think that was the problem. on teh other hand - i discovered that when i type python2.5 in teh terminal window it launches indeed the python 2.5, but when running a script from the command line it goes to the 2.3 version in the Frameworks. - so what do i need to do ? add it to the PATH ? how do i do that ? On 3/11/07, Andre Roberge [EMAIL PROTECTED] wrote: On 3/11/07, Tsila Hassine [EMAIL PROTECTED] wrote: I also tried that build as well - it says that installation completed succesfully - and when i try to launch IDLE - it won't open... Could it be that the 2.3 version is still around and that you are trying to launch the 2.3 version of IDLE? This happened to me once. On 3/11/07, Kent Johnson [EMAIL PROTECTED] wrote: Tsila Hassine wrote: Hello all I downloaded Python 2.5 (final release) from python.org. I am trying to install it on my Mac 0s 10.4 the current working version i have of python is 2.3 (also built as a framework) It goes through the ./configure part ok, but the make install produces the following errors : No clue about your errors, but you can download a framework build of Python 2.5 from http://www.pythonmac.org/packages/py25-fat/index.html You might have better luck with build questions on the python-mac list: http://www.python.org/community/sigs/current/pythonmac-sig/ Kent ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] problems to install python 2.5
yes I did download that, and it went sorry can't update zshell (and yes I have zshell) so i didn't know how to deal with that any ideas ? (but then i guess its a completely different problem then ...) thanks! T. On 3/11/07, Clay Wiedemann [EMAIL PROTECTED] wrote: Did you download the MacPython 2.5 distribution? You should find an Update shell profile.command file, which you can run. I believe once you do that, you will be set up so that IDLE will launch and you will default to version 2.5. On 3/11/07, Tsila Hassine [EMAIL PROTECTED] wrote: Hello all I downloaded Python 2.5 (final release) from python.org. I am trying to install it on my Mac 0s 10.4 the current working version i have of python is 2.3 (also built as a framework) It goes through the ./configure part ok, but the make install produces the following errors : Modules/posixmodule.c:22: warning: ignoring #pragma weak lchown Modules/posixmodule.c:23: warning: ignoring #pragma weak statvfs Modules/posixmodule.c:24: warning: ignoring #pragma weak fstatvfs Modules/posixmodule.c: In function `posix_lchown': Modules/posixmodule.c:1681: warning: implicit declaration of function `lchown' Modules/posixmodule.c: In function `initposix': Modules/posixmodule.c:8588: error: `fstatvfs' undeclared (first use in this function) Modules/posixmodule.c:8588: error: (Each undeclared identifier is reported only once Modules/posixmodule.c:8588: error: for each function it appears in.) Modules/posixmodule.c:8596: error: `statvfs' undeclared (first use in this function) Modules/posixmodule.c:8604: error: `lchown' undeclared (first use in this function) make: *** [Modules/posixmodule.o] Error 1 I can't find any documentation of such a problem on the net, does anyone have a clue to what might be the problem ? thanks! Tsila ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor -- - - - - - - - Clay S. Wiedemann voice: 718.362.0375 aim: khlav wii: 3905 4571 6175 2469 twitter: seastokes ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
[Tutor] ssl error when trying to connect to https (also using timeoutsocket.py)
Hello all, in my code i am importing timeoutsocket in order to set the time out of a connection. When i try to acces an https site I get the error: TypeError: ssl() argument 1 must be _socket.socket, not _socketobject when I am not using the timeoutsocket module, I don't have any problems. how can i solve this ? (I still need to be able to set the timeout of a connection...) thanks, Tsila ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
[Tutor] IOError: decoder jpeg not available
Dear fellow Pythoneers, I have recently upgraded to Mac 10.4, and since then this error appears when trying to manipulate an image (resize it actually), can anyone help me out ? thanks! Tsila ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] IOError: decoder jpeg not available
Hello all! sorry - pretty much of a novice here's a snippet I am running from the Python interactive interface - and the error I am getting: import Image, imghdr im=Image.open('test406.jpg') new_image=im.resize((100.0,100.0), Image.ANTIALIAS) Traceback (most recent call last): File stdin, line 1, in ? File /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/PIL/Image.py, line 1188, in resize self.load() File /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/PIL/ImageFile.py, line 180, in load d = Image._getdecoder(self.mode, d, a, self.decoderconfig) File /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/PIL/Image.py, line 328, in _getdecoder raise IOError(decoder %s not available % decoder_name) IOError: decoder jpeg not available I seem to have PIL in stalled in 2 different locations (don't know if that may cause the problem): 1: ./Library/Python/2.3/PIL 2: ./Library/Python/2.3/site-packages/PIL when I tried to reinstall imaging1.1.5 I got the following : --- TKINTER support ok *** JPEG support not available --- ZLIB (PNG/ZIP) support ok *** FREETYPE2 support not available although I have jpeg-6b in ./jpeg6-and I also re installed adn got the following : % make -n install /usr/bin/install -c cjpeg /usr/local/bin/cjpeg /usr/bin/install -c djpeg /usr/local/bin/djpeg /usr/bin/install -c jpegtran /usr/local/bin/jpegtran /usr/bin/install -c rdjpgcom /usr/local/bin/rdjpgcom /usr/bin/install -c wrjpgcom /usr/local/bin/wrjpgcom /usr/bin/install -c -m 644 ./cjpeg.1 /usr/local/man/man1/cjpeg.1 /usr/bin/install -c -m 644 ./djpeg.1 /usr/local/man/man1/djpeg.1 /usr/bin/install -c -m 644 ./jpegtran.1 /usr/local/man/man1/jpegtran.1 /usr/bin/install -c -m 644 ./rdjpgcom.1 /usr/local/man/man1/rdjpgcom.1 /usr/bin/install -c -m 644 ./wrjpgcom.1 /usr/local/man/man1/wrjpgcom.1 I hope this provides some further insite thanks, Tsila On 2/28/07, Hugo González Monteverde [EMAIL PROTECTED] wrote: Hi, It looks like there is a capability you don't have installed in your image processing lib. but you really give us nothing. Please tell us: - Was this working before in any other operating system or python version? - What module are you using for working with jpeg? - Show us the code that throws this exception, or how you use it.. And maybe we'll have some info to help you out. Tsila Hassine wrote: Dear fellow Pythoneers, I have recently upgraded to Mac 10.4, and since then this error appears when trying to manipulate an image (resize it actually), can anyone help me out ? ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] IOError: decoder jpeg not available
Hello again, Problem finally solved : had to reinstall and rebuild PIL (from tar) - this time pointing the setup.py to the right location of jpeg-6b library, and ONLY THEN running setup.py build_ext -i of Imaging1.1.6 hope someone can make use of this, Tsila On 3/1/07, Tsila Hassine [EMAIL PROTECTED] wrote: Hello all! sorry - pretty much of a novice here's a snippet I am running from the Python interactive interface - and the error I am getting: import Image, imghdr im= Image.open('test406.jpg') new_image=im.resize((100.0,100.0), Image.ANTIALIAS) Traceback (most recent call last): File stdin, line 1, in ? File /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/PIL/Image.py, line 1188, in resize self.load() File /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/PIL/ImageFile.py, line 180, in load d = Image._getdecoder(self.mode, d, a, self.decoderconfig ) File /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/PIL/Image.py, line 328, in _getdecoder raise IOError(decoder %s not available % decoder_name) IOError: decoder jpeg not available I seem to have PIL in stalled in 2 different locations (don't know if that may cause the problem): 1: ./Library/Python/2.3/PIL 2: ./Library/Python/2.3/site-packages/PIL when I tried to reinstall imaging1.1.5 I got the following : --- TKINTER support ok *** JPEG support not available --- ZLIB (PNG/ZIP) support ok *** FREETYPE2 support not available although I have jpeg-6b in ./jpeg6-and I also re installed adn got the following : % make -n install /usr/bin/install -c cjpeg /usr/local/bin/cjpeg /usr/bin/install -c djpeg /usr/local/bin/djpeg /usr/bin/install -c jpegtran /usr/local/bin/jpegtran /usr/bin/install -c rdjpgcom /usr/local/bin/rdjpgcom /usr/bin/install -c wrjpgcom /usr/local/bin/wrjpgcom /usr/bin/install -c -m 644 ./cjpeg.1 /usr/local/man/man1/cjpeg.1 /usr/bin/install -c -m 644 ./djpeg.1 /usr/local/man/man1/djpeg.1 /usr/bin/install -c -m 644 ./jpegtran.1 /usr/local/man/man1/jpegtran.1 /usr/bin/install -c -m 644 ./rdjpgcom.1 /usr/local/man/man1/rdjpgcom.1 /usr/bin/install -c -m 644 ./wrjpgcom.1 /usr/local/man/man1/wrjpgcom.1 I hope this provides some further insite thanks, Tsila On 2/28/07, Hugo González Monteverde [EMAIL PROTECTED] wrote: Hi, It looks like there is a capability you don't have installed in your image processing lib. but you really give us nothing. Please tell us: - Was this working before in any other operating system or python version? - What module are you using for working with jpeg? - Show us the code that throws this exception, or how you use it.. And maybe we'll have some info to help you out. Tsila Hassine wrote: Dear fellow Pythoneers, I have recently upgraded to Mac 10.4, and since then this error appears when trying to manipulate an image (resize it actually), can anyone help me out ? ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
[Tutor] dealing with 406 HTTP response
Dear pythoners, has anybody dealt with a 406 reponse through a urllib.FancyURLopener class ? I have a code that downloads images from websites and soemsites respond with an 406 which I don't know how to handle thanks! Tsila ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
[Tutor] checking for robots on a python script based site
Hello All!I have a site that takes some input from the user and then produces a dynamic page based on the input. In the last months bots (not only search engine ones) have been hitting the site pretty heavily, so my sys admin disabled it. As far as I know there are 2 options to fight this : 1: write a robots.txt file - but then I'd have to rely on the bots' good will.2: implement a captcha mechanism, which I am not sure I want. Does Python provide anything to deal with such problems ? thanks, Tsila ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor