hi all, I wrote these codes but the program must write the prints to a text
file...
code = [100, 200, 300, 400, 500]
list= []
a = 0
while a 9:
a+=1
list.append(a)
last_list = [[int(str(i) + str(k)) for i in code] for k in list]
list2= []
b = 0
while b 9:
b+=1
On 2011-10-12 13:15, selahattin ay wrote:
hi all, I wrote these codes but the program must write the prints to a text
file...
code = [100, 200, 300, 400, 500]
list= []
a = 0
while a 9:
a+=1
list.append(a)
last_list = [[int(str(i) + str(k)) for i in code] for k in list]
list2= []
And also, I higly recommend against using lists named list. That means
overwriting builtin list object.
2011/10/12 Andreas Perstinger andreas.perstin...@gmx.net
On 2011-10-12 13:15, selahattin ay wrote:
hi all, I wrote these codes but the program must write the prints to a
text file...
Xah Lee wrote:
«
... emacs program and tutorial that does archiving a website for
offline reading. (See http://xahlee.org/emacs/make_download_copy.html
)
»
Sashi wrote:
«Why not use wget or curl?»
The Emacs lisp program makes a archive of parts of website you own, so
that readers of your website
On Jul 6, 4:05 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
In this week i wrote a emacs program and tutorial that does archiving
a website for offline reading.
(Seehttp://xahlee.org/emacs/make_download_copy.html)
Why not use wget or curl?
--
In this week i wrote a emacs program and tutorial that does archiving
a website for offline reading.
(See http://xahlee.org/emacs/make_download_copy.html )
In the process, i ran into a problem with the unix “cp” utility. I've
been a unix admin for Solaris during 1998-2004. Even the first time i
Currently I am faced with a large computation tasks, which works on a
huge CSV file. As a test I am working on a very small subset which
already contains 2E6 records. The task itself allows the file to be
split however as each computation only involves one line. The
application performing the
Michel Albert [EMAIL PROTECTED] writes:
buffer = []
for line in reader:
buffer.append(line)
if len(buffer) == 1000:
f = job_server.submit(calc_scores, buffer)
buffer = []
f = job_server.submit(calc_scores, buffer)
buffer = []
but would this not kill my memory if I
On Fri, 09 Nov 2007 02:51:10 -0800, Michel Albert wrote:
Obviously this won't work as you cannot access a slice of a csv-file.
Would it be possible to subclass the csv.reader class in a way that
you can somewhat efficiently access a slice?
An arbitrary slice? I guess not as all records
On 9 Nov, 12:02, Paul Rubin http://[EMAIL PROTECTED] wrote:
Why not pass the disk offsets to the job server (untested):
n = 1000
for i,_ in enumerate(reader):
if i % n == 0:
job_server.submit(calc_scores, reader.tell(), n)
the remote process seeks to the appropriate
Hi,
I am trying to use python for file processing.
Suppose I have a file like this:
I want to build a Hashmap between the line begin_QOS_statistics and
end_QOS_statistics
and for each line I want to put the first text as the key of the hash
table and the second text as the value.
Received RTCP
On Sun, 26 Aug 2007 06:05:11 +, [EMAIL PROTECTED] wrote:
I am trying to use python for file processing.
Suppose I have a file like this:
I want to build a Hashmap between the line begin_QOS_statistics and
end_QOS_statistics
and for each line I want to put the first text as the key
Marc 'BlackJack' Rintsch wrote:
On Sun, 26 Aug 2007 06:05:11 +, [EMAIL PROTECTED] wrote:
I am trying to use python for file processing.
Suppose I have a file like this:
I want to build a Hashmap between the line begin_QOS_statistics and
end_QOS_statistics
and for each line I want
I have not used Python before, but believe it may be what I need.
I have large text files containing text, numbers, and junk. I want to
delete large chunks process other bits, etc, much like I'd do in an
editor, but want to do it automatically. I have a set of generic
rules that my fingers
ferrad wrote:
I have not used Python before, but believe it may be what I need.
I have large text files containing text, numbers, and junk. I want to
delete large chunks process other bits, etc, much like I'd do in an
editor, but want to do it automatically. I have a set of generic
rules
ferrad wrote:
I have large text files containing text, numbers, and junk. I want to
delete large chunks process other bits, etc, much like I'd do in an
editor, but want to do it automatically.
Question: can I translate these types of rules into programmatical
constructs that Python can use
ferrad wrote:
I have not used Python before, but believe it may be what I need.
I have large text files containing text, numbers, and junk. I want to
delete large chunks process other bits, etc, much like I'd do in an
editor, but want to do it automatically. I have a set of generic
rules
On Tue, 19 Jun 2007 05:15:17 -0700, ferrad [EMAIL PROTECTED] wrote:
I have not used Python before, but believe it may be what I need.
I have large text files containing text, numbers, and junk. I want to
delete large chunks process other bits, etc, much like I'd do in an
editor, but want to
Hello,
I'm Gopal. I'm looking for a solution to the following problem:
I need to create a text file config.txt having some parameters. I'm
thinking of going with this format by having Param Name - value. Note
that the value is a string/number; something like this:
PROJECT_ID = E4208506
The ConfigParser class is designed for this task, see
http://docs.python.org/lib/module-ConfigParser.html
--
http://mail.python.org/mailman/listinfo/python-list
Gopal wrote:
Hello,
I'm Gopal. I'm looking for a solution to the following problem:
I need to create a text file config.txt having some parameters. I'm
thinking of going with this format by having Param Name - value. Note
that the value is a string/number; something like this:
PROJECT_ID =
Thanks for the reference. However, I'm not understanding how to use it.
Could you please provide with an example? Like I open the file, read
line and give it to parser?
Please help me.
--
http://mail.python.org/mailman/listinfo/python-list
Gopal wrote:
Hello,
I'm Gopal. I'm looking for a solution to the following problem:
I need to create a text file config.txt having some parameters. I'm
thinking of going with this format by having Param Name - value. Note
that the value is a string/number; something like this:
Thank you very much. That works!!!
--
http://mail.python.org/mailman/listinfo/python-list
Gopal wrote:
Thanks for the reference. However, I'm not understanding how to use it.
Could you please provide with an example? Like I open the file, read
line and give it to parser?
Please help me.
I had thought of recommending what Peter Hansen recommended - just
importing the text you
Peter Hansen wrote:
Gopal wrote:
[...] I'm
thinking of going with this format by having Param Name - value. Note
that the value is a string/number; something like this:
PROJECT_ID = E4208506
SW_VERSION = 18d
HW_VERSION = 2
In my script, I need to parse this config file and
26 matches
Mail list logo