By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,034 Members | 1,325 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,034 IT Pros & Developers. It's quick & easy.

security code whit python

P: n/a
hii my friends;
I want to create picture of security code.can i do it ?
if yes,how , which module will help me?
have you got a example that can create a picture whit my name
pls help me
thansk
oruc

Nov 10 '07 #1
Share this Question
Share on Google+
13 Replies


P: n/a
is there anybody here !!!!!!!!!!!

Nov 10 '07 #2

P: n/a
* or*****@gmail.com (Sat, 10 Nov 2007 21:15:13 -0000)
is there anybody here !!!!!!!!!!!
The Internet has gone home. Come again tomorrow...

T.
Nov 10 '07 #3

P: n/a
whatttt!!!! :S

Nov 10 '07 #4

P: n/a
On 10 Nov, 16:04, "oruc...@gmail.com" <oruc...@gmail.comwrote:
hii my friends;
I want to create picture of security code.can i do it ?
if yes,how , which module will help me?
have you got a example that can create a picture whit my name
pls help me
thansk
oruc

You may find the Python Imaging Library (PIL) useful. See
http://www.pythonware.com/products/pil/. It has an extensive handbook
which includes drawing text on to an image.

regards, Paul Clinch

Nov 10 '07 #5

P: n/a
have you got any example?pls :S

Nov 10 '07 #6

P: n/a
or*****@gmail.com wrote:
I want to create picture of security code.can i do it ?
I don't know what you mean by "security code".

I take it you want to create technical diagrams, from a sort of
algorithmic description?

PIL might help you, as paulC pointed out. It works on raster images
(bitmaps).

pYx is a tool library for vector graphics and scientific plots. Maybe
that can help. I've produced nice looking graphics of search-trees
within about 60 minutes of installing it.

This example is copied right from the pyx site:

from pyx import *
c = canvas.canvas()
c.text(0, 0, "Hello, world!") # Put oruccim here, if you want
c.stroke(path.line(0, 0, 2, 0))
c.writeEPSfile("hello")
c.writePDFfile("hello")

<URL:http://pyx.sourceforge.net/>

/W

Nov 10 '07 #7

P: n/a
Wildemar Wildenburger <la*********@klapptsowieso.netwrites:
or*****@gmail.com wrote:
I want to create picture of security code.can i do it ?
I don't know what you mean by "security code".
I think that means a captcha (www.captcha.net).
Nov 10 '07 #8

P: n/a
On 10 Kas m, 23:57, Wildemar Wildenburger
<lasses_w...@klapptsowieso.netwrote:
oruc...@gmail.com wrote:
I want to create picture of security code.can i do it ?

I don't know what you mean by "security code".

I take it you want to create technical diagrams, from a sort of
algorithmic description?

PIL might help you, as paulC pointed out. It works on raster images
(bitmaps).

pYx is a tool library for vector graphics and scientific plots. Maybe
that can help. I've produced nice looking graphics of search-trees
within about 60 minutes of installing it.

This example is copied right from the pyx site:

from pyx import *
c = canvas.canvas()
c.text(0, 0, "Hello, world!") # Put oruccim here, if you want
c.stroke(path.line(0, 0, 2, 0))
c.writeEPSfile("hello")
c.writePDFfile("hello")

<URL:http://pyx.sourceforge.net/>
thank you
but it said """
Traceback (most recent call last):
File "<pyshell#3>", line 1, in <module>
c.text(0, 0, "Hello, world!")
File "C:\web\apache\python\lib\pyx\canvas.py", line 309, in text
return self.insert(self.texrunner.text(x, y, atext, *args,
**kwargs))
File "C:\web\apache\python\lib\pyx\text.py", line 1199, in text
self.execute(expr, self.defaulttexmessagesdefaultrun +
self.texmessagesdefaultrun + texmessages)
File "C:\web\apache\python\lib\pyx\text.py", line 899, in execute
self.fontmap = dvifile.readfontmap(self.fontmaps.split())
File "C:\web\apache\python\lib\pyx\dvifile.py", line 386, in
readfontmap
raise RuntimeError("cannot find font mapping file '%s'" %
filename)
RuntimeError: cannot find font mapping file 'psfonts.map'
"""
I have setuped pyx i wonder i have mistake?

