in other words, the last two lines of your function should be:
statinfo = os.stat(filename)
return child_pty.read(statinfo.st_size)
--
Best Regards,
David Hutto
CEO: http://www.hitwebdevelopment.com
--
http://mail.python.org/mailman/listinfo/python-list
#better coded for you to understand
import sys
import pty
import os
def get_text(filename):
try:
( child_pid, fd ) = pty.fork() # OK
except OSError as e:
print(str(e))
sys.exit(1)
if child_pid == 0:
import sys
import pty
import os
def get_text(filename):
#you need to find the file size, and place it as an integer in read
below, where you return the value
statinfo = os.stat(filename)
try:
( child_pid, fd ) = pty.fork() # OK
except OSError as e:
On 24/10/2012 06:46, Alain Ketterlin wrote:
satyam writes:
I have a text file like this
A1980JE3937 2732 4195 12.527000
A1980JE3937 3465 9720 22.00
A1980JE3937 2732 9720 18.00
A1980KK18700010 130 303 4.985000
A1980KK18700010 7 4915 0.435000
[...]
I want to split the file
On Tue, Oct 23, 2012 at 10:23 PM, seektime wrote:
> Here's some example code. The input is a list which is a "matrix" of letters:
>a b a
>b b a
>
> and I'd like to turn this into a Python array:
You mean a Python list. The datatype Python calls an `array` is very
different and relativ
On Tue, Oct 23, 2012 at 11:41 PM, Evan Driscoll wrote:
> OK, one more self-reply. :-)
>
> I found http://bugs.python.org/issue5380 which seems to be relevant. Sounds
> like the OS is returning an error, and that's naturally being propagated
> through Python. And further testing reveals the problem
On 23 Oct 2012 14:06:59 -0400, r...@panix.com (Roy Smith) wrote:
> I have a url from which I can get an image. I want to use PIL to
> manipulate that image. Getting the image is easy:
>
> >>> import requests
> >>> r = requests.get(url)
>
> There's a bunch of factory functions for Image, but non
> Of course, if you want these to be ints, then you can either change the
> format of your int list, or map(int, list_) if you don't have control over it.
Ugh, I'm tired. Shouldn't map it, the conversion should be done in the list
comprehension to avoid a needless second list iteration.
K, I'
On Wed, Oct 24, 2012 at 1:23 AM, seektime wrote:
> Here's some example code. The input is a list which is a "matrix" of letters:
>a b a
>b b a
>
> and I'd like to turn this into a Python array:
>
> 1 2 1
> 2 2 1
>
> so 1 replaces a, and 2 replaces b. Here's the code I have so far:
On 2012-10-23, at 10:45 PM, Demian Brecht wrote:
list_ = [d[c] for c in s.strip('\n').split()]
list_
> ['1', '2', '1', '2', '2', '1']
Of course, if you want these to be ints, then you can either change the format
of your int list, or map(int, list_) if you don't have control over it
satyam writes:
> I have a text file like this
>
> A1980JE3937 2732 4195 12.527000
> A1980JE3937 3465 9720 22.00
> A1980JE3937 2732 9720 18.00
> A1980KK18700010 130 303 4.985000
> A1980KK18700010 7 4915 0.435000
[...]
> I want to split the file and get multiple files like
> A19
On 2012-10-23, at 10:23 PM, seektime wrote:
> My question is how can I turn "seq" into a python array?
Something like this perhaps?:
>>> alpha = ('a', 'b')
>>> numeric = ('1', '2')
>>> L = ['a b a\n', 'b b a\n']
>>> s = ' '.join(L)
>>> d = dict(zip(alpha, numeric))
>>> list_ = [d[c] for c in s.
On 2012-10-23, at 10:24 PM, David Hutto wrote:
> count = 0
Don't use count.
> for file_data in turn_text_to_txt:
Use enumerate:
for count, file_data in enumerate(turn_text_to_txt):
> f = open('/home/david/files/%s_%s.txt' % (file_data.split(' ')[0], count),
> 'w')
Use with:
with open('file
Here's some example code. The input is a list which is a "matrix" of letters:
a b a
b b a
and I'd like to turn this into a Python array:
1 2 1
2 2 1
so 1 replaces a, and 2 replaces b. Here's the code I have so far:
>>> L=['a b a\n','b b a\n']
>>> s=' '.join(L)
>>> seq1=('a','b')
>
On Tue, Oct 23, 2012 at 11:01 PM, satyam wrote:
> I have a text file like this
>
> A1980JE3937 2732 4195 12.527000
> A1980JE3937 3465 9720 22.00
> A1980JE3937 1853 3278 12.50
> A1980JE3937 2732 2732 187.50
> A1980JE3937 19 4688 3.619000
> A1980JE3937 2995 9720 6
OK, one more self-reply. :-)
I found http://bugs.python.org/issue5380 which seems to be relevant.
Sounds like the OS is returning an error, and that's naturally being
propagated through Python. And further testing reveals the problem only
surfaces when the child actually exits -- if the child
I have the following program. Everything is sunshine and rainbows when I
run in in Python 2, but when I run it under Python 3 I get an IOError.
2to3 only reports one dumb suggestion re. a print call (which I can get
rid of by importing __future__'s print_function, and then it just
suggests remo
Thanks I will take a look...My actual data is 2.5Gb in size.
Satyam
On Tue, Oct 23, 2012 at 10:43 PM, Jason Friedman wrote:
> On Tue, Oct 23, 2012 at 9:01 PM, satyam wrote:
> > I have a text file like this
> >
> > A1980JE3937 2732 4195 12.527000
> > A1980JE3937 3465 9720 22.00
> > A1
On Tue, Oct 23, 2012 at 9:01 PM, satyam wrote:
> I have a text file like this
>
> A1980JE3937 2732 4195 12.527000
> A1980JE3937 3465 9720 22.00
> A1980JE3937 1853 3278 12.50
> A1980JE3937 2732 2732 187.50
> A1980JE3937 19 4688 3.619000
> A1980KK18700010 30 186 1.285
> I have a text file like this
>
> A1980JE3937 2732 4195 12.527000
> A1980JE3937 3465 9720 22.00
> A1980KK18700010 186 3366 4.78
> A1980KK18700010 30 186 1.285000
> A1980KK18700010 30 185 4.395000
> A1980KK18700010 185 186 9.00
> A1980KK18700010 25 30 3.493000
>
> I want to spli
I have a text file like this
A1980JE3937 2732 4195 12.527000
A1980JE3937 3465 9720 22.00
A1980JE3937 1853 3278 12.50
A1980JE3937 2732 2732 187.50
A1980JE3937 19 4688 3.619000
A1980JE3937 2995 9720 6.667000
A1980JE3937 1603 9720 30.00
A1980JE3937 234
Oh, and a little more information:
The log.txt file I create has the message that it's "about to execlp",
and the exec() *does* actually happen -- the IOError is raised after the
child process quits.
Evan
On 10/23/2012 09:59 PM, Evan Driscoll wrote:
I have the following program. Everything
On Tue, Oct 23, 2012 at 8:06 PM, Oscar Benjamin
wrote:
> On 23 October 2012 15:31, Virgil Stokes wrote:
>> I am working with some rather large data files (>100GB) that contain time
>> series data. The data (t_k,y(t_k)), k = 0,1,...,N are stored in ASCII
>> format. I perform various types of proce
On 10/23/12 13:37, Virgil Stokes wrote:
> Yes, I do wish to inverse the order, but the "forward in time"
> file will be in binary.
Your original post said:
> The data (t_k,y(t_k)), k = 0,1,...,N are stored in ASCII format
making it hard to know what sort of data is in this file.
So I guess it
On 23 October 2012 15:31, Virgil Stokes wrote:
> I am working with some rather large data files (>100GB) that contain time
> series data. The data (t_k,y(t_k)), k = 0,1,...,N are stored in ASCII
> format. I perform various types of processing on these data (e.g. moving
> median, moving average, an
On Tue, 23 Oct 2012 17:24:34 -0600, Ian Kelly wrote:
> On Tue, Oct 23, 2012 at 4:34 PM, Steven D'Aprano
> wrote:
>> On Tue, 23 Oct 2012 10:50:11 -0600, Ian Kelly wrote:
>>
if someone is foolish enough to use the
from xyz import *
notation...
>>>
>>> It's already a
On Tue, Oct 23, 2012 at 7:35 PM, emile wrote:
> On 10/23/2012 04:19 PM, David Hutto wrote:
>>
>> Whether this is fast enough, or not, I don't know:
>
>
> well, the OP's original post started with
> "I am working with some rather large data files (>100GB)..."
Well, is this a dedicated system, an
Stripping the line did it !!!
Thank you very much to all !!!
Cheers! :-)
Martin
Le mardi 23 octobre 2012 16:36:44 UTC-4, Vlastimil Brom a écrit :
> 2012/10/23 MartinD.
>
> > Hi,
>
> >
>
> > I'm new to Python.
>
> > Does someone has an idea what's wrong. I tried everything. The only regex
Virgil Stokes writes:
> Yes, I do wish to inverse the order, but the "forward in time" file
> will be in binary.
I really think it will be simplest to just write the file in forward
order, then use mmap to read it one record at a time. It might be
possible to squeeze out a little more performan
On 10/23/2012 11:23 AM, David M Chess wrote:
> We have a TimedRotatingFileHandler with when='midnight'
You give us no clue what's in this class, or how it comes up with the
filenames used.
> .
>
> This works great, splitting the log information across files by date, as
> long as the process is
On 10/23/2012 04:19 PM, David Hutto wrote:
Whether this is fast enough, or not, I don't know:
well, the OP's original post started with
"I am working with some rather large data files (>100GB)..."
filename = "data_file.txt"
f = open(filename, 'r')
forward = [line.rstrip('\n') for line in f
On Tue, Oct 23, 2012 at 6:53 PM, Steven D'Aprano
wrote:
> On Tue, 23 Oct 2012 17:50:55 -0400, David Hutto wrote:
>
>> On Tue, Oct 23, 2012 at 10:31 AM, Virgil Stokes wrote:
>>> I am working with some rather large data files (>100GB)
> [...]
>>> Finally, to my question --- What is a fast way to wr
On Tue, Oct 23, 2012 at 4:34 PM, Steven D'Aprano
wrote:
> On Tue, 23 Oct 2012 10:50:11 -0600, Ian Kelly wrote:
>
>>> if someone is foolish enough to use the
>>>
>>> from xyz import *
>>>
>>> notation...
>>
>> It's already a SyntaxError to use a wildcard import anywhere other than
>> the mo
On Tue, 23 Oct 2012 22:42:08 +
"Prasad, Ramit" wrote:
> Nick Sabalausky wrote:
> > On Mon, 22 Oct 2012 14:35:23 -0700 (PDT)
> > darnold wrote:
> > >
> > > i'm not brave enough to dig too deeply into SQLAlchemy, but maybe
> > > this will help? :
> > >
> > > http://kashififtikhar.blogspot.com/
Whether this is fast enough, or not, I don't know:
filename = "data_file.txt"
f = open(filename, 'r')
forward = [line.rstrip('\n') for line in f.readlines()]
backward = [line.rstrip('\n') for line in reversed(forward)]
f.close()
print forward, "\n\n", "\n\n", backward, "\n"
> This is a classic example of why the old external processing algorithms
> of the 1960s and 70s will never be obsolete. No matter how much memory
> you have, there will always be times when you want to process more data
> than you can fit into memory.
But surely nobody will *ever* need more t
On Tue, 23 Oct 2012 17:50:55 -0400, David Hutto wrote:
> On Tue, Oct 23, 2012 at 10:31 AM, Virgil Stokes wrote:
>> I am working with some rather large data files (>100GB)
[...]
>> Finally, to my question --- What is a fast way to write these variables
>> to an external file and then read them in
> Missed the part about it being a file. Use:
>
> forward = ["%i = %s" % (i,chr(i)) for i in range(33,126)]
> backward = ["%i = %s" % (i,chr(i)) for i in range(126,32,-1)]
>
> print forward,backward
>
This was a dud, let me rework it real quick, I deleted what i had, and
accidentally wrote the wro
Nick Sabalausky wrote:
> On Mon, 22 Oct 2012 14:35:23 -0700 (PDT)
> darnold wrote:
> >
> > i'm not brave enough to dig too deeply into SQLAlchemy, but maybe this
> > will help? :
> >
> > http://kashififtikhar.blogspot.com/2010/07/using-sqlalchemy-reflection-with-pylons.html
> >
> > that came up fr
> Don't forget to use timeit for an average OS utilization.
>
> I'd suggest two list comprehensions for now, until I've reviewed it some more:
>
> forward = ["%i = %s" % (i,chr(i)) for i in range(33,126)]
> backward = ["%i = %s" % (i,chr(i)) for i in range(126,32,-1)]
>
> for var in forward:
>
On Tue, 23 Oct 2012 10:50:11 -0600, Ian Kelly wrote:
>> if someone is foolish enough to use the
>>
>> from xyz import *
>>
>> notation...
>
> It's already a SyntaxError to use a wildcard import anywhere other than
> the module level, so its use can only affect global variables.
In Python
On Mon, 22 Oct 2012 14:35:23 -0700 (PDT)
darnold wrote:
>
> i'm not brave enough to dig too deeply into SQLAlchemy, but maybe this
> will help? :
>
> http://kashififtikhar.blogspot.com/2010/07/using-sqlalchemy-reflection-with-pylons.html
>
> that came up from googling "sqlalchemy table reflecti
On Tue, Oct 23, 2012 at 10:31 AM, Virgil Stokes wrote:
> I am working with some rather large data files (>100GB) that contain time
> series data. The data (t_k,y(t_k)), k = 0,1,...,N are stored in ASCII
> format. I perform various types of processing on these data (e.g. moving
> median, moving ave
According to the docs
(http://docs.python.org/library/socketserver.html#requesthandler-objects)
there's self.server available.
--
http://mail.python.org/mailman/listinfo/python-list
> jorge
> I'm programming a server that most send a message to each client
> connected to it and nothing else. this is obviously a base of what i
> want to do. the thing is, I made a class wich contains the Handler class
> for the ThreadingTCPServer and starts the server but i don't know how
Announcing Urwid 1.1.0
--
Urwid home page:
http://excess.org/urwid/
Manual:
http://excess.org/urwid/docs/
Package:
http://pypi.python.org/pypi/urwid/1.1.0
About this release:
===
This is a major feature release for Urwid.
The first focus for this rel
2012/10/23 MartinD. :
> Hi,
>
> I'm new to Python.
> Does someone has an idea what's wrong. I tried everything. The only regex
> that is tested is the last one in a whole list of regex in keywords.txt
> Thanks!
> Martin
>
>
>
> def checkKeywords( str, lstKeywords ):
>
> for regex
On Tue, Oct 23, 2012 at 1:51 PM, MartinD. wrote:
> Hi,
>
> I'm new to Python.
> Does someone has an idea what's wrong. I tried everything. The only regex
> that is tested is the last one in a whole list of regex in keywords.txt
> Thanks!
> Martin
How do you know that it's the only one being tes
MartinD wrote:
> Hi,
>
> I'm new to Python.
> Does someone has an idea what's wrong. I tried everything. The only regex
> that is tested is the last one in a
> whole list of regex in keywords.txt
> Thanks!
> Martin
>
>
>
> def checkKeywords( str, lstKeywords ):
>
> for regex in
On 23 October 2012 21:06, Joshua Landau wrote:
> On 23 October 2012 21:03, Joshua Landau wrote:
>
>> On 23 October 2012 12:07, Jean-Michel Pichavant
>> wrote:
>>
>>> - Original Message -
>>>
>>> > Thankyou.. but my problem is different than simply joining 2 lists
>>> > and it is done now
ok I got it guys...
On Tue, Oct 23, 2012 at 10:08 PM, Joshua Landau
wrote:
> On 23 October 2012 21:06, Joshua Landau wrote:
>
>> On 23 October 2012 21:03, Joshua Landau wrote:
>>
>>> On 23 October 2012 12:07, Jean-Michel Pichavant
>>> wrote:
>>>
- Original Message -
> Th
On 23 October 2012 21:03, Joshua Landau wrote:
> On 23 October 2012 12:07, Jean-Michel Pichavant wrote:
>
>> - Original Message -
>>
>> > Thankyou.. but my problem is different than simply joining 2 lists
>> > and it is done now :)
>>
>>
>> A lot of people though you were asking for j
Virgil Stokes wrote:
> Not sure about "tac" --- could you provide more details on this
> and/or a simple example of how it could be used for fast reversed
> "reading" of a data file ?
tac is available as a command under linux
$ whatis tac
tac (1) - concatenate and print files in re
On 23 October 2012 12:07, Jean-Michel Pichavant wrote:
> - Original Message -
>
> > Thankyou.. but my problem is different than simply joining 2 lists
> > and it is done now :)
>
>
> A lot of people though you were asking for joining lists, you description
> was misleading.
>
> I'll ta
Hi,
I'm new to Python.
Does someone has an idea what's wrong. I tried everything. The only regex that
is tested is the last one in a whole list of regex in keywords.txt
Thanks!
Martin
def checkKeywords( str, lstKeywords ):
for regex in lstKeywords:
match
On 23-Oct-2012 19:56, Tim Chase wrote:
On 10/23/12 12:17, Virgil Stokes wrote:
On 23-Oct-2012 18:09, Tim Chase wrote:
Finally, to my question --- What is a fast way to write these
variables to an external file and then read them in
backwards?
Am I missing something, or would the fairly-standar
On 2012-10-23 18:06:59 +, Roy Smith said:
I have a url from which I can get an image. I want to use PIL to
manipulate that image. Getting the image is easy:
import requests
r = requests.get(url)
There's a bunch of factory functions for Image, but none of them seem
to take anything that
I have a url from which I can get an image. I want to use PIL to
manipulate that image. Getting the image is easy:
>>> import requests
>>> r = requests.get(url)
There's a bunch of factory functions for Image, but none of them seem
to take anything that requests is willing to give you. Image.ne
On 10/23/12 12:17, Virgil Stokes wrote:
> On 23-Oct-2012 18:09, Tim Chase wrote:
>>> Finally, to my question --- What is a fast way to write these
>>> variables to an external file and then read them in
>>> backwards?
>> Am I missing something, or would the fairly-standard "tac"
>> utility do the r
On Tue, Oct 23, 2012 at 9:13 AM, Travis Griggs wrote:
>
> On Oct 22, 2012, at 6:33 PM, MRAB wrote:
>
>> Another way you could do it is:
>>
>> while True:
>>chunk = byteStream.read(4)
>>if not chunk:
>>break
>>...
>>
>> And you could fetch multiple signatures in one read:
>>
>>
On 23-Oct-2012 18:35, Dennis Lee Bieber wrote:
On Tue, 23 Oct 2012 16:31:17 +0200, Virgil Stokes
declaimed the following in gmane.comp.python.general:
Finally, to my question --- What is a fast way to write these variables to an
external file and then read them in backwards?
Stuff th
On 23-Oct-2012 18:17, Paul Rubin wrote:
Virgil Stokes writes:
Finally, to my question --- What is a fast way to write these
variables to an external file and then read them in backwards?
Seeking backwards in files works, but the performance hit is
significant. There is also a performance hit
On 23-Oct-2012 18:09, Tim Chase wrote:
On 10/23/12 09:31, Virgil Stokes wrote:
I am working with some rather large data files (>100GB) that contain time series
data. The data (t_k,y(t_k)), k = 0,1,...,N are stored in ASCII format. I perform
various types of processing on these data (e.g. moving
Tim Chase writes:
> Again, the conversion to/from decimal hasn't been a great cost in my
> experience, as it's overwhelmed by the I/O cost of shoveling the
> data to/from disk.
I've found that cpu costs both for processing and conversion are
significant. Also, using a binary format makes the fil
On 10/23/12 11:17, Paul Rubin wrote:
> Virgil Stokes writes:
>> Finally, to my question --- What is a fast way to write these
>> variables to an external file and then read them in backwards?
>
> Seeking backwards in files works, but the performance hit is
> significant. There is also a performa
On Mon, Oct 22, 2012 at 7:39 PM, Dennis Lee Bieber
wrote:
> On Mon, 22 Oct 2012 16:02:34 -0600, Ian Kelly
> declaimed the following in gmane.comp.python.general:
>
>> On my wishlist for Python is a big, fat SyntaxError for any variable
>> that could be interpreted as either local or nonlocal and
On Tue, Oct 23, 2012 at 12:47 AM, wrote:
> The latest Python version is systematically slower
> than the previous ones as soon as one uses non "ascii
> strings".
No, it isn't. You've previously demonstrated a *microbenchmark* where
3.3 is slower than 3.2. This is a far cry from demonstrating t
On 2012-10-23 08:00, Paul Volkov wrote:
2012/10/22 MRAB :
By the way, the recommendation is for module names to be lowercase with
underscores, so "fund_rose" instead of "FundRose".
Try this code:
I tried as you suggested, but the linker error (unresolved external)
is still there.
I found a
Paul Rubin writes:
> Seeking backwards in files works, but the performance hit is
> significant. There is also a performance hit to scanning pointers
> backwards in memory, due to cache misprediction. If it's something
> you're just running a few times, seeking backwards the simplest
> approach.
Virgil Stokes writes:
> Finally, to my question --- What is a fast way to write these
> variables to an external file and then read them in backwards?
Seeking backwards in files works, but the performance hit is
significant. There is also a performance hit to scanning pointers
backwards in memor
On 10/23/12 09:31, Virgil Stokes wrote:
> I am working with some rather large data files (>100GB) that contain time
> series
> data. The data (t_k,y(t_k)), k = 0,1,...,N are stored in ASCII format. I
> perform
> various types of processing on these data (e.g. moving median, moving
> average,
We have a TimedRotatingFileHandler with when='midnight'.
This works great, splitting the log information across files by date, as
long as the process is actually up at midnight.
But now the users have noticed that if the process isn't up at midnight,
they can end up with lines from two (or I g
On Oct 22, 2012, at 6:33 PM, MRAB wrote:
> By the way, in Python the recommended style for variable names (well,
> what you'd call a 'variable' in other languages :-)) is lowercase with
> underscores, e.g. "byte_stream".
We went with the
"...mixedCase is allowed only in contexts where that's
On Oct 22, 2012, at 6:33 PM, MRAB wrote:
> Another way you could do it is:
>
> while True:
>chunk = byteStream.read(4)
>if not chunk:
>break
>...
>
> And you could fetch multiple signatures in one read:
>
> signatures = list(struct.unpack('>{}I'.format(valveCount), byteStr
I am working with some rather large data files (>100GB) that contain time series
data. The data (t_k,y(t_k)), k = 0,1,...,N are stored in ASCII format. I perform
various types of processing on these data (e.g. moving median, moving average,
and Kalman-filter, Kalman-smoother) in a sequential man
I'm programming a server that most send a message to each client
connected to it and nothing else. this is obviously a base of what i
want to do. the thing is, I made a class wich contains the Handler class
for the ThreadingTCPServer and starts the server but i don't know how
can i access the m
On 10/23/2012 03:36 AM, inshu chauhan wrote:
> can we append a list with another list in Python ? using the normal routine
> syntax but with a for loop ??
>
>
To combine list a with list b, you can do any of:
c = a + b
a += b
a.extend(b)
Obviously, the first leaves a unmodified, while the other
Python template engines offer high reusability of markup code and the following
features are used by content developers most of the time:
* Includes: useful to incorporate some snippets of content that in most cases
are common to the site, e.g. footer, scripts, styles, etc.
* Extends: useful t
On 23/10/2012 07:47, wxjmfa...@gmail.com wrote:
Why bother with speeed?
The latest Python version is systematically slower
than the previous ones as soon as one uses non "ascii
strings".
Python users are discussing "code optimizations" without
realizing the tool they are using, has killed itse
On 2012-10-23, wxjmfa...@gmail.com wrote:
> Why bother with speeed?
Because the differences between O(N), O(log(N)) and O(N ** 2)
operations are often relevant.
A Python string replace function experiencing a slow-down from
previous versions doesn't absolve me from making informed choices
of alg
dirty tara lynn takes on multiple cocks
http://www.google.com/search?hl=en&q=dirty+tara+lynn+takes+on+multiple+cocks+site:wxwusqxeh470.blogspot.com&btnI=I%27m+Feeling+Lucky
--
http://mail.python.org/mailman/listinfo/python-list
Tim,
I am re-implementing in my script now. I'll let you know how it goes... I
just realized that the key that I sent over was completely wrong I am
not sure how I even got it as it is the combination of two different keys
from two different scripts... must have been working too long and
ever
- Original Message -
> Thankyou.. but my problem is different than simply joining 2 lists
> and it is done now :)
A lot of people though you were asking for joining lists, you description was
misleading.
I'll take a guess: you want to flatten a list of list.
"Nested" list comprehe
Hello,
>> Unfortunately this setup makes `logging.basicConfig` pretty useless.
>> However, I believe that this is something that more people could
>> benefit from. I also believe, that it just "makes sense" to send
>> warnings (and above) to `stderr`, the rest to `stdout`.
[...]
> Python 2.x is
Thankyou.. but my problem is different than simply joining 2 lists and it
is done now :)
On Tue, Oct 23, 2012 at 11:38 AM, Joshua Landau
wrote:
> On 23/10/2012, inshu chauhan wrote:
> > can we append a list with another list in Python ? using the normal
> routine
> > syntax but with a for lo
On 23/10/2012, inshu chauhan wrote:
> can we append a list with another list in Python ? using the normal routine
> syntax but with a for loop ??
I assume you want to join two lists.
You are corrrect that we can do:
>>> start = [1, 2, 3, 4]
>>> end = [5, 6, 7, 8]
>>>
>>> for end_item in end:
>>
On Friday, October 19, 2012 12:32:48 PM UTC+2, Gilles wrote:
> In that case, are you sure a web script is a good idea? If you're
> thinking web to make it easy for people to upload data, click on a
> button, and get the results back, you might want to write the UI in
> Python but write the number c
-- Forwarded message --
From: Zero Piraeus
Date: Tue, Oct 23, 2012 at 11:14 AM
Subject: Re: can we append a list with another list in Python ?
To: inshu chauhan
:
On 23 October 2012 05:01, inshu chauhan wrote:
> this is because this makes a single list out of 2 lists.. but I w
> ... but I'm not sure what you mean by "... with a for loop"?
>
> -[]z.
>
>
Maybe this? :
-
x = [1,2,3]
y = [10,20,30]
for z in y:
x.append(z)
print x
-
But list.extend should be right way.
Cheers
--
http://mail.python.org/mailman/listinfo/python-list
:
On 23 October 2012 03:36, inshu chauhan wrote:
> can we append a list with another list in Python ? using the normal routine
> syntax but with a for loop ??
The standard way to append the contents of one list to another is list.extend:
>>> a = [1, 2, 3]
>>> b = [4, 5, 6]
>>> a.extend(b)
>>> a
> can we append a list with another list in Python ? using the normal routine
> syntax but with a for loop ??
x = [1,2,3]
y = [10,20,30]
x.extend( y )
print x
this will give you [1,2,3,10,20,30] which I guess is what you want.
Cheers,
Daniel
--
Psss, psss, put it down! - http://www.cafepress
On 22/10/2012 21:01, Kevin Holleran wrote:
> Tim,
>
> I am looking here:
>
> SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{BF9F6FB0-C999-4D19-BED0-144F77E2A9D6}
>
> Enumerating the keys for a BusType == 5, then grabbing the values of
> DriverDesc, DriverDate, & DriverVersion.
>
> So I am
Python 2.7.3 (default, Apr 10 2012, 23:24:47) [MSC v.1500 64 bit
(AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> [1,2,3,4,5] + [99,88,77,66,0]
[1, 2, 3, 4, 5, 99, 88, 77, 66, 0]
On Tue, Oct 23, 2012 at 6:36 PM, inshu chauhan wrote:
> can we append a li
On 23/10/2012, Dennis Lee Bieber wrote:
> On Mon, 22 Oct 2012 16:02:34 -0600, Ian Kelly
> declaimed the following in gmane.comp.python.general:
>
>> On my wishlist for Python is a big, fat SyntaxError for any variable
>> that could be interpreted as either local or nonlocal and is not
>> explicit
2012/10/22 MRAB :
> By the way, the recommendation is for module names to be lowercase with
> underscores, so "fund_rose" instead of "FundRose".
>
> Try this code:
>
I tried as you suggested, but the linker error (unresolved external)
is still there.
I'm sure python33.lib is properly added because
95 matches
Mail list logo