Although the climate wouldn't make you think so, but searching for
python is hot in Norway:
http://www.google.com/trends?q=python&ctab=1&geo=all&date=all
I wonder what the explanation could be.
Btw: Java seems to be all the rage in India :)
http://www.google.com/trends?q=java&ctab=1&geo=all&date
I must be overlooking something since I can't find a simple way to
calculate which date it will be over, say, 9 days. I checked the
datetime, time and calendar modules, but none of them seem to have a
function to calculate the time offset.
--
http://mail.python.org/mailman/listinfo/python-list
The (excellent) ElementLibrary ads namespaces to each element when
writing the tree back to a file.
Say I do:
tree = ET.parse('playlist.xml')
tree.write(outFile)
with the following XML:
=
http://xspf.org/ns/0/";>
Kick off!
=
Writ
> written by a "it's the bytes, not the data" guy, obviously ;-)
hehehe...I figured it was. Wonder 'who' it was... ;)
> the standard serializer in 1.2 doesn't support default namespaces, so
> the quickest way to do this is to loop over all tags (use getiterator),
> strip off the "{http://xspf.org
I must be overlooking something here... I'm trying to edit a line in a
text file. I thought this was easy with fileinput, but all examples do
not write the line back to the file but simply 'print' it. I want to
open the file, edit the line and save it again. Is fileinput the right
module for that?
One resource you should always keep at hand is this extremely useful
Quick Reference:
http://rgruet.free.fr/PQR24/PQR2.4.html
Study it carefully, there is a lot in there that can teach you about
how Python works. Fire up IPython as well and start hacking!
2B
--
http://mail.python.org/mailman/l
PIL is certainly a fine option, but I noticed that the scaled images
(scaled with the ANTIALIAS filter) are not as good as you can get with,
say, Photoshop. Maybe I'm just expecting too much, but I wish I could
choose a higher quality rescaling algorithm. PIL still rocks though.
On Dec 28, 2:32 pm
cyberco wrote:
> PIL is certainly a fine option, but I noticed that the scaled images
> (scaled with the ANTIALIAS filter) are not as good as you can get with,
> say, Photoshop. Maybe I'm just expecting too much, but I wish I could
> choose a higher quality rescaling algorithm
Go for wxPython, it'll fulfill all your GUI needs. Handsdown the best
GUI toolkit I ever ran into. It can't get much simpler than:
wx.MessageBox('hi')
And there are tons of readymade dialogs and progressbars in the
library. Check out the demo.py under the wxPython installation dir to
see demos (a
I want to import a long list of modules in a separate thread to speed
things up. How can I make the modules imported in that separate thread
accessible outside the method?
===
import os
# import rest in a separate thread
def importRest():
import audio
import socket
Well, it is for the python implementation for Nokia Series 60 phones,
and loading lots of modules in such constrained environments can
certainly slow things down. The splashscreen idea is what I want to do,
but that requires the loading to continue in a background thread.
--
http://mail.python.or
There is one tool you won't be able to live without: iPython (no, it's
not an Apple product, but it would be worth waiting in line for 3 days
for)
http://ipython.scipy.org/moin/
--
http://mail.python.org/mailman/listinfo/python-list
I'm using web.py to send an image to the client. This works
(shortened):
print open(path, "rb").read()
but this doesn't:
img = Image.open(path)
img.thumbnail((10,10))
print img.getdata()
or
print img.load()
How do I get the bytes of the Image object? 'getdata()' seemed the
way, but unfortuna
Thanks,
I've tried the StringIO option as follows:
=
img = Image.open('/some/path/img.jpg')
img.thumbnail((640,480))
file = StringIO, StringIO()
img.save(file, 'JPEG')
=
But it gives me:
=
exceptio
On Sep 18, 9:03 am, "dimitri pater" <[EMAIL PROTECTED]> wrote:
> Hello,
> both python2.3 and python2.5 are installed on my Debian webserver. For
> some reason, I would like to uninstall Python2.5 which was installed
> from source (make install) and keep 2.3.
> I have tried make uninstall and search
Try BoaConstructor and the wxPython library, both are wonderfull. If
you don't mind using Java Swing, and there are good reasons for that,
go for jython. It simplifies the java swingcode so much you don't have
to use a graphical GUI builder anymore :)
--
http://mail.python.org/mailman/listinfo/py
I have used PyS60 quite a lot a while ago, but what is it you exactly
wanted to know?
One thing I can tell you is that it's a pity that it only runs on
Series 60 phones and that the security restrictions of third edition
devices severely limited the options for developers.
2B
--
http://mail.pyth
Confirmed (with exactly the same software).
Please discuss this issue at the PyDev discussion forum:
http://sourceforge.net/forum/forum.php?forum_id=293649
2B
--
http://mail.python.org/mailman/listinfo/python-list
> PyDev is open source, and the developer is pretty responsive, so if you
> could describe what is missing there is a good chance it would get
> implemented. I even fixed two bugs myself, my first ever real Java
> contribution...
>
> --
> Heikki Toivonen
I can second that. I'm a happy PyDev user
"Like silence in music, whitespace is where Python Power shows"
"The odd thing is that Python results in what I call YoYo-code. After
writing some code I always discover a shorter, more elegant and more
readable way of doing the same thing in Python. The same happens after
adding more functionalit
You can most likely find an answer on Nokia's Python forum:
http://discussion.forum.nokia.com/forum/forumdisplay.php?f=102
And if there's no answer there you should post the question there :)
--
http://mail.python.org/mailman/listinfo/python-list
> If you have a good color printer, try
> PQRChttp://www.limsi.fr/Individu/pointal/python/pqrc/
That is a very usefull document to use besides Richard Gruets quick
ref. The only disadvantage is that it's a PDF document, pity there's
no HTML version.
2B
--
http://mail.python.org/mailman/listinf
Go for BOA if you're going to use wxPython, whose python text editor
is excellent as well.
--
http://mail.python.org/mailman/listinfo/python-list
http://www.daniweb.com/code/python.html
http://www.pythonchallenge.com/
--
http://mail.python.org/mailman/listinfo/python-list
In my wxPython app a non-GUI thread (that reads info from the network)
tries to open a frame to show the new info. This results in my app
hanging (which is not too surprising). Coming from a C# environment I
wonder if there is some sort of delegate mechanism in wxPython to do
this sort of thing.
2
Ah! Great tip, thanks!
Now instead of calling:
parent.onRequest(param)
I call:
wx.CallAfter(lambda x: parent.onRequest(x), param)
Way cool.
2B
> This is rather out of date. wxPython provides a wx.CallAfter function,
> which will call the passed callable on the next spin through the event
> l
Oh boyI must have hit an all time programmers-low with this
That was plain stupid.
2B
> You don't need the lambda - you can use:
>
> wx.CallAfter(parent.OnRequest, param)
--
http://mail.python.org/mailman/listinfo/python-list
Great! That really helps me, thanks.
2B
--
http://mail.python.org/mailman/listinfo/python-list
> > That is, why not just have a Python interpreter and some safe subset
> > of the Python standard library run with the browser? I mean, aside
>
> It's not just the library (at a start you'd need to strip out
> modules os, popen, and subprocess), but you'd also need to block out
> exec, ev
http://sourceforge.net/projects/pys60
--
http://mail.python.org/mailman/listinfo/python-list
And I thought this would be trivial...getting mod_python to run within
apache on windows XP.
=
mod_python 3.2.8
apache 2.0.55
python2.4
winxp
=
After adding:
"LoadModule python_module modules/mod_python.so"
to apache's httpd.conf, apache refuses to start, saying:
"cannot
Thanks Jim, I indeed did not look in the mailinglist archive (you have
to subscribe for that and Google didn't cache it yet).
The problem was indeed the missing .DLL's. After adding them to my
'PATH' variable apache was at least able to start. Unfortunately things
still don't work. When I try to l
Win32)
mod_python/3.2.5b Python/2.4.2 configured -- resuming normal operations
[Sun Apr 09 22:16:38 2006] [notice] mod_python: Creating 8 session
mutexes based on 0 max processes and 250 max threads.
Cheers,
cyberco
--
http://mail.python.org/mailman/listinfo/python-list
yep
--
http://mail.python.org/mailman/listinfo/python-list
34 matches
Mail list logo