Nov 11 '07 #9

P: n/a
or*****@gmail.com wrote:
On 10 Kas m, 23:57, Wildemar Wildenburger
I have setuped pyx i wonder i have mistake?
So far you seem to be treating this group as a free help desk for a
program you have paid thousands of dollars for. See

http://www.catb.org/~esr/faqs/smart-questions.html

You've given a full traceback, but you have spent no effort
describing what your goal is or what different things you've
done to solve _your_ problem.

-Scott
Nov 11 '07 #10

P: n/a
>>>>"or*****@gmail.com" <or*****@gmail.com(oc) wrote:
>octhank you
ocbut it said """
ocTraceback (most recent call last):
oc File "<pyshell#3>", line 1, in <module>
oc c.text(0, 0, "Hello, world!")
oc File "C:\web\apache\python\lib\pyx\canvas.py", line 309, in text
oc return self.insert(self.texrunner.text(x, y, atext, *args,
oc**kwargs))
oc File "C:\web\apache\python\lib\pyx\text.py", line 1199, in text
oc self.execute(expr, self.defaulttexmessagesdefaultrun +
ocself.texmessagesdefaultrun + texmessages)
oc File "C:\web\apache\python\lib\pyx\text.py", line 899, in execute
oc self.fontmap = dvifile.readfontmap(self.fontmaps.split())
oc File "C:\web\apache\python\lib\pyx\dvifile.py", line 386, in
ocreadfontmap
oc raise RuntimeError("cannot find font mapping file '%s'" %
ocfilename)
ocRuntimeError: cannot find font mapping file 'psfonts.map'
oc"""
ocI have setuped pyx i wonder i have mistake?
Do you have TeX installed?
--
Piet van Oostrum <pi**@cs.uu.nl>
URL: http://www.cs.uu.nl/~piet [PGP 8DAE142BE17999C4]
Private email: pi**@vanoostrum.org
Nov 11 '07 #11

P: n/a
or*****@gmail.com wrote:
have you got any example?pls :S
I suggest you learn to use internet search. And if you already know it,
please use it before asking that. 10 seconds of search (!) and I had:

<URL:http://www.google.de/search?hl=de&q=pil%20python%20examples&btnG=Google-Suche&meta=>

and from that:
<URL:http://www.pythonware.com/library/pil/handbook/introduction.htmhttp://www.pythonware.com/library/pil/handbook/introduction.htm>

/W
Nov 11 '07 #12

P: n/a
or*****@gmail.com wrote:
I have setuped pyx i wonder i have mistake?
You need a running TeX/LaTeX system for pyx. Sorry, forgot about that.

Also, I suggest you follow Scotts advice in reading
<URL:http://www.catb.org/~esr/faqs/smart-questions.html>.

If you're really looking for a way to generate captchas though, PIL is
what you want.

/W
Nov 11 '07 #13

P: n/a
Ahh, crap!

Wildemar Wildenburger wrote:
or*****@gmail.com wrote:
>have you got any example?pls :S
I suggest you learn to use internet search. And if you already know it,
please use it before asking that. 10 seconds of search (!) and I had:
Make that 2 seconds:
<URL:http://www.google.de/search?hl=de&q=pil%20python%20examples&btnG=Google-Suche&meta=>

and from that:
<URL:http://www.pythonware.com/library/pil/handbook/introduction.htmhttp://www.pythonware.com/library/pil/handbook/introduction.htm>
And make that, of course:
<URL:http://www.pythonware.com/library/pil/handbook/introduction.htm>
/W
Nov 12 '07 #14

This discussion thread is closed

Replies have been disabled for this discussion.