Sybren Stuvel wrote:
> Jive Dadson enlightened us with:
>> I also found a reference to something called PIL. Maybe that's the
>> ticket. If so, where can I find it (with documentation)? Thanks.
>
> Just google for PIL and Python.
>
> Sybren
Thanks Brian and Sybren. PIL did the trick. Real e
Thanks for the reply.
danielx wrote the following on 2006-08-13 19:49:
> Is your declaration of ABC supposed to have some_super as one of the
> base classes? Your constructor has some_super as a parameter. What is
> this supposed to mean in light of the declaration for ABC?
Indeed, my goal is to
Hi all.
Just having a weird problem with tkinter. I'm trying to make a gui that
shows results from an image search, with a "forward" and "back" button
so the user can compare results from different pages. All that's
working fine...
The problem I'm having is that the images don't show onscreen the
The base of moinmoin is called piki.It provides the simplest functions
as a wiki system
And there are lots of other wiki system based on piki.
If I try to developed one,I'll make the text data compatible with
compatible.
Jack wrote:
> Thanks! Because it was so well known, I thought it was databas
Hi All, What do you find the best IDE for creating web applications in
Python is? Preferably FOS IDE.
Cheers
--
http://mail.python.org/mailman/listinfo/python-list
Le lundi 14 août 2006 09:33, Jackson a écrit :
> Now I realize this would drive a programmer crazy...because a Lion might
> have a roar() method whereas a Human might have a holler() method. But
> so long as the user knew which argument they passed in, it shouldn't be
> too difficult to keep track
Le dimanche 13 août 2006 16:01, [EMAIL PROTECTED] a écrit :
> No neep for thread or Tix modules...!
Module thread is always available (at less on platforms where Tkinter is
available), while Tix in my example is just intended to use the Meter widget
(a progress bar).
> # this will *sleep* one m
[EMAIL PROTECTED] wrote:
> Simon Forman wrote:
>>> I got rid of the triple quote string at the start of the function, and
>>> that cleared up the problem, though I don't know why.
>>>
>> Ah, yes. The docstring for a function (or at least its first
>> triple-quote) must be indented to the same degre
Jackson wrote:
> I have 4 classes:
>
> Lion(Animal):
> Ant(Animal):
> Bee(Animal):
> Human(Animal):
>
> which are all subclasses of some superclass called Animal. Now I want
> to define an occupation. For example, Worker. A worker can exist as any
> of the 4 classes above. Their constructors ar
By FOS, do you mean FOSS (Free and Open Source Software)? I've never
seen the acronym FOS used.
I personally use Eclipse with PyDev.
http://www.eclipse.org/
http://pydev.sourceforge.net/
Michiel
Op 14-aug-2006, om 9:50 heeft [EMAIL PROTECTED] het volgende
geschreven:
> Hi All, What do you f
On Fri, 11 Aug 2006 06:16:26 -0700, Fuzzyman wrote:
> What you can do with Python is almost certainly *good enough* for most
> people who ask this question - and that fact never seems to be included
> in the 'reality' propogated by the knee jerk reactionists... :-p
The Original Poster *explicitly
On Fri, 11 Aug 2006 09:18:12 -0700, Ben Sizer wrote:
> Imagine if you were the single-person developer of a small application
> that did something quite innovative,
And imagine that you found a money-tree in your back yard...
How about a more likely scenario? Imagine you're using a boring,
run-
Jason Nordwick schrieb:
> Or without filter:
>
> from operator import add
> def pr(x): print x
> def cross(x,y): return reduce(add, [[a+b for b in y] for a in x])
> x=map(pr, reduce(cross, [map(str,range(1,6))]*5))
>
[...]
reduce(add, list) is the same as sum(list) and is only half as fast as su
[EMAIL PROTECTED] writes:
> Hi All, What do you find the best IDE for creating web applications
> in Python is? Preferably FOS IDE.
I don't know what a "FOS IDE" is, but my preferred free software
development environment for making web applications is:
- GNU screen http://www.gnu.org/software/
[EMAIL PROTECTED] wrote:
> Just having a weird problem with tkinter. I'm trying to make a gui that
> shows results from an image search, with a "forward" and "back" button
> so the user can compare results from different pages. All that's
> working fine...
> The problem I'm having is that the imag
Bart Ogryczak napisał(a):
> Rigth now I'm using two IDEs for Python, KDevelop and Eric. Both have
> drawbacks. KDevelop is a multilanguage IDE, and doesn't really have
> anything special for Python. There's no Python debugger, no PyDOC
> integration, it's class browser doesn't display attributes.
> As a side note, Eric3 has no KDE integration because it's pure PyQt
> application.
Not fully true. While it certainly doesn't aim to be a fully integrated ide,
it has some kde-support. Which you can disable using the --nokde argument,
btw.
It will then use kde color-dialogs, file-dialogs and th
Stargaming:
> Also note that reduce will be removed in Python 3000.
Then let's use it until it lasts! :-)
bearophile
--
http://mail.python.org/mailman/listinfo/python-list
mike_wilson1333 wrote:
> I would like to generate every unique combination of numbers 1-5 in a 5
> digit number and follow each combo with a newline. So i'm looking at
> generating combinations such as: (12345) , (12235), (4) and so on.
> What would be the best way to do this? So, basically i
Gerard Flanagan:
> mod5 = ['1','2','3','4','5']
> X = [ ''.join([a,b,c,d,e])
> for a in mod5
> for b in mod5
> for c in mod5
> for d in mod5
> for e in mod5 ]
A modified version of your one is the faster so far:
v = "12345"
r = [a+b+c+d+e for a in v for b in v for c
I think SPE is a terrible complete and efficient IDE!
--
http://mail.python.org/mailman/listinfo/python-list
mx.DateTime.RangeError at /podcasts
Failed to parse "31 Apr 2006 20:19:00 -0400": day out of range: 31
Python /usr/lib/python2.4/site-packages/mx/DateTime/Parser.py in
DateTimeFromString, line 608
how to parse this date
thanks
--
http://mail.python.org/mailman/listinfo/python-list
Xavier wrote:
> I'm attempting to write a proxy for xmlrpc calls.
why not use the one in the standard library?
> I want to expand this to do something like;
>
> >>a=MagicObject()
> >>x = a.b.c.d
>
> Then on the last __getattr__ send a call over xmlrpc.
> How do I determine when the last __getatt
Hello Friend,
Kindly spare 2 minutes to celebrate INDIA's
Independence Day with us.
Host INDIA'S tri-color flag at your desk-top
to show your love & support to INDIA.
Its specially designed for you. (Home page)
Participate in the event & win a gift for your
brother or friend in INDIA.
Clic
"a" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> mx.DateTime.RangeError at /podcasts
> Failed to parse "31 Apr 2006 20:19:00 -0400": day out of range: 31
> Python /usr/lib/python2.4/site-packages/mx/DateTime/Parser.py in
> DateTimeFromString, line 608
>
> how to parse this date
>
"a" wrote:
> mx.DateTime.RangeError at /podcasts
> Failed to parse "31 Apr 2006 20:19:00 -0400": day out of range: 31
> Python /usr/lib/python2.4/site-packages/mx/DateTime/Parser.py in
> DateTimeFromString, line 608
>
> how to parse this date
parse it into what? there is no such thing as "April 3
>> how to parse this date
>
> parse it into what? there is no such thing as "April 31st".
I think somebody's chain is getting pulled...thus the right thing
to do is to wrap around and return "April 1st" ;-)
-Loof Lirpa
--
http://mail.python.org/mailman/listinfo/python-list
Yup,
That's the problem. Can't thank you enough.
I'd read about Tkinter "garbage collection", but, like car crashes and
lung cancer, you never think it's going to happen to you...
thanks once again.
Cheers, Al.
Fredrik Lundh wrote:
> [EMAIL PROTECTED] wrote:
>
> > Just having a weird problem with
And I say once again: I can't thank you enough.
YOU ROCK!
cheers, al.
(Just changed the code in my main program, and it WORKS! The previous
thankyou was only a preliminary.)
ps I really like python, too. :)
[EMAIL PROTECTED] wrote:
> Yup,
> That's the problem. Can't thank you enough.
> I'd read
Hi all,
I tried to send a small mailing list using python today (2036 emails).
For that purpose I looked in the doc for some code examples (I had
never done it before). And I ended up writing and running this little
script:
# list.txt is a text file container an email per line
fp=open('list.txt',
Dennis Lee Bieber wrote:
> On Sun, 13 Aug 2006 20:21:26 -0400, John Salerno
> <[EMAIL PROTECTED]> declaimed the following in comp.lang.python:
>
>> Yes, I'm using Ubuntu. But I checked this log file and I'm a bit
>> confused. It has a lot of listings for 5-31-06, but I didn't even
>> install Lin
I'll be out of the office until approximately August 20th. If you have any
questions, please email [EMAIL PROTECTED]
-- David Wahler
--
http://mail.python.org/mailman/listinfo/python-list
I'll be out of the office until approximately August 20th. If you have any
questions, please email [EMAIL PROTECTED]
-- David Wahler
--
http://mail.python.org/mailman/listinfo/python-list
I'm assuming that FOS = "free open source"...
In any case, what operating system do you run? If you're on OS X, I
highly recommend TextMate. It's not free, but it has good support
(either via built-in or third-party plugins) for Python as well as
HTML, SQL, XML, Django templates, and the like. A
John Machin wrote:
> Hi,
>
> In general, I'm mainly interested in a template engine for dynamic web
> pages but would like a general purpose one to avoid learning yet
> another package for generating e-mail messages, form letters, source
> code, whatever.
HTMLTemplate and texttemplate offer a som
Paul Boddie wrote:
> Ben Sizer wrote:
> >
> > Imagine if you were the single-person developer of a small application
> > that did something quite innovative, and charged a small fee for your
> > product. Now imagine you were practically forced to make your algorithm
> > obvious - a couple of months
Jack wrote:
> I'd like to set up a wiki system for a project I'm working on.
> Since I'm not good at databases, and there's really not much
> stuff to put into the wiki, I hope it is text file-based.
> I used DokuWiki before, which is very nice but it's written
> in PHP. Is there a similar system
Steven D'Aprano wrote:
> On Fri, 11 Aug 2006 09:18:12 -0700, Ben Sizer wrote:
>
> > Imagine if you were the single-person developer of a small application
> > that did something quite innovative,
>
> And imagine that you found a money-tree in your back yard...
>
> How about a more likely scenario?
Hi,
I'm writing a software in python to generate html photo gallery. It is
called p-gal and is GPL licensed. It is written in python [With the
invaluable help of this list :)] and it has a templating system based
on Cheetah. Currently it works under Linux (and maybe other UNIX-like
OSs)
The main i
The os.walk function walks the operating systems directory tree.
This seems to work, but I don't quite understand the tupple that is
returned...
Can someone explain please?
for root, dirs, files in os.walk('/directory/'):
print root
# print dirs
# print files
--
http://mail.
jean-michel bain-cornu a écrit :
>>> i just like the look of the "fill-in" instead of the checkmark
> I'm just realizing it's a good idea !
> I'm going to use it. Thanks !
Actually, there is a problem when one generates an exe application with
py2exe. In that case, the 3rd style checkmark looks 'd
On Mon, 14 Aug 2006 07:44:39 -0700, KraftDiner wrote:
> The os.walk function walks the operating systems directory tree.
>
> This seems to work, but I don't quite understand the tupple that is
> returned...
> Can someone explain please?
>
> for root, dirs, files in os.walk('/directory/'):
>
> The os.walk function walks the operating systems directory tree.
Yup.
> This seems to work, but I don't quite understand the tupple that is
> returned...
> Can someone explain please?
>
> for root, dirs, files in os.walk('/directory/'):
> print root
> # print dirs
> # print files
Hi,
I am using Queue from python2.4. Here is what happen to me:
import Queue
b = Queue.Queue(0)
b.put()
b.get() # this is ok, it pops out
b.get() # this one does not return anything and is hang on there
Anybody knows what is going on with the second b.get()?
ouyang
--
http://ma
KraftDiner wrote:
> The os.walk function walks the operating systems directory tree.
>
> This seems to work, but I don't quite understand the tupple that is
> returned...
> Can someone explain please?
>
> for root, dirs, files in os.walk('/directory/'):
> print root
> # print dirs
> #
zxo> import Queue
zxo> b = Queue.Queue(0)
zxo> b.put()
zxo> b.get() # this is ok, it pops out
zxo> b.get() # this one does not return anything and is hang on there
zxo> Anybody knows what is going on with the second b.get()?
Queue objects are meant to be used
> import Queue
> b = Queue.Queue(0)
> b.put()
> b.get() # this is ok, it pops out
> b.get() # this one does not return anything and is hang on
> there
>
> Anybody knows what is going on with the second b.get()?
>>> help(Queue.Queue)
:
:
| get(self, block=True, timeout=None)
|
zxo102 wrote:
> Hi,
>I am using Queue from python2.4. Here is what happen to me:
>
> import Queue
> b = Queue.Queue(0)
> b.put()
> b.get() # this is ok, it pops out
> b.get() # this one does not return anything and is hang on there
>
> Anybody knows what is going on with the seco
On Mon, 14 Aug 2006 17:10:13 +0200, zxo102 <[EMAIL PROTECTED]> wrote:
> Hi,
>I am using Queue from python2.4. Here is what happen to me:
>
> import Queue
> b = Queue.Queue(0)
> b.put()
> b.get() # this is ok, it pops out
> b.get() # this one does not return anything and is hang on
"Paolo Pantaleo" <[EMAIL PROTECTED]> writes:
> I would anyone to take a look at my piece of code, and give me his
> feedback about what is good and what should be improved.
url?
--
http://mail.python.org/mailman/listinfo/python-list
Jim Jones wrote:
> I am looking for a system in Python that will easily allow me to
> distribute
> processes across multiple systems?So, if I have a function 'foo', I'd
> like to be able to call something along the lines of
>
> distribute(foo(x))
>
> And have the system figure out which node
Thanks for your guys. I got it. I thought Queue can be used anywhere
in the code and the second b.get() would return a "None".
Ouyang
zxo102 写道:
> Hi,
>I am using Queue from python2.4. Here is what happen to me:
>
> import Queue
> b = Queue.Queue(0)
> b.put()
> b.get() # this is ok,
Satya wrote:
> Vincent Delporte wrote:
>
>
>> - there's no way to build a single EXE, to make deployment easier (if
>> multiple files, I need to build an installer with eg. NSIS or
>> InnoSetup)?
>>
>
> I am using InnoSetup. The included example script (I believe in py2exe) is
> adequate for si
[EMAIL PROTECTED] wrote:
> I was looking for a simple way to load a simple python program from
> another python program.
>
> I tried
>
> os.system(cabel)
>
> The file name is cabel.py a csound instrument editor..
>
> The error I am getting is
>
> Traceback (most recent call last):
> Fil
Ben Sizer wrote:
> Paul Boddie wrote:
> > Ben Sizer wrote:
> > >
> > > Imagine if you were the single-person developer of a small application
> > > that did something quite innovative, and charged a small fee for your
> > > product. Now imagine you were practically forced to make your algorithm
> >
Larry Bates wrote:
> KraftDiner wrote:
> > The os.walk function walks the operating systems directory tree.
> >
> > This seems to work, but I don't quite understand the tupple that is
> > returned...
> > Can someone explain please?
> >
> > for root, dirs, files in os.walk('/directory/'):
> > p
14 Aug 2006 08:31:06 -0700, Paul Rubin <"http://phr.cx"@nospam.invalid>:
> "Paolo Pantaleo" <[EMAIL PROTECTED]> writes:
> > I would anyone to take a look at my piece of code, and give me his
> > feedback about what is good and what should be improved.
>
> url?
> --
> http://mail.python.org/mailman/
John Salerno wrote:
> Here's my new project: I want to write a little script that I can type
> at the terminal like this:
>
> $ scriptname package1 [package2, ...]
>
> where scriptname is my module name and any subsequent arguments are the
> names of Linux packages to install. Running the scrip
Vincent Delporte wrote:
> - py2exe is still the best tool in town to compile Python scripts to
> run on a Windows host that doesn't have Python installed, including
> wxWidgets/wxPython
Hi Vincent and c.l.p-ers
I'm using PyInstaller (http://pyinstaller.hpcf.upr.edu/) precisely to
"compile" a wxPy
> 1) there seems to be an optional topdown flag. Is that passed to
> os.walk(path, topdownFlag)
Yes.
> 2) I only want to process files that match *.txt for example... Does
> that mean I need to parse the list of files for the .txt extention or
> can I pass a wildcard in the path parameter?
>>
Tim Chase wrote:
> > 1) there seems to be an optional topdown flag. Is that passed to
> > os.walk(path, topdownFlag)
>
> Yes.
>
> > 2) I only want to process files that match *.txt for example... Does
> > that mean I need to parse the list of files for the .txt extention or
> > can I pass a wild
I have a GUI where the background of the "GO" button, for example, turns
green while the associated action is running. On Windows it works fine, but
on Solaris and Linux the button background turns white (or whatever) when
the mouse pointer enters the button, the background stays that color whi
Steven Bethard wrote:
> John Salerno wrote:
>> Here's my new project: I want to write a little script that I can type
>> at the terminal like this:
>>
>> $ scriptname package1 [package2, ...]
>>
>> where scriptname is my module name and any subsequent arguments are
>> the names of Linux packages
I've been using Pyro and it does what I needs it to do for me.
I don't know if it's as fancy as other packages but the price is right.
Jim Jones wrote:
> I am looking for a system in Python that will easily allow me to distribute
> processes across multiple systems?So, if I have a function 'f
Dennis Lee Bieber wrote:
> Well, I don't do shell scripts either, but... looking at the
> sample... "$@" is likely the shell equivalent of Python's sys.argv -- or
> *sys.argv if passed down
Yeah, kinda equivalent to *sys.argv[1:].
--
http://mail.python.org/mailman/listinfo/python-list
Steven Bethard wrote:
> import argparse # http://argparse.python-hosting.com/
> import subprocess
> import sys
Why not the standard lib's optparse?
--
http://mail.python.org/mailman/listinfo/python-list
John Salerno wrote:
> Steven Bethard wrote:
>> scriptname.py
>> import argparse # http://argparse.python-hosting.com/
>> import subprocess
>> import sys
>>
>> def outputfile(filename):
>> return open(filename, 'w')
>>
>> if __name__ == '
Ravi Teja wrote:
> Most Python templating engines are general purpose. Choice between them
> however is sometimes a matter of preference, like editors. I settled
> down on Cheetah for most part.
I second Cheetah. It's suitable for most text templates. Many others are
specific for XML or HTML docu
Hi allWe are using Pyro, too, for our Multi-Agent System framework Spyse (http://spyse.sf.net). We support mobile agents, distributed environments, various threading models and a lot more.
Just ask if you are interested, but use the svn version, mot the 0.1 download. Our 1.0 release should be comin
"Bob Greschke" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>I have a GUI where the background of the "GO" button, for example, turns
>green while the associated action is running. On Windows it works fine,
>but on Solaris and Linux the button background turns white (or whatever)
Paolo Pantaleo wrote:
> www.sf.net/projects/ppgal
Ciao Paolo!
The homepage (http://paolopan.freehostia.com/p-gal/ ) looks weird in my
SeaMonkey 1.0.4, contents appear below GoogleAds instead of at the
right.
Some feedback and a couple of questions at http://tinyurl.com/qgbth
(points to
http://s
Steven Bethard wrote:
> P.S. Thank *you* for posting this. As a result, I've been convinced
> that argparse should grow a 'outfile' type, something I've been debating
> with myself about for a while now.
Heh heh. I'm glad my ignorance can inspire those around me. ;)
--
http://mail.python.org/
Yu-Xi Lim wrote:
> Steven Bethard wrote:
>> import argparse # http://argparse.python-hosting.com/
>> import subprocess
>> import sys
>
> Why not the standard lib's optparse?
The page referenced above gives a variety of reasons, but the two most
important things in this example are: argparse supp
Why does this work from the python prompt, but fail from a script?
How does one make it work from a script?
#! /usr/bin/python
import glob
# following line works from python prompt; why not in script?
files=glob.glob('*.py')
print files
Traceback (most recent call last):
File "./glob.py", line
Hi,
I am trying to run the Hello World example in Boost.Python from the
Building Hello World documentation. I believe that I have everything
set up right but I get these three warnings,
warning: no toolsets are configured.
warning: you won't be able to build C++ programs.
warning: please consult t
Michiel Sikma wrote:
> By FOS, do you mean FOSS (Free and Open Source Software)? I've never
> seen the acronym FOS used.
Maybe he was trying for "Free Open Source IDE" without the
semi-redundant "Software"
> I personally use Eclipse with PyDev.
> http://www.eclipse.org/
> http://pydev.sourcefor
Maric Michaud wrote the following on 2006-08-14 01:26:
> In [28]: class Animal(object) :
>: _types = {}
>:
>:
>
> In [29]: class Worker(object) :
>: def work(self) : print 'hard'
>:
>:
>
[snip]
> What you are trying to achieve is more common
> >>> allowed = ['.txt', '.sql']
> >>> for path, dirs, files in os.walk("."):
> ... for f in files:
> ... if splitext(f)[1].lower() not in allowed: continue
Additionally, if you really do want to specify wildcards:
>>> allowed = ['*.txt', 'README*', '*.xml', '*.htm*']
>>> from
Somehow my other response to the list got lost. I'm still learning Python, but
this seems much better than my first attempt:
def pr(x): print x
def cross(x,y): return [a+b for a in x for b in y]
x=map(pr, reduce(cross, [map(str,range(1,6))]*5))
-j
Stargaming wrote:
> Jason Nordwick schrieb:
>>
Stargaming wrote:
>
> Also note that reduce will be removed in Python 3000.
What will replace it?
-j
--
http://mail.python.org/mailman/listinfo/python-list
John Machin wrote the following on 2006-08-14 01:45:
> Here are a couple of thoughts that *might* help:
>
> (1) mix-in i.e. a class can have multiple base classes:
>
> class AntWorker(Animal, Worker):
>
> (2) you can create classes on the fly using the 3-argument form of the
> built-in type() fu
14 Aug 2006 10:16:37 -0700, ajaksu <[EMAIL PROTECTED]>:
> Paolo Pantaleo wrote:
> > www.sf.net/projects/ppgal
>
> Ciao Paolo!
>
> The homepage (http://paolopan.freehostia.com/p-gal/ ) looks weird in my
> SeaMonkey 1.0.4, contents appear below GoogleAds instead of at the
> right.
Well... I designe
On 14 Aug 2006 10:29:08 -0700, Hoop <[EMAIL PROTECTED]> wrote:
> Hi,
> I am trying to run the Hello World example in Boost.Python from the
> Building Hello World documentation. I believe that I have everything
> set up right but I get these three warnings,
>
> warning: no toolsets are configured.
>
works for me. do you do anything in your script besides that?
Charles Russell wrote:
> Why does this work from the python prompt, but fail from a script?
> How does one make it work from a script?
>
> #! /usr/bin/python
> import glob
> # following line works from python prompt; why not in script?
Jason Nordwick:
> Stargaming wrote:
> > Also note that reduce will be removed in Python 3000.
> What will replace it?
Nothing, I presume. You will have to write a function to find another
way to solve problems.
Bye,
bearophile
--
http://mail.python.org/mailman/listinfo/python-list
John Salerno wrote:
> Yu-Xi Lim wrote:
>
> > I assume you're using a Debian-based distro with aptitude as the front
> > end. In which case, all dpkg operations should be logged in
> > /var/log/dpkg.log
>
> Yes, I'm using Ubuntu. But I checked this log file and I'm a bit
> confused. It has a lot of
Hi,
I need to read a large amount of data into a list. So I am trying to
see if I'll have any memory problem. When I do
x=range(2700*2700*3) I got the following message:
Traceback (most recent call last):
File "", line 1, in ?
MemoryError
Any way to get around this problem? I have a mac
In <[EMAIL PROTECTED]>, Charles Russell wrote:
> Why does this work from the python prompt, but fail from a script?
> How does one make it work from a script?
>
> #! /usr/bin/python
> import glob
> # following line works from python prompt; why not in script?
> files=glob.glob('*.py')
> print fil
[EMAIL PROTECTED] wrote:
> Hi All, What do you find the best IDE for creating web applications in
> Python is? Preferably FOS IDE.
WingIDE appears to be the best, especially if you are an Emacs user and are
used to its niceties. It is however, not free.
PyScripter is pretty good too -- light wei
Diez B. Roggisch napisał(a):
>>As a side note, Eric3 has no KDE integration because it's pure PyQt
>>application.
>
> Not fully true. While it certainly doesn't aim to be a fully integrated ide,
> it has some kde-support. Which you can disable using the --nokde argument,
> btw.
>
> It will then
Hi,
I have two similar programs- one in Livewires and one in Tkinter. Just
moving the player on a canvas. Why is that one in Tkinter so slow? What
did I miss? Livewires is based on Tkinter, so it should be the same. I
looked at the code of Livewires, tried something, but no success. Mayb
Simon Forman wrote:
> It's simple, short, and to-the-point. The equivalent python script
> would be much longer, for no appreciable gain. I write most of my tiny
> little helper scripts in python, but in this case, bash is the clear
> winnar. (And on *nix. man pages are your best friend. Plus y
Charles Russell wrote:
> Why does this work from the python prompt, but fail from a script?
> How does one make it work from a script?
>
> #! /usr/bin/python
> import glob
> # following line works from python prompt; why not in script?
> files=glob.glob('*.py')
> print files
>
> Traceback (most rec
John Salerno wrote:
> Simon Forman wrote:
>
> > It's simple, short, and to-the-point. The equivalent python script
> > would be much longer, for no appreciable gain. I write most of my tiny
> > little helper scripts in python, but in this case, bash is the clear
> > winnar. (And on *nix. man pag
*mouth agape*
Wow. That really sucks. I make extensive use of reduce. It seems to run more
than twice as fast as a for loop.
>>> t = Timer('bino.reduceadd(bino.bits)', 'import bino')
>>> s = Timer('bino.loopadd(bino.bits)', 'import bino')
>>> t.timeit(10)
1.2373670396656564
>>> s.timeit(10)
2.64
Yi Xing wrote:
> I need to read a large amount of data into a list. So I am trying to
> see if I'll have any memory problem. When I do
> x=range(2700*2700*3) I got the following message:
> Traceback (most recent call last):
> File "", line 1, in ?
> MemoryError
> Any way to get around this pr
Simon Forman wrote:
> Neat trick: man -k
Ah, so much command line magic to learn! Maybe I should just go back to
Windowsor maybe not. ;)
--
http://mail.python.org/mailman/listinfo/python-list
Yi Xing wrote:
> Hi,
>
> I need to read a large amount of data into a list. So I am trying to
> see if I'll have any memory problem. When I do
> x=range(2700*2700*3) I got the following message:
>
> Traceback (most recent call last):
> File "", line 1, in ?
> MemoryError
>
> Any way to get ar
I'm pretty well of a mind to pick up Python. I like it because it seems
to have a fair degree of functionality and is accessible to someone
without a PhD in computer sciences. This is my second day of
investigation, and I'm astounded by the huge ecosystem that surrounds
it. I have a number of q
[EMAIL PROTECTED] wrote:
> If you know that you need floats only, then you can use a typed array
> (an array.array) instead of an untyped array (a Python list):
>
> import array
> a = array.array("f")
>
Clarification: typecode 'f' stores a Python float (64-bits, equivalent
to a C double) as a 32
1 - 100 of 179 matches
Mail list logo