SEARCH YOUR SOLUTION HERE  

make images with python

I need make some images using python but i'm lost :P

i need some module to make .png (with drawline, drawcircle, drawpoint
etc etc etc )

like gd for php :P

thants

Posted On: Wednesday 7th of November 2012 01:34:45 PM Total Views:  380
View Complete with Replies




Related Messages:

How to make a module function visible only inside the module?   (164 Views)
Hi Everyone, Is there any equivalent version of C's static function in Python. I know I can make a class function private by starting a function name with two underscores, but it does not work with module functions. For exmaple, __func1 is still visible outside the module. mymodule.py """my module"" def __func1(): print "" main.py import mymodule mymodule.__func1()
Python Dies on "make install"   (156 Views)
When I try to build and install python from source It configures and makes fine but upon 'make install' I always get to this point: Listing /usr/local/lib/python2.5/xml/sax ... Compiling /usr/local/lib/python2.5/xml/sax/__init__.py ... Compiling /usr/local/lib/python2.5/xml/sax/_exceptions.py ... Compiling /usr/local/lib/python2.5/xml/sax/expatreader.py ... Compiling /usr/local/lib/python2.5/xml/sax/handler.py ... Compiling /usr/local/lib/python2.5/xml/sax/saxutils.py ... Compiling /usr/local/lib/python2.5/xml/sax/xmlreader.py ... Compiling /usr/local/lib/python2.5/xmllib.py ... Compiling /usr/local/lib/python2.5/xmlrpclib.py ... Compiling /usr/local/lib/python2.5/zipfile.py ... make: *** [libinstall] Error 1 I am currently trying to install 2.5.1. I get the error no matter what the version is. Does anyone have an idea what may be causing this I have gone through the config.log and found no errors concerning zipfile.py or zipfile or zip. I am thinking the error is the next command after the zipfile.py installation because I can go into /usr/local/lib/python2.5 and zipfile.py is installed.
com: makepy gencache.EnsureModule   (265 Views)
, I' having a problem with gencache.EnsureModule: I used win32com\client\makepy.py to successfully generate Python sources. Unfortunately, after I call win32com.client.Dispatch(), the object I get back is of type "COMObject" instead of one of the generated classes. In particular, I'm trying to interact with SolidWorks Extensibility Type Library and the PROGID is "SldWorks.Application". Using win32com\client\makepy.py -i SolidWorks Extensibility Type Library {801A0000-A66C-11D3-A8BD-0000861EBBD6}, lcid=0, major=1, minor=0 >>> # Use these commands in Python code to auto generate .py support >>> from win32com.client import gencache >>> gencache.EnsureModule('{801A0000-A66C-11D3-A8BD-0000861EBBD6}', 0, 1, 0) Looking in win32com\gen-py, the appropriate file _does_ exist: 801A0000-A66C-11D3-A8BD-0000861EBBD6x0x1x0.py and it does contain the correct class definitions. Then, in my code: >>> mod = win32com.client.gencache.EnsureModule('{801A2001-A66C-11D3-A8BD-0000861EBBD6}', 0, 1, 0) >>> mod None >>> ob = win32com.client.Dispatch("SldWorks.Application") >>> ob Why are the object mod is None and the object ob is instead Any bright ideas as to what's going wrong here
Let's make Python the core system administration tool   (181 Views)
My article, "Rethinking the Linux Distribution", was published today on O'Reilly ONLamp. http://www.onlamp.com/pub/a/onlamp/2...tribution.html I have done a lot of research on what the Linux distribution should look like in the emerging Web 2.0/SaaS/Web OS world, and came up with a set of recommendations. The recommendations are backed by running examples (with source code) and lots of references. The article also discusses governance of Free/Open Source projects. One of my major suggestions is to replace the traditional shell-based administration infrastructure with Python. I cover a relatively recent, highly rated Linux distribution, which has already started down this path. The article includes an example of using IPython and Matplotlib for system administration. Hope here will enjoy considering a Linux (or *BSD) distribution, where the core system infrastructure is all in Python. George.
ANN: exemaker 1.0 (october 10, 2004)   (135 Views)
The ExeMaker utility takes a Python script, installs it in a given directory, and creates an EXE file in the same directory. When you run the EXE, it locates and loads a suitable Python interpreter DLL, and runs the script. Usage: > more myscript.py print "welcome to my script!" > exemaker myscript.py c:/bin c:/bin/myscript.exe ok c:/bin/myscript.py ok > myscript welcome to my script! The ExeMaker is designed to quickly turn small scripts into command line utilities, so you can use them (and distribute them) without having to set up PY associations, create BAT files, or fool around with more sophisticated bundling tools. Just run exemaker on your script, and you're done. You can get ExeMaker from: http://effbot.org/downloads/#exemaker enjoy /F
ANN:pyCallTips 0.5, a script make Vim support calltips for Python   (162 Views)
If some pythoner complain that Vim don't support calltips of python, now I implement it. Try it and wish you enjoy it. http://vim.sourceforge.net/scripts/s...script_id=1074 Intro: This script simualate code calltips in a new bottow window of Vim. In fact, it display python help doc strings of word under the cursor by scanning the imported modules in the current file. 0.5 enhance 0.3 and fix many bugs.
makeExe.bat - An explanation   (142 Views)
, An explanation of makeExe.bat (http://premshree.resource-locator.com/j/post.phpid=152) has been appended to (http://www.devx.com/opensource/Article/20247/0/page/3) "Create Python Executables Automatically" (http://www.devx.com/opensource/Article/20247/). -Premshree Pillai ===== -Premshree [http://www.qiksearch.com/] ________________________________________________________________________ Yahoo! India Insurance Special: Be informed on the best policies, services, tools and more. Go to: http://in.insurance.yahoo.com/licspecial/index.html
How to execute a makefile from LINUX system.   (144 Views)
Hi all, I am using Link-41b parser in my program. The windows version of it has an .exe file that can be executed using os.system command On Linux version,I have a makefile. so my question is: How to run the makefile using some python function.
Re: Linux.com: Python 3 makes a big break   (345 Views)
On Sat, 18 Oct 2008 15:30:23 -0400, Terry Reedy wrote: >http://www.linux.com/feature/150399 >Interesting article with one minor incompleteness. >"For instance, the print statement got turned into a print function; you >must now put parentheses around what you want to print to the screen. The >change allows developers to work with print in a more flexible and uniform >way. If someone needs to replace the print function with some other action, >it can be done with a universal search and replace, rather than rewriting >each print statement by hand." > >Even easier, print as a function can be replaced simply by defining a new >version with the same name. No search/replace is needed. And reversion to >the built-in only requires commenting out the replacement. Perhaps it also omitted the fact that nothing prevents you from defining a function to write things to stdout (or elsewhere) in Python 2.5, making the Python 3.x change largely a non-feature. Jean-Paul
How to make xss safe strings   (233 Views)
How can I make a string XSS safe Will simply .replace('','>').... do the work Or are there some other issues to take into account. Is there already a function in python which will do this for me.
Are makepy-generated COM wrapper classes distributable?   (204 Views)
Hi! I've just written a Python speech-recognition module (http:// pyspeech.googlecode.com). It provides a clean and simple interface to the Microsoft Speech SDK using COM wrapper classes generated by PythonWin's MakePY utility. Once this is a mature module, I'd like to make it as useful as possible to the community, so I'd like to make installation as simple as possible. Currently, to get speech.py to work, you must first: * install the Microsoft Speech SDK onto a Windows box, and * possibly install PythonWin, and then * run PythonWin's MakePY utility to generate modules into the gen_py dir. I'd like to remove the MakePY steps, so that as long as a user has run the SDK installer, she can install the 'speech' package and be ready to use it. Can I somehow bundle the generated modules into my setuptools package so that the wrappers are installed at the same time (If so, how -- just copy them into the package directory) Or are the wrappers targeted to my machine or installation, so that is forced to go through this
How to make py2.5 distutil to use VC2005?   (209 Views)
Howdy, This problem have puzzled me for a long time. I usually use python2.5 in Windows, while VC2005 is installed. However python25.lib is compiled by VC2003. When I use disutil to build some C extensions, it complaints that there is no VC2003. Well, IMO, the format of binary files generated by VC2003 and VC2005 is compatible in most cases. What should I do to workaround this error I mean, disable distutil complaints and use VC2005 to build C extensions. I have google-ed some discussion related on this topic. It seems that it's real possible! Thank you in advance. -- ShenLei
How to make python run faster   (169 Views)
I read this article on http://kortis.to/radix/python_ext/ And I decided to try if it's true. I write the program in 4 ways: 1. Pure C 2. Python using C extension 3. Python using psycho 4. Pure Python And then I used timeit to test the speed of these 4. Unsurprisingly, the time they cost were: 4 > 3 > 2 > 1 But I did noticed that 2 is a least 3 times slower than 1, not as fast as the article stated. That's quite weird and I thought maybe it's because I am using Windows. I did the same test on Linux and I found 2 only uses 1.5 times of time of 1. But, it is still not as fast as 1.
Re: why does socket.makefile require non-blocking mode?   (196 Views)
Bryan Olson wrote: >Looking at the code for the existing _fileobject's read method, it >will loose data it has already read if a socket.recv() call raises >an exception. The function keeps buffers in a local variable that >will be lost if an exception exits the scope. That much could be >fixed with a try...finally. Other methods have similar problems. Just as I thought.
why does socket.makefile require non-blocking mode?   (220 Views)
The socket.makefile() docs say, "the socket must be in blocking mode." I don't see any explanation of why blocking mode is required, and I'm not sure whether that means timeout mode is forbidden as well. Can someone clarify this I wanted to use file-like objects with socket timeouts, so I ended up writing my own replacement for socket._fileobject. I'd appreciate it if someone could either explain to my why my new class was unnecessary, or else encourage me to contribute it as a patch to the socket module. Cheers, Forest
Trac - Does it make sense to keep http://trac.edgewall.org/ticket/4315open?   (271 Views)
Response to message [1] on trac.devel (as I cannot write there, due to an informally applied censorship) Mr. Boos: "I left that ticket open simply to avoid having someone to reopen it over and over..." (note to reader: this someone is me) Mr. Boos, the ticket status should reflect reality. So, if reality says "the ticket is open", no one can (should" close it. The essens of the ticket is, that you should trust you own results. You should use your development version, in order to obtain feedback. Of course I understand (seeing the terrible processes of the team), that you distrust your own results, prefering to let user do the dirty work of development-version-usage. Your inability to follow even the most rational suggestions subjecting development-processes, e.g. this one: http://trac.edgewall.org/ticket/6614#comment:36 will lead (together with the terrible quality of the trac source-code base) soon to an even more stucked development progress. Be assured that users see this (although they don't say much, like me). Do you actually realize that you're working since over a year on 0.11 Nothing is more fun that to watch the trac project running into one after another problem during development. At least you give other teams a good example of "how to ruine a good open-source product". http://case.lazaridis.com/wiki/TracAudit - To readers: The project hunts since months a memory-leak - without success. I'm wondering that python makes so much trouble in finding it. Seems to be another very fundamental reason to leave this "joke of a language" (python). - [1] http://groups.google.com/group/trac-...bcaf2b5fdc8abe From: Christian Boos Jeroen Ruigrok van der Werven wrote: > Does it make sense to keep http://trac.edgewall.org/ticket/4315 open I left that ticket open simply to avoid having someone to reopen it over and over... That ticket is a bit useless in that it has anyway always been the policy of the project to run the latest stable release. And that works quite well in practice. I imagine t.e.o would already be running 0.11b1 now, if we didn't have those memory issues. As for documenting the blocker issues, doing that directly on the milestone page is more effective anyway. So I'd say let's just not make a fuss about this one and we'll close it once t.e.o gets upgraded to 0.11. -- Christian
how to make format operator % work with unicode as expected   (156 Views)
I am using things like "%-20s%-60s%-10s" in tkinter listbox to make it look like a table, with mono sized font like lucie system. But this does not work with data contains "Les misrables", because it is unicode, and one byte is not neccessary one character. Now how can I resolve this issue My issue is "how to make format operator % work with unicode as expected", and has nothing to do with tkinter. If I want to use a table widget or something, I can. But that's not the question. , Ever heard the word "PLONK" Peter Pei harshly top-posted: > You didn't understand my question, but thanks any way. > > Yes, it is true that %s already support unicode, and I did not > contradict that. But it counts the number of bytes instead of > characters, and makes things like %-20s out of alignment. If you don't > understand my assertion, please don't argue back and I am only > interested in answers from those who are qualified. > ============================================================== > > "Steven D'Aprano" wrote [pretty qualifying response stripped]
make exe from application with py2exe   (169 Views)
, Is there any idea how can i create (.exe) from application (.exe ) with py2exe
Help Please - Need to make SOAPpy server multithreaded or handleproblem some other way   (184 Views)
I have a SOAP server running using SOAPpy. The problem I am having is that it only handles a single request at a time. It needs to be able to accept as many simultaneous requests as come in. What is the best way to achieve this I really appreciate any help here.
How do I make urllib2 preserve case in HTTP header names?   (195 Views)
The HTTP specification, RFC 2616, states that field names in HTTP headers are case insensitive. But I'm trying to use Python 2.5.1's urllib2 to interact with a web service offered by Amazon.com, which deviates from the HTTP spec in that it requires use of case-sensitive header names ReportName, ReportID, and NumberOfReports. I try to send an HTTP header named "NumberOfReports", but it comes out mangled as "Numberofreports'. What is the best way to use Python 2.5.1 on Windows Server 2003 to create HTTP or HTTPS requests that do not mangle the case of header field names Test case follows: ========== """ To see how Python breaks the CaseSensitiveName, go to command prompt and start netcat listening on the HTTP port: nc -l -p 80 localhost Then run this program on the same machine. You will see that CaseSensitiveName has become Casesensitivename. """ import urllib2 req = urllib2.Request("http://localhost/", "") req.add_header('CaseSensitiveName', 'CaseSensitiveValue') infp = urllib2.urlopen(req) data = infp.read() infp.close() print data