On Mon, 2010-07-26 at 12:09 -0700, Albert-Jan Roskam wrote:
I am making a data processing program that will use a configuration
file. The file should contain information about: (1) source files
used, (2) (intermediate) output files, (3) used parameters/estimation
methods (4) manual data edits
On Mon, 2010-07-26 at 14:03 +0100, Dipo Elegbede wrote:
what ook would you recommend for a beginner?
I am a django beginner myself. I did the tutorial first
(http://docs.djangoproject.com/en/dev/intro/tutorial01/) and now I am
very happy with Practical Django Projects:
Am 27.07.2010 02:29, schrieb Steven D'Aprano:
On Tue, 27 Jul 2010 05:09:09 am Albert-Jan Roskam wrote:
Hi,
I am making a data processing program that will use a configuration
file. The file should contain information about: (1) source files
used, (2) (intermediate) output files, (3) used
Suppose i have this nested list:
x
[['NM100', 3, 4, 5, 6, 7], ['NM100', 10, 11, 12, 13], ['NM200', 15, 16, 17]]
for i in x:
... print i
...
['NM100', 3, 4, 5, 6, 7]
['NM100', 10, 11, 12, 13]
['NM200', 15, 16, 17]
how do i obtain from the above the following nested list:
z
[['NM100', 3, 4,
Suppose i have this nested list:
x
[['NM100', 3, 4, 5, 6, 7], ['NM100', 10, 11, 12, 13], ['NM200', 15, 16, 17]]
for i in x:
... print i
...
['NM100', 3, 4, 5, 6, 7]
['NM100', 10, 11, 12, 13]
['NM200', 15, 16, 17]
how do i obtain from the above the following nested list:
z
Python 3.1 on Vista.
Please see http://tutoree7.pastebin.com/f3TaxDBc.
I'm trying to recall what I used to know, thus this simple script. But 'y'
or 'q' do nothing. What's wrong?
Thanks,
Dick Moores
___
Tutor maillist - Tutor@python.org
To
On 27/07/2010 15:22, Richard D. Moores wrote:
Python 3.1 on Vista.
Please seehttp://tutoree7.pastebin.com/f3TaxDBc.
I'm trying to recall what I used to know, thus this simple script. But 'y'
or 'q' do nothing. What's wrong?
msvcrt.getch returns bytes on Python 3.1; you're comparing against
On 07/27/2010 04:48 PM, Evert Rol wrote:
On the other hand, if you want to combine lists based on their first element,
consider using dictionaries and extend lists which have the same key. Depending
on how you create the lists (eg, when reading columns from a file), you can
actually do this
On 07/27/2010 05:22 PM, Richard D. Moores wrote:
Python 3.1 on Vista.
Please see http://tutoree7.pastebin.com/f3TaxDBc.
I'm trying to recall what I used to know, thus this simple script. But
'y' or 'q' do nothing. What's wrong?
Thanks,
Dick Moores
Hi Dick!
I'm not on Windows here so
On Tue, Jul 27, 2010 at 07:36, Tim Golden m...@timgolden.me.uk wrote:
On 27/07/2010 15:22, Richard D. Moores wrote:
Python 3.1 on Vista.
Please seehttp://tutoree7.pastebin.com/f3TaxDBc.
I'm trying to recall what I used to know, thus this simple script. But 'y'
or 'q' do nothing. What's
On Tue, Jul 27, 2010 at 07:51, Nick Raptis airsc...@otenet.gr wrote:
On 07/27/2010 05:22 PM, Richard D. Moores wrote:
Python 3.1 on Vista.
Please see http://tutoree7.pastebin.com/f3TaxDBc.
I'm trying to recall what I used to know, thus this simple script. But 'y'
or 'q' do nothing. What's
hello;
I need help in append a data in new file. the problem is the new data are
generated in every run.
so at the end I should get all the changes in one file (means for all running)
if I run 2 times so should get couple of data set.
note all outputs in txt file.
ex:
this is the first run data
Richard D. Moores rdmoo...@gmail.com wrote
Please see http://tutoree7.pastebin.com/f3TaxDBc.
I'm trying to recall what I used to know, thus this simple script.
But 'y'
or 'q' do nothing. What's wrong?
I don't think you need kbhit() or the sleep(.1)
The if kbhit test will only pass if the
Just as a matter of curiosity piqued by having to understand someone
else's code. Is the difference here just a matter of style, or is one
better somehow than the other?
l
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
','.join([str(x) for x in l])
'0,1,2,3,4,5,6,7,8,9,10'
','.join(map(lambda x:str(x),
2010/7/27 Ahmed AL-Masri ahmed...@hotmail.com
hello;
I need help in append a data in new file. the problem is the new data are
generated in every run.
so at the end I should get all the changes in one file (means for all
running) if I run 2 times so should get couple of data set.
note all
On Tue, 2010-07-27 at 09:44 -0700, Jon Crump wrote:
Just as a matter of curiosity piqued by having to understand someone
else's code. Is the difference here just a matter of style, or is one
better somehow than the other?
l
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
','.join([str(x) for x in
On 27 July 2010 17:53, Mac Ryan quasipe...@gmail.com wrote:
On Tue, 2010-07-27 at 09:44 -0700, Jon Crump wrote:
Just as a matter of curiosity piqued by having to understand someone
else's code. Is the difference here just a matter of style, or is one
better somehow than the other?
l
[0, 1,
On Tue, Jul 27, 2010 at 09:09, Alan Gauld alan.ga...@btinternet.com wrote:
Richard D. Moores rdmoo...@gmail.com wrote
Please see http://tutoree7.pastebin.com/f3TaxDBc.
I'm trying to recall what I used to know, thus this simple script. But 'y'
or 'q' do nothing. What's wrong?
I don't
Thank you all for your replies; they were most useful! I've never made a
connection between xml and mass-suicide ---interesting. ;-) Yaml seems a good
choice (I didn't llook at config parser yet). In my office, we use Python and R
(among other tools) and therfore it seems best not to use some
Vikram K wrote:
Suppose i have this nested list:
x
[['NM100', 3, 4, 5, 6, 7], ['NM100', 10, 11, 12, 13], ['NM200', 15, 16, 17]]
for i in x:
... print i
...
['NM100', 3, 4, 5, 6, 7]
['NM100', 10, 11, 12, 13]
['NM200', 15, 16, 17]
how do i obtain from the above the following nested list:
On Tue, Jul 27, 2010 at 07:51, Nick Raptis airsc...@otenet.gr wrote:
On 07/27/2010 05:22 PM, Richard D. Moores wrote:
Python 3.1 on Vista.
Please see http://tutoree7.pastebin.com/f3TaxDBc.
I'm trying to recall what I used to know, thus this simple script. But 'y'
or 'q' do nothing. What's
Hello all, I am new to programming and have opted to learn Python as I
hear it is a good first language. I am currently going through the
exercises in 'How to Think Like a Computer Scientist: Learning with
Python 2nd Edition'.
I am running Mac OSX v10.6.4 Snow Leopard
I am running Python
I'm writing a program with python that compiles a list of decorators from my
company's source code. I'm new to python and need help with the following:
I'm trying to make the program find .com in any lines and not include them
in the list of decorators that gets returned. THis is because I had
On Wed, 28 Jul 2010 02:44:02 am Jon Crump wrote:
Just as a matter of curiosity piqued by having to understand someone
else's code. Is the difference here just a matter of style, or is one
better somehow than the other?
Remember that list comprehensions didn't exist until a few years ago, so
On 7/27/2010 1:11 PM Mary Morris said...
I'm writing a program with python that compiles a list of decorators from my
company's source code. I'm new to python and need help with the following:
I'm trying to make the program find .com in any lines and not include them
in the list of decorators
Hi all pythoners
I've got a probably easy to answer question.
Say I've got a collections of strings, e.g.: 'man', 'bat', 'super', 'ultra'.
They are in a list, or in a sequence or whatever, say a bag of words
And now I want to know how many couples I can do with them, and I want the
program to
Hello Mary,
On Wed, 28 Jul 2010 06:11:18 am Mary Morris wrote:
I'm writing a program with python that compiles a list of decorators
from my company's source code. I'm new to python and need help with
the following: I'm trying to make the program find .com in any
lines and not include them
On 07/28/2010 01:20 AM, ZUXOXUS wrote:
Hi all pythoners
I've got a probably easy to answer question.
Say I've got a collections of strings, e.g.: 'man', 'bat', 'super',
'ultra'.
They are in a list, or in a sequence or whatever, say a bag of words
And now I want to know how many couples I
On 27/07/2010 23:20, ZUXOXUS wrote:
Hi all pythoners
I've got a probably easy to answer question.
Say I've got a collections of strings, e.g.: 'man', 'bat', 'super', 'ultra'.
They are in a list, or in a sequence or whatever, say a bag of words
And now I want to know how many couples I can do
On Tue, 2010-07-27 at 23:31 +0100, Mark Lawrence wrote:
On 27/07/2010 23:20, ZUXOXUS wrote:
Hi all pythoners
I've got a probably easy to answer question.
Say I've got a collections of strings, e.g.: 'man', 'bat', 'super', 'ultra'.
They are in a list, or in a sequence or whatever,
Sharp thanks, but:
I try to reproduce the example from the table, but:
import itertools
combinations('ABC', 2)
Traceback (most recent call last):
File pyshell#27, line 1, in module
combinations('ABC', 2)
NameError: name 'combinations' is not defined
If im not mistaken, it should return
Kevin Rapley ke...@digikev.co.uk wrote
I am running Mac OSX v10.6.4 Snow Leopard
I am running Python 2.6.1
In general get the MacPython distributions of Python etc, they usually
install easier (ie from the GUI) than the Unix based versions.
1. How do I execute .py files in the command line
Mac,
this is what I get:
for prod in itertools.product('ABC', 2):
print(prod)
Traceback (most recent call last):
File pyshell#34, line 1, in module
for prod in itertools.product('ABC', 2):
TypeError: 'int' object is not iterable
hmm, what might be that 'int' object? 2?
2010/7/28
Oh, I think i got it:
for prod in itertools.product('ABC', 'ABC'):
print(prod)
('A', 'A')
('A', 'B')
('A', 'C')
('B', 'A')
('B', 'B')
('B', 'C')
('C', 'A')
('C', 'B')
('C', 'C')
Thank you very much!!
2010/7/28 ZUXOXUS zuxo...@gmail.com
Mac,
this is what I get:
for prod in
ZUXOXUS wrote:
Oh, I think i got it:
for prod in itertools.product('ABC', 'ABC'):
print(prod)
('A', 'A')
('A', 'B')
('A', 'C')
('B', 'A')
('B', 'B')
('B', 'C')
('C', 'A')
('C', 'B')
('C', 'C')
Thank you very much!!
2010/7/28 ZUXOXUS zuxo...@gmail.com
You're top-posting,
I'm using Python 2.6.5 and I've got a challenge with the subprocess
module. I'd like the output to be stored in a variable, and not sent to
the stdout. The relevant lines as they are now:
#!/usr/bin/env python
import subprocess
import sys
dom = sys.argv[1]
switch = sys.argv [2]
answer =
36 matches
Mail list logo