On 11/7/2010 5:51 PM, D'Arcy J.M. Cain wrote:
On Sun, 7 Nov 2010 19:30:23 -0600
Wenhuan Yu wrote:
I tried to open a link with urlopen:
import urllib2
alink = "
http://feeds.nytimes.com/click.phdo?i=ff074d9e3895247a31e8e5efa5253183";
f = urllib2.urlopen(alink)
print f.read()
and got the follow
Il 07/11/2010 07:41, Chris Rebert wrote:
You could subclass UserString instead of str; all of UserString's
methods seem to ensure that instances of the subclass rather than just
plain strs or UserStrings are returned. See
http://docs.python.org/library/userdict.html#UserString.UserString
I'll
On Nov 7, 12:34 pm, Benjamin Kaplan wrote:
> ActivePython is the same thing as the "normal" Python. They just
> bundle the standard Python 3.1.2 distribution with a couple of extra
> packages in a convenient installer for you.
Thanks, Ben! Based on your response, I decided to go ahead and
instal
m...@distorted.org.uk (Mark Wooding) wrote:
> And the advantage of all of this typing over ['missing'] is what,
> precisely?
No chance of the sentinel object being accidentally mutated would be
the big one for me, but clarity of intent would be a close second.
--
http://mail.python.org/mailman/l
On Sun, 07 Nov 2010 20:51:50 -0500, D'Arcy J.M. Cain wrote:
>> urllib2.HTTPError: HTTP Error 301: The HTTP server returned a redirect error
>> that would lead to an infinite loop.
>> The last 30x error message was:
>> Moved Permanently
>>
>> I can open the link in browser. Any way to get solve th
In article ,
Grant Edwards wrote:
> It's getting really hard to find high-DPI displays on laptops any
> more. 1600x1200 used to be available on 16" laptop displays, and that
> looked great. Even my old 15" thinkpad at 1400x1050 wasn't bad.
My 15" MacBook Pro is 1680 x 1050.
--
http://mail.py
On Sun, 7 Nov 2010 19:30:23 -0600
Wenhuan Yu wrote:
> I tried to open a link with urlopen:
>
> import urllib2
> alink = "
> http://feeds.nytimes.com/click.phdo?i=ff074d9e3895247a31e8e5efa5253183";
> f = urllib2.urlopen(alink)
> print f.read()
>
> and got the followinig error:
>
> urllib2.HTTPEr
On Nov 8, 8:55 am, Jason wrote:
> Do you know if virtualenv allows installing a Python environment with
> a different architecture than that of the system Python install? I
> suspect not, but maybe there's an option I don't know about.
Found a better solution, which is to just compile Python from
I tried to open a link with urlopen:
import urllib2
alink = "
http://feeds.nytimes.com/click.phdo?i=ff074d9e3895247a31e8e5efa5253183";
f = urllib2.urlopen(alink)
print f.read()
and got the followinig error:
urllib2.HTTPError: HTTP Error 301: The HTTP server returned a redirect error
tha
t would
On 2010-11-07 18:53 , Lawrence D'Oliveiro wrote:
In message, Robert Kern
wrote:
Everyone here knew exactly what he meant.
But if you don’t banana the right tomato, everybody could be grapefruit,
right?
You know what I mean.
And as I reiterated in the part that you snipped, he is not using
On 2010-11-07, Steve Holden wrote:
> On 11/7/2010 10:46 AM, Grant Edwards wrote:
>> On 2010-11-07, Steve Holden wrote:
>>> On 11/7/2010 8:23 AM, Grant Edwards wrote:
>>> [...]
(I bought 4:3 monitors before they got replaced by cheap 16:8
screens)
>>>
>>> I think you'll find the new aspe
On Nov 8, 8:30 am, "Martin v. Loewis" wrote:
> At a minimum, you should be using the target's python binary. distutils
> has close-to-none cross-compiling support.
Do you know if virtualenv allows installing a Python environment with
a different architecture than that of the system Python install
In message , Robert Kern
wrote:
> Everyone here knew exactly what he meant.
But if you don’t banana the right tomato, everybody could be grapefruit,
right?
You know what I mean.
--
http://mail.python.org/mailman/listinfo/python-list
In message , Emile van
Sebille wrote:
> On 11/7/2010 2:26 AM Lawrence D'Oliveiro said...
>> In message, Nobody wrote:
>>
>>> A reference manual tells you how to use the language. A specification
>>> tells you how to implement it.
>>
>> Speaking as someone who has read more reference
>> manuals/sp
> So is it possible to get distutils to cross compile something like
> this, and
> if so, what am I missing? Or am I using the wrong tool for the job?
At a minimum, you should be using the target's python binary. distutils
has close-to-none cross-compiling support. You can solve some of the
proble
My situation is this: I have a Diamond Systems single-board computer
with a
matching GPIO board. DS have a library for controlling the GPIO
board... but
it's a static library (libdscud-6.02.a) with an accompanying header
(dscud.h).
I'd like to create a Python extension to use the device.
The archi
On Nov 6, 2010, at 10:45 AM, D'Arcy J.M. Cain wrote:
> On Sat, 6 Nov 2010 10:22:47 -0400
> Philip Semanchuk wrote:
>>> The tutorial isn't meant as an exhaustive lesson on every single Python
>>> feature.
>>
>> I agree, and I don't expect otherwise. My point was that if the
>> tutorial doesn't
On Nov 2, 10:03 am, t...@sevak.isi.edu (Thomas A. Russ) wrote:
> silver light writes:
> > *** FBI gets a warm welcome in Chicago for their EXCELLENT performance
> > - cheers to NEW CONS ***
>
> Oh geez. Just when we've beaten back the infix hordes, someone comes up
> and suggests replacing CONS w
*** FBI gets a warm welcome in Chicago for their EXCELLENT performance
- cheers to NEW CONS ***
http://www.youtube.com/watch?v=eq2ZvSd-z0M&feature=player_embedded&related
http://www.youtube.com/watch?v=eq2ZvSd-z0M&feature=player_embedded&related
http://www.youtube.com/watch?v=eq2ZvSd-z0M&feature
chris wrote:
> have anybody a hint , how i get a dict from non unique id's and their
> different related values.
>
> Thanks for advance
> Chris
>
> ###random data #
> a=range(10)*3
> def seqelem():
> i=random.randint(0,2)
> elem=['a','b','c'][i]
> return elem
>
> s=[seqelem() for t i
chris writes:
> Hi,
>
> have anybody a hint , how i get a dict from non unique id's and their
> different related values.
>
> Thanks for advance
> Chris
>
> ###random data #
> a=range(10)*3
> def seqelem():
> i=random.randint(0,2)
> elem=['a','b','c'][i]
> return elem
>
> s=[seqelem()
Hi Chris,
I may have time to look at the rest of your code later. For now I
just want to comment on one line:
On Nov 7, 12:24 pm, chris wrote:
> elem=['a','b','c'][i]
The string type, just like the list type, is a sequence type. So
strings have all the standard sequence methods. You coul
On Sun, Nov 7, 2010 at 2:25 PM, CWC wrote:
> I'm new to Python. Is it possible to make ActivePython 3.12 and
> Python 3.12 co-exist on Windows? I've got an app which requires the
> former, but I want to stay with the latter, since I'm interested in
> getting into development. The main area of c
Hi,
have anybody a hint , how i get a dict from non unique id's and their
different related values.
Thanks for advance
Chris
###random data #
a=range(10)*3
def seqelem():
i=random.randint(0,2)
elem=['a','b','c'][i]
return elem
s=[seqelem() for t in range(30)]
print zip(a,s)
## fav
On 2010-11-07, Ethan Furman wrote:
> Seebs wrote:
>> On 2010-11-05, Ethan Furman wrote:
>>> The verifiable benefit for me is ease of use, ease of thought, ease of
>>> typing... I realize these are not benefits for everyone, but they are
>>> for some -- and I would venture a guess that the ease
I'm new to Python. Is it possible to make ActivePython 3.12 and
Python 3.12 co-exist on Windows? I've got an app which requires the
former, but I want to stay with the latter, since I'm interested in
getting into development. The main area of collision appears to be
the Registry.
--
http://mail
On Sun, Nov 7, 2010 at 9:56 AM, chad wrote:
> On Nov 7, 9:47 am, Chris Rebert wrote:
>> On Sun, Nov 7, 2010 at 9:34 AM, chad wrote:
>>
>> > #!/usr/local/bin/python
>>
>> > import sys
>>
>> > def construct_set(data):
>> > for line in data:
>> > lines = line.splitlines()
>> > for
On 2010-11-07, Mark Wooding wrote:
> I've no idea how people manage with these ridiculous widescreen monitors.
Side space used for Other Stuff. It takes some reworking of the layout,
but overall I sorta like it now.
-s
--
Copyright 2010, all wrongs reversed. Peter Seebach / usenet-nos...@seeb
On Nov 7, 9:47 am, Chris Rebert wrote:
> On Sun, Nov 7, 2010 at 9:34 AM, chad wrote:
>
>
>
>
>
> > #!/usr/local/bin/python
>
> > import sys
>
> > def construct_set(data):
> > for line in data:
> > lines = line.splitlines()
> > for curline in lines:
> > if curline.stri
On 2010-11-07, Roy Smith wrote:
> Well, maybe I was being a little sarcastic. The real point was that if
> you make it hard for people to do the right thing (i.e. look up the
> details in the reference manual), you should not be surprised if they do
> the wrong thing (i.e. find some way to mak
On 2010-11-07, Grant Edwards wrote:
> On 2010-11-07, Lawrence D'Oliveiro wrote:
>> In message <87sjzige0r@benfinney.id.au>, Ben Finney wrote:
>>> The more general answer is: the block is explicitly ended where the
>>> indentation ends.
>> That's implicit, not explicit.
> If you can _see_ it
On Sun, Nov 7, 2010 at 9:34 AM, chad wrote:
> #!/usr/local/bin/python
>
> import sys
>
> def construct_set(data):
> for line in data:
> lines = line.splitlines()
> for curline in lines:
> if curline.strip():
> key = curline.split(' ')
> va
On Nov 7, 9:34 am, chad wrote:
> I have an input file named 'freq' which contains the following data
>
> 123 0
>
> 133 3
> 146 1
> 200 0
> 233 10
> 400 2
>
> Now I've attempted to write a script that would take a number from the
> standard input and then
> have the program return the number in the
I have an input file named 'freq' which contains the following data
123 0
133 3
146 1
200 0
233 10
400 2
Now I've attempted to write a script that would take a number from the
standard input and then
have the program return the number in the input file that is closest
to that input file.
#!/us
On Nov 7, 7:09 pm, Kev Dwyer wrote:
> On Sun, 07 Nov 2010 10:56:46 +0530, Rustom Mody wrote:
> > There are a large number of test frameworks in/for python. Apart from
> > what comes builtin with python there seems to be nose, staf, qmtest etc
> > etc.
>
> > Is there any central place where these
On 2010-11-07 08:39 , Дамјан Георгиевски wrote:
Given the context, "PyQt is available under the GPL and a commercial
license," the commercial license Phil is talking about is not the
GPL.
Which is a wrong interpretation of “commercial”.
But he is not interpreting either “commercial” or GPL.
On 11/7/2010 10:46 AM, Grant Edwards wrote:
> On 2010-11-07, Steve Holden wrote:
>> On 11/7/2010 8:23 AM, Grant Edwards wrote:
>> [...]
>>> (I bought 4:3 monitors before they got replaced by cheap 16:8
>>> screens)
>>
>> I think you'll find the new aspect ration is 16:9.
>
"aspect ration". Sheesh
Lawrence D'Oliveiro wrote:
In message , Tim Harig wrote:
>>
I personally prefer tabs as it lets *me* decide how far the apparent
indentations are in the code.
But they don’t. Other people can have different settings, and they will see
different indentations for your code
That's exactly the
Seebs wrote:
On 2010-11-05, Ethan Furman wrote:
The verifiable benefit for me is ease of use, ease of thought, ease of
typing... I realize these are not benefits for everyone, but they are
for some -- and I would venture a guess that the ease of thought benefit
is one of the primary reasons P
On 2010-11-07, Steve Holden wrote:
> On 11/7/2010 8:23 AM, Grant Edwards wrote:
> [...]
>> (I bought 4:3 monitors before they got replaced by cheap 16:8
>> screens)
>
> I think you'll find the new aspect ration is 16:9.
I knew that. My keyboard didn't.
I recently bought a close-out Lenovo T500
On 11/7/2010 2:26 AM Lawrence D'Oliveiro said...
In message, Nobody wrote:
A reference manual tells you how to use the language. A specification
tells you how to implement it.
Speaking as someone who has read more reference
manuals/specifications/whatever you want to call them than I can coun
On 11/07/10 08:26, Steve Holden wrote:
On 11/7/2010 8:23 AM, Grant Edwards wrote:
[...]
(I bought 4:3 monitors before they got replaced by cheap 16:8
screens)
I think you'll find the new aspect ration is 16:9.
Unless that's why they're cheap...
dual-16x9-widescreen-in-portrait-mode-is-a-won
In article <87oca1b8ba.fsf@metalzone.distorted.org.uk>,
m...@distorted.org.uk (Mark Wooding) wrote:
> Vertical space is a limiting factor on how much code one can see at a
> time.
Yup. Over three decades of programming, my personal upper bound for how
long a function should be has always b
>> Given the context, "PyQt is available under the GPL and a commercial
>> license," the commercial license Phil is talking about is not the
>> GPL.
>
> Which is a wrong interpretation of “commercial”.
But he is not interpreting either “commercial” or GPL.
What he says is: here's the code for fr
On 11/7/2010 8:23 AM, Grant Edwards wrote:
[...]
> (I bought 4:3 monitors before they got replaced by cheap 16:8
> screens)
I think you'll find the new aspect ration is 16:9.
regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
PyCon 2011 Atlanta March 9-17 http://us.
On Sun, 07 Nov 2010 10:56:46 +0530, Rustom Mody wrote:
> There are a large number of test frameworks in/for python. Apart from
> what comes builtin with python there seems to be nose, staf, qmtest etc
> etc.
>
> Is there any central place where these are listed with short
> descriptions? 'Test f
Lawrence D'Oliveiro writes:
> Not surprising, since the above list has become completely divorced from its
> original purpose. Anybody remember what that was? It was supposed to be used
> in a loop, as follows:
>
> for \
> Description, Attr, ColorList \
> in \
> (
>
Nobody writes:
> You're taking "how" too literally, so let me rephrase that:
>
> A reference manual tells you what you need to know in order to use
> the language. A specification tells you what you need to know in
> order to implement it.
I still don't see those as being different.
A lan
On 2010-11-07, Lawrence D'Oliveiro wrote:
> In message <87sjzige0r@benfinney.id.au>, Ben Finney wrote:
>
>> Seebs writes:
>>
>>> On 2010-11-03, Steven D'Aprano
>>> wrote:
>>>
Python does explicitly mark blocks. It does it by changes in
indentation. An indent is an explicit start-b
On 2010-11-07, Mark Wooding wrote:
> Lawrence D'Oliveiro writes:
>
>> I would never do that. "Conserving vertical space" seems a stupid
>> reason for doing it.
>
> Vertical space is a limiting factor on how much code one can see at a
> time.
And one study I read shoed that how much code one can
I also uploaded a video with sound because there were a lot of people
that asked that.
link: http://www.youtube.com/watch?v=zidKSPWBGxU
--
http://mail.python.org/mailman/listinfo/python-list
Lawrence D'Oliveiro writes:
> I would never do that. “Conserving vertical space” seems a stupid reason for
> doing it.
Vertical space is a limiting factor on how much code one can see at a
time. I use old-fashioned CRT monitors with 4x3 aspect ratios and
dizzyingly high resolution; I usually w
In article ,
Seebs wrote:
> On 2010-11-07, Roy Smith wrote:
> > Any self-respecting C++ programmer would have given
> > up the scavenger hunt by now. Just kept throwing typecasts at your code
> > until it compiles, and move on.
>
> That does not sound like a self-respecting programmer of an
In message , Guido Stepken wrote:
> a not database driven
What do you mean by “database”? Even flat files can be “databases”.
--
http://mail.python.org/mailman/listinfo/python-list
In message <87sjzige0r@benfinney.id.au>, Ben Finney wrote:
> Seebs writes:
>
>> On 2010-11-03, Steven D'Aprano
>> wrote:
>>
>>> Python does explicitly mark blocks. It does it by changes in
>>> indentation. An indent is an explicit start-block. An outdent is an
>>> explicit end- block. There
In message <8jftftfel...@mid.individual.net>, Neil Cerutti wrote:
> The handsome ':' terminator of if/elif/if statements allows us to
> omit a newline, conserving vertical space. This improves the
> readability of certain constructs.
>
> if x: print(x)
> elif y: print(y)
> else: print()
I would
In message , Grant Edwards wrote:
> But without the colon, how are people who write programming editors
> going to know when to increase the indentation level as I enter code?
I hate editors (or editing modes) that think they know when to change
indentation level on me. Hate, hate, hate.
--
htt
In message , Tim Harig wrote:
> I agree with Seebs, Python is the only language I know that promotes
> the use of spaces over tabs; and there are equally picky syntaxs (ie,
> Makefiles) that mandate the use of tabs.
That’s widely conceded to be a misfeature of Make.
> I personally prefer tabs as
In message , Nobody wrote:
> A reference manual tells you how to use the language. A specification
> tells you how to implement it.
Speaking as someone who has read more reference
manuals/specifications/whatever you want to call them than I can count, I
have never come across any such distincti
In message <1vmbd65uaj2snq1v0vo49ktn0lsc2o5...@4ax.com>, Tim Roberts wrote:
> I KNOW that we're still working on syntax here, and that it's too early
> for optimization, but it bothers me to see "cat" as the first thing in a
> pipeline.
An anti-UUOC instinct. Very good. :)
--
http://mail.python.
Hi,
Thanks everyone for the replies - it is now clearer.
Steven
--
http://mail.python.org/mailman/listinfo/python-list
On Sun, 07 Nov 2010 19:33:52 +1300, Lawrence D'Oliveiro wrote:
> for \
> Description, Attr, ColorList \
> in \
> (
> ("normal", "image", MainWindow.ColorsNormalList),
> ("highlighted", "highlight",
> MainWindow.ColorsHighlightedList), ("s
62 matches
Mail list logo