First of all, don't reply to an e-mail unrelated to your own problem,
create a new thread. The subject line is very confusing, and it also
screws up thread-based mail readers like gmail.
On Sat, May 29, 2010 at 3:17 AM, Karl Jansson wrote:
> I was trying to build python, and this printed to the t
> I'm new to python, so i don't know if this is important, or what it means at
> all. I looked in setup.py, and it didn't tell me anything. What does it
> mean by "the necessary bits" were not found?
Not really sure, but in the future please create a new e-mail to
tutor@python.org rather than
I was trying to build python, and this printed to the terminal:
Python build finished, but the necessary bits to build these modules were not
found:
_gdbm ossaudiodevreadline
spwd
To find the necessary bits, look in se
On Fri, 28 May 2010 07:42:30 am Alex Hall wrote:
> Thanks for all the explanations, everyone. This does make sense, and
> I am now using the
> if(arg==None): arg=self.arg
> idea. It only adds a couple lines, and is, if anything, more explicit
> than what I was doing before.
You should use "if arg
On Fri, 28 May 2010 12:00:46 pm Matthew Wood wrote:
> I THOUGHT the guaranteed same-ordering of dict.keys and dict.values
> started in python 2.6. That was a simple mistake.
>
> It turns out, that's not the case. But in general, access to dicts
> and sets is unordered, so you can't/don't/shouldn
"Shawn Blazer" wrote
Hello! I'm a high school student, and I'm having some trouble
learning recursion in my class...
For example:
Trace the sequence of recursive calls that glee(2,1) spawns:
def glee ( idol , scrub ) :
if idol == 0 :
return scrub
elif idol < 0 :
return scrub + glee ( idol +
This problem told me to use map and filter, so how would I use that to
solve it?
remove ( 5 , 6 )
6
remove ( 5 , 5 )
remove ( 1 , [1 , [1 , [2 , 13]] , 1 , [2] , 5] )
[[[2 , 13]] , [2] , 5]
remove ( 2 , [1 , [1 , [2 , 13]] , 1 , [2] , 5] )
[1 , [1 , [13]] , 1 , [] , 5]
Thanks!
--
Usi
On 5/28/2010 3:09 PM Shawn Blazer said...
Hello! I'm a high school student, and I'm having some trouble learning
recursion in my class...
For example:
Trace the sequence of recursive calls that glee(2,1) spawns:
I imagine what you'd need to do is manually follow the code for glee
step-by-step
Hello! I'm a high school student, and I'm having some trouble learning
recursion in my class...
For example:
Trace the sequence of recursive calls that glee(2,1) spawns:
def glee ( idol , scrub ) :
if idol == 0 :
return scrub
elif idol < 0 :
return scrub + glee ( idol + 10 , idol % 3 )
else :
David Perlman wrote:
> Oh, except one problem: the csv.DictWriter lets you tell it what order
> you want the columns output in. With your version, they just show up
> in whatever order Python wants them.
That's not hard to fix:
>>> fieldnames = "abca"
>>> cols = [data[fn] for fn in fieldnames]
On 5/28/10, Hugo Arts wrote:
> On Fri, May 28, 2010 at 11:06 PM, Alex Hall wrote:
>> Hi all,
>> A couple days ago I posted a request for help with a strange problem
>> with my Battleship game. I finally double-checked the constructor for
>> a wx.GridSizer and, to my surprise, found that I had rev
On Fri, May 28, 2010 at 11:06 PM, Alex Hall wrote:
> Hi all,
> A couple days ago I posted a request for help with a strange problem
> with my Battleship game. I finally double-checked the constructor for
> a wx.GridSizer and, to my surprise, found that I had reversed the
> column/row args in my ca
Hi all,
A couple days ago I posted a request for help with a strange problem
with my Battleship game. I finally double-checked the constructor for
a wx.GridSizer and, to my surprise, found that I had reversed the
column/row args in my call to said constructor. I will have to confirm
with a sighted
Oh, except one problem: the csv.DictWriter lets you tell it what order
you want the columns output in. With your version, they just show up
in whatever order Python wants them.
On May 28, 2010, at 2:33 AM, Peter Otten wrote:
I think it's simpler and therefore more appropriate to use a norm
Aha, now this is the clever solution that I didn't find "outside the
box". :)
On May 28, 2010, at 2:33 AM, Peter Otten wrote:
I think it's simpler and therefore more appropriate to use a normal
csv.writer here:
import csv
import sys
data = {'a': [1, 2, 3], 'c': [7, 8, 9], 'b': [4, 5, 6]}
w
2010/5/28 spir ☣ :
> his is a different feature from preserving *input* order of of keys, or of
> key:value pairs.
In Python 2.7 and 3.1 [1] we now have the OrderedDict which does
preserve input order.
Greets
Sander
[1] http://www.python.org/dev/peps/pep-0372/
__
On Thu, 27 May 2010 20:00:46 -0600
Matthew Wood wrote:
> I THOUGHT the guaranteed same-ordering of dict.keys and dict.values started
> in python 2.6. That was a simple mistake.
>
> It turns out, that's not the case. But in general, access to dicts and sets
> is unordered, so you can't/don't/sh
David Perlman wrote:
> Using the csv.DictReader and csv.DictWriter lets you read and write
> lists of dictionaries from files containing tabular data. I have a
> system that naturally generates tabular data in the form of a
> dictionary of lists: the dictionary key is the name of the column, and
On 27-05-10 20:45, John Storta Jr. wrote:
I am working on an app that runs in gnome and uses gtk. I am extremely
new to Python. (been working with it for all of 2 days).
I am wanting to add a 'Recent Documents' menu option to the app. Gnome
tracks your recent documents -- apparently in a file
19 matches
Mail list logo