On 11 Feb 2006 11:44:29 -0800, Paul Boddie <[EMAIL PROTECTED]> wrote:
> Jorgen Grahn wrote:
...
>> On my machines, there is One Correct Way of doing these things, and that's
>> to look in the MIME support/configuration files (~/.mailcap, and so on),
>> first for the user, then system-wide. Somethin
Steven D'Aprano schrieb:
> On Sun, 12 Feb 2006 17:08:02 +, Cameron Laird wrote:
>
>
>>In article <[EMAIL PROTECTED]>,
>>Steven D'Aprano <[EMAIL PROTECTED]> wrote:
>>
>>>on the web for each language. By comparison, even Forth gives 13 million
>>>plus hits, and who uses Forth?
13m hits for fo
Pardon my ignorance here, but could you give me an example of what
would constitute file that is unreasonably or dangerously large? I'm
running python on a ubuntu box with about a gig of ram.
Also, do you know of any online examples of the kind of robust,
real-world code you're describing?
Thank
Hi again,
I've tried a the Sane interface from PIL and I get the following
error, when I run the demo_pil.py from the Sane directory.
SANE version: (16777231, 1, 0, 15)
Available devices= [('v4l:/dev/video0', 'Noname', 'Logitech QuickCam
mwt <[EMAIL PROTECTED]> wrote:
...
> The process is pretty opaque, however. This downloads and writes the
> file with no feedback whatsoever. You don't see how many bytes you've
> downloaded already, etc. Especially the "g = f.read()" step just sits
> there while downloading a large file, presen
Thomas Heller wrote:
> I wonder if anyone is actually using freeze on Windows, with scripts
> that use, say, pywin32 and wxPython.
Interesting question. I've never done so myself (only on Linux and
Solaris), and given the relatively small interest in having a static
Python library on Windows, I g
Jorgen Grahn wrote:
> I was thinking mostly about /proc, /sys and related file systems. I have a
> feeling parts of them they change quite frequently under Linux, and of
> course under other Unices they may look completely different, or be absent.
>
> Like Mr Laird said elsewhere, the best thing m
Tony Nelson wrote:
> Minor typo: "too"
Thanks, fixed.
Martin
--
http://mail.python.org/mailman/listinfo/python-list
More of a minor niggle than anything but how would I remove the
aforementioned space?
eg.
strName = 'World'
print 'Hello', strName, ', how are you today?'
comes out as "Hello World , how are you today?"
Have googled, and worked my way through the first 7 chapters of Byte of
Python, but to no a
Jorgen Grahn wrote:
> On 11 Feb 2006 11:44:29 -0800, Paul Boddie <[EMAIL PROTECTED]> wrote:
> >
> > Indeed. Thanks for reminding me about mailcap/metamail - I used them in
>
> And thanks for mentioning the real name of that mechanism!
Happy memories! ;-)
[...]
> > import mailcap
>
> I guess I sh
"HappyHippy" wrote:
> More of a minor niggle than anything but how would I remove the
> aforementioned space?
>
> eg.
> strName = 'World'
> print 'Hello', strName, ', how are you today?'
>
> comes out as "Hello World , how are you today?"
>
> Have googled, and worked my way through the first 7 cha
HappyHippy <[EMAIL PROTECTED]> wrote:
> More of a minor niggle than anything but how would I remove the
> aforementioned space?
>
> eg.
> strName = 'World'
> print 'Hello', strName, ', how are you today?'
>
> comes out as "Hello World , how are you today?"
>
> Have googled, and worked my way t
Em Dom, 2006-02-12 às 22:11 +, HappyHippy escreveu:
> More of a minor niggle than anything but how would I remove the
> aforementioned space?
>
> eg.
> strName = 'World'
> print 'Hello', strName, ', how are you today?'
>
> comes out as "Hello World , how are you today?"
strname = 'World'
pr
Edward K. Ream wrote:
> Hi,
>
>
>
> I've spent a pleasant hour or so trying to bring up a top-level Tk menu at
> the same spot as it would appear if I had actually clicked the menu. That
> is, I want to bring up a menu from the keyboard.
>
>
>
> The problem is computing the x and y args to
"mwt" wrote:
> Arrgghh... Is there any way to edit posts on this thing?
are you aware that you're posting to a usenet newsgroup?
> The os.system("clear") doesn't work at all in a module.
works for me (as long as I'm running the code on a platform that
has a clear command). in what way does it
Hi all,
Why doesn't this work as expected.. I expect that the the lines within
the sections will get modified - permanently. It is modifying them
during the first section but they never get saved to the new values..
Can anyone help me and even better explain why it's not working..
for
rh0dium <[EMAIL PROTECTED]> wrote:
...
> Why doesn't this work as expected.. I expect that the the lines within
> the sections will get modified - permanently. It is modifying them
> during the first section but they never get saved to the new values..
> Can anyone help me and even better expl
> How big is the file you are reading in? If it is (say) 400 MB, then it is
> hardly surprising that you will be using 500MB of RAM. If the file is 25K,
> that's another story.
Actually, I am downloading the matrix data from a file on a server on
the net using urllib2, and then I am running severa
Steven D'Aprano <[EMAIL PROTECTED]> writes:
> On Sun, 12 Feb 2006 05:11:02 -0800, MKoool wrote:
[...]
> I may be mistaken, and if so I will welcome the correction, but Python
> does not return memory to the operating system until it terminates.
>
> Objects return memory to Python when they are gar
Yes I did
I was trying to do something like (pseudo code)
write:
get files in path
for each filename get size, type
create dic called filename assign size:xx,type:y
pickle to file
read:
open pickled file
read dict name and contents (hoping unpickling file gives me the dict
name as it was saved,
Kevin Walzer <[EMAIL PROTECTED]> writes:
[...]
> Commercial Qt is a little out of my price range.
Commercial *PyQt* (including a license for Qt for use only with PyQt)
is $400 (USD) per developer (plus an extra $300/year if you want
upgrades). That's compared to Qt license for use *with C++* vary
Is there an equivalent to a msgbox() or
wscript.echo (via wcsript) . I would like to call this instead of print (to the
screen) . I would like to write a simple script that is not an event drive gui
but calls input boxes, message boxes, or maybe even a file open browser box as
well?
--
htt
LittlePython wrote:
> Is there an equivalent to a msgbox() or wscript.echo (via wcsript) . I
> would like to call this instead of print (to the screen) . I would like
> to write a simple script that is not an event drive gui but calls input
> boxes, message boxes, or maybe even a file open brows
Hi,
If you target Windows, you may try ctypes http://starship.python.net/crew/theller/ctypes/:
>>> from ctypes import *>>> windll.user32.MessageBoxA(None, "MessageBox Text", "MessageBox Caption", 0)1>>>
or win32api http://starship.python.net/crew/mhammond/win32/:
>>> import win32api>>> win3
That is exactly what I was look for .. thx
"Kent Johnson" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> LittlePython wrote:
> > Is there an equivalent to a msgbox() or wscript.echo (via wcsript) . I
> > would like to call this instead of print (to the screen) . I would like
> > to
Hi:
Bram Cohen will be a keynoter at this year's PyCon, and has asked that
the presentation be in the form of an interview.
I'd like the questions to be representative of as broad a cross-section
of the Python community as possible. If you have a question you'd like
to hear Bram answer please
mwt wrote:
> Pardon my ignorance here, but could you give me an example of what
> would constitute file that is unreasonably or dangerously large? I'm
> running python on a ubuntu box with about a gig of ram.
1GB of RAM plus (say) 2GB of virtual memory = 3GB in total.
Your OS and other running p
Thanks for the explanation. That is exactly what I'm looking for. In a
way, it's kind of neat that urlopen just *does* it, no questions asked,
but I'd like to just know the basics, which is what it sounds like
urlretrieve covers. Excellent. Now, let's see what I can whip up with
that.
-- just bou
Steven D'Aprano wrote:
> > Programming in Lua
> > Object-Oriented Programming
> > http://www.lua.org/pil/16.html
>
> Did you actually bother to read the page you linked to? It describes how
> you can emulate object-like behaviour for Lua tables. The following page
> is even more explicit: "Lua doe
Kent Johnson wrote:
> LittlePython wrote:
> > Is there an equivalent to a msgbox() or wscript.echo (via wcsript) . I
> > would like to call this instead of print (to the screen) . I would like
> > to write a simple script that is not an event drive gui but calls input
> > boxes, message boxes, or m
Em Dom, 2006-02-12 às 20:10 -0500, Steve Holden escreveu:
> I'd like the questions to be representative of as broad a cross-section
> of the Python community as possible. If you have a question you'd like
> to hear Bram answer please let me know and I'll try to include them.
Something I think lo
>It isn't written in C, but get your hands on wget. It
>is probably already on your Linux distro, but if not,
>check it out here:
>http://www.gnu.org/software/wget/wget.html
Thanks. I'm checking it out.
--
http://mail.python.org/mailman/listinfo/python-list
"Cameron Laird" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> In article <[EMAIL PROTECTED]>,
> Steven D'Aprano <[EMAIL PROTECTED]> wrote:
> .
> .
> .
>>on the web for each language. By comparison, even Forth gives 13 million
>>plus hits, and who uses Forth?
> .
> .
> .
> The prog
Steve Holden <[EMAIL PROTECTED]> wrote:
> Bram Cohen will be a keynoter at this year's PyCon, and has asked that
> the presentation be in the form of an interview.
>
> I'd like the questions to be representative of as broad a cross-section
> of the Python community as possible. If you have a ques
mwt <[EMAIL PROTECTED]> wrote:
> Thanks for the explanation. That is exactly what I'm looking for. In a
> way, it's kind of neat that urlopen just *does* it, no questions asked,
> but I'd like to just know the basics, which is what it sounds like
> urlretrieve covers. Excellent. Now, let's see wha
So, I just put this little chunk to the test, which does give you
feedback about what's going on with a file download. Interesting that
with urlretrieve, you don't do all the file opening and closing stuff.
Works fine:
--
import urllib
def download_file(filename, URL):
f = ur
mwt <[EMAIL PROTECTED]> wrote:
...
> import urllib
>
> def download_file(filename, URL):
> f = urllib.urlretrieve(URL, filename, reporthook=my_report_hook)
If you wanted to DO anything with the results, you'd probably want to
assign to
f, m = ...
not just f. This way, f is the filenam
Yes, silly question, but it keeps me up at night. :)
I know it comes from the suffix -tuple, which makes me think it's
pronounced as 'toople', but I've seen (at m-w.com) that the first
pronunciation option is 'tuhple', so I wasn't sure. Maybe it's both, but
which is most prevalent?
Thanks! No
Diez B. Roggisch wrote:
>>This is the code section of my server class (I cut this from a Python
>>example):
>>def establishConnection(self):
>>self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
>>self.socket.connect((self.host, self.port))
>>Do I have to use explici
LittlePython wrote:
> I am very new to python. I have been studying it for only a month or so. I
> have been using vbscript for about 2-3 yrs and only recently been using it
> rather heavily the past 9 months or so. I am new very new to oop. My main
> use will be administrative scripting into the w
Alex Martelli wrote:
> Bengt Richter <[EMAIL PROTECTED]> wrote:
>...
>
>>>Personally, I'd always use (depending on guesses regarding lengths of
>>>lists) [x for x in l1 if x in l2] or the setified equivalent, of course.
>>>
>>
>>Perhaps newbies should be advised that
>>
>>[x for x in l1 if
John Salerno wrote:
> Yes, silly question, but it keeps me up at night. :)
>
Silly you!
> I know it comes from the suffix -tuple, which makes me think it's
> pronounced as 'toople', but I've seen (at m-w.com) that the first
> pronunciation option is 'tuhple', so I wasn't sure. Maybe it's both,
On 2006-02-13, John Salerno <[EMAIL PROTECTED]> wrote:
> I know it comes from the suffix -tuple, which makes me think
> it's pronounced as 'toople', but I've seen (at m-w.com) that
> the first pronunciation option is 'tuhple', so I wasn't sure.
> Maybe it's both, but which is most prevalent?
In m
Em Dom, 2006-02-12 às 23:15 -0500, Steve Holden escreveu:
> Given that Python 2.4 doesn't even perform simple constant folding for
> arithmetic expressions
> [snip]
May I ask why doesn't it perform such optimization? Is there any special
difficulties in doing so with the Python compiler?
Also, I
Felipe Almeida Lessa wrote:
> Em Dom, 2006-02-12 às 23:15 -0500, Steve Holden escreveu:
>
>>Given that Python 2.4 doesn't even perform simple constant folding for
>>arithmetic expressions
>>[snip]
>
>
> May I ask why doesn't it perform such optimization? Is there any special
> difficulties in d
John Salerno wrote:
> Yes, silly question, but it keeps me up at night. :)
>
> I know it comes from the suffix -tuple, which makes me think it's
> pronounced as 'toople', but I've seen (at m-w.com) that the first
> pronunciation option is 'tuhple', so I wasn't sure. Maybe it's both, but
> whic
LittlePython wrote:
> I am very new to python. I have been studying it for only a month or so. I
> have been using vbscript for about 2-3 yrs and only recently been using it
> rather heavily the past 9 months or so. I am new very new to oop. My main
> use will be administrative scripting into the
Steve Holden wrote:
> The basic answer is that so far no developer has felt it worthwhile to
> expend time on adding these optimizations.
Mainly because it's rare to find such constructs in anything except
contrived examples ... Nearly every time you use a literal, it's being
added to (subtracted
Em Dom, 2006-02-12 às 23:51 -0500, Steve Holden escreveu:
> The basic answer is that so far no developer has felt it worthwhile to
> expend time on adding these optimizations.
I always thought these small optimizations could lead Python to be
faster overall. I remember about this every time I see
Delaney, Timothy (Tim) wrote:
> Adding such optimisations to Python may improve it's benchmark scores,
Blegh! Time to give myself a good kicking!
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
Felipe Almeida Lessa wrote:
> Em Dom, 2006-02-12 às 23:51 -0500, Steve Holden escreveu:
>
>>The basic answer is that so far no developer has felt it worthwhile to
>>expend time on adding these optimizations.
>
>
> I always thought these small optimizations could lead Python to be
> faster overa
[EMAIL PROTECTED] wrote:
> I can speak the same about Python if I view it from a prototype based
> perspective, where one get them for free in Lua but need to implement
> them in Python.
Sure. And if you need prototypes, then all else being
equal that would be a disadvantage of Python compared
Steven D'Aprano wrote:
> [EMAIL PROTECTED] wrote:
>
>
>>I can speak the same about Python if I view it from a prototype based
>>perspective, where one get them for free in Lua but need to implement
>>them in Python.
>
>
> Sure. And if you need prototypes, then all else being
> equal that would
Steven D'Aprano wrote:
> [EMAIL PROTECTED] wrote:
>
> > I can speak the same about Python if I view it from a prototype based
> > perspective, where one get them for free in Lua but need to implement
> > them in Python.
>
> Sure. And if you need prototypes, then all else being
> equal that would b
Hi,
I have a series of images (either from numarray or from PIL)
After googling if read something about pyMedia...
Can I create an AVI movie from my images with that ? How about
quicktime ?
Thanks,
Sebastian Haase
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
Is it true that that "Python 3000" is dead ?
Honestly I think that e.g. changing 5/2 to be 2.5 (instead of 2) would
just break to much code :-(
On the otherhand I'm using Python as "Matlab replacement" and would
generally like 5/2 ==2.5
So, I was contemplating to default all my modules/script
For me (I am newbie as well) was following link very useful:
http://benyoonline.com/pqr/PQR2.4.html
Good luck with Python
Petr Jakes
--
http://mail.python.org/mailman/listinfo/python-list
For those people who use google groups to access comp.lang.python may
enjoy now looking at contentess shiny yellow stars - shining brighter
than anything else on the site. The only pattern I've found are one or
two shiny yellow stars for many newbie postings. According to the
staring semantics the
On Feb 13, 2006, at 06:44, [EMAIL PROTECTED] wrote:
> And if we use market penetration as measure, Perl seems to be easier
> for people ?
Perl: Shell scripts/awk/sed are not enough like programming languages.
Python: Perl is a kludge.
"What Languages Fix"
http://www.paulgraham.com/fix.html
Ch
PA wrote:
> On Feb 13, 2006, at 06:44, [EMAIL PROTECTED] wrote:
>
> > And if we use market penetration as measure, Perl seems to be easier
> > for people ?
>
> Perl: Shell scripts/awk/sed are not enough like programming languages.
>
> Python: Perl is a kludge.
>
> "What Languages Fix"
> http://www
John Salerno wrote:
> Yes, silly question, but it keeps me up at night. :)
>
> I know it comes from the suffix -tuple, which makes me think it's
> pronounced as 'toople', but I've seen (at m-w.com) that the first
> pronunciation option is 'tuhple', so I wasn't sure. Maybe it's both, but
> whi
On 2/12/06, Felipe Almeida Lessa <[EMAIL PROTECTED]> wrote:
> Em Dom, 2006-02-12 às 23:15 -0500, Steve Holden escreveu:
> > Given that Python 2.4 doesn't even perform simple constant folding for
> > arithmetic expressions
> > [snip]
>
> May I ask why doesn't it perform such optimization? Is there a
Kay Schluehr wrote:
> For those people who use google groups to access comp.lang.python may
> enjoy now looking at contentess shiny yellow stars - shining brighter
> than anything else on the site. The only pattern I've found are one or
> two shiny yellow stars for many newbie postings. According
Bengt Richter wrote:
> Perhaps newbies should be advised that
>
> [x for x in l1 if x in set(l2)]
But the resulting list is a representative of bag not a set ( contains
multiple occurrences of elements ):
>>> [x for x in [3, 3] if s in Set([3])]
[3,3]
Same with Raymonds solution:
>>> filt
Grant Edwards wrote:
> On 2006-02-13, John Salerno <[EMAIL PROTECTED]> wrote:
>
> > I know it comes from the suffix -tuple, which makes me think
> > it's pronounced as 'toople', but I've seen (at m-w.com) that
> > the first pronunciation option is 'tuhple', so I wasn't sure.
> > Maybe it's both, bu
Hi, I am posting a couple of requirements in my organization. Any one
interested can reply me directly.
Maestro Software Developer
We are seeking experienced software professionals to design and develop new
components as well as to enhance and maintain Maestro, a best-of-breed
computational chem
Hi everyone. I'm new to SWIG, and I'm trying to wrap a C library for
Python.
I have a function that is declared similarly to this:
double *foo(int x);
The function returns a pointer to an array of 7 double values. I want
to return a 7-tuple to Python. I've been trying variations of the
follow
101 - 167 of 167 matches
Mail list logo