On Mon, Oct 13, 2014 at 5:36 PM, Ben Finney wrote:
> So this is something similar to an HTTP object cache. Except where those
> are usually URL-focussed with the local files a hidden implementation
> detail, I want an API that focusses on the local files, with the remote
> requests a hidden implem
On Mon, Oct 13, 2014 at 1:31 PM, Rustom Mody wrote:
> Hearing a bit about docker nowadays.
>
> Here's why its supposedly better than a VM:
> https://www.docker.com/whatisdocker/
>
> Downsides?? No idea!
One obvious downside is that it doesn't allow guests to modify the OS
at all. A VM gives you a
On Monday, October 13, 2014 1:24:27 PM UTC+5:30, Chris Angelico wrote:
> On Mon, Oct 13, 2014 at 1:31 PM, Rustom Mody wrote:
> > Hearing a bit about docker nowadays.
> > Here's why its supposedly better than a VM:
> > https://www.docker.com/whatisdocker/
> > Downsides?? No idea!
> One obvious down
On Mon, 13 Oct 2014 05:43:10 +1100, Chris Angelico wrote:
> On Mon, Oct 13, 2014 at 5:38 AM, Tony the Tiger
> wrote:
>>> colour = 'red' if colour == 'blue' else 'blue'
>>
>> I call that a subtle bug that most likely will jump up and bite your
>> behind when you least expect it.
>
> More generall
On 10/12/2014 07:08 PM, Shiva wrote:
while ans.lower() != 'yes' or ans.lower()[0] != 'y':
ans = input('Do you like python?')
I personally consider double negations less intuitive than following:
while not( ans.lower() == 'yes' and ans.lower()[0] == 'y' ):
Reading this line yoy would ha
I am getting this error trying to use a python27 pip install of stuff which ends
up requiring pysqlite>=2.6.3,<2.7
building 'pysqlite2._sqlite' extension
creating build\temp.win-amd64-2.7
creating build\temp.win-amd64-2.7\Release
creating build\temp.win-amd64-2.7\Release\src
c:\Program File
Ian Kelly Wrote in message:
> On Sun, Oct 12, 2014 at 6:55 AM, roro codeath wrote:
>> How to implement it in my class?
>>
>> class Str(str):
>> def __init__(self, *args, **kwargs):
>> pass
>>
>> Str('smth', kwarg='a')
>
> The error is coming from the __new__ method. Because str is an
Dave Angel wrote:
> Ian Kelly Wrote in
> message:
>> On Sun, Oct 12, 2014 at 6:55 AM, roro codeath
>> wrote:
>>> How to implement it in my class?
>>>
>>> class Str(str):
>>> def __init__(self, *args, **kwargs):
>>> pass
>>>
>>> Str('smth', kwarg='a')
>>
>> The error is coming from t
Dear All,
How to write a program for reading or parsing the XML file in Sub root Wise.
For ex:
Below XMl, I want to read/ parse first country details and here also two year
tag values are there.. Here I need to read/parse first year value only measn
'2008' Only..After that I need to read secon
On Mon, Oct 13, 2014 at 7:31 PM, Gelonida N wrote:
> Taking into account the Steven's suggestion about using the 'in' expression
> it could be:
>
>
> while True:
> ans = input('Do you like python?')
> if ans.lower() in ('yes', 'y'):
> break
Or, even simpler: Use an active conditio
Chris Angelico :
> Or, even simpler: Use an active condition.
>
> while input('Do you like python?') not in ('yes', 'y'): pass
Instead of the traditional "pull" technology, you could take advantage
of the state-of-the-art "push" approach:
print("You must love python -- everybody does!")
Mar
On Mon, Oct 13, 2014 at 6:59 AM, Chris Angelico wrote:
> while input('Do you like python?') not in ('yes', 'y'): pass
Unfortunately, you probably have to account for people who SHOUT:
while input('Do you like python?').lower() not in ('yes', 'y'): pass
Skip
--
https://mail.python.org/m
On Mon, Oct 13, 2014 at 11:10 PM, Skip Montanaro
wrote:
> On Mon, Oct 13, 2014 at 6:59 AM, Chris Angelico wrote:
>>
>> while input('Do you like python?') not in ('yes', 'y'): pass
>
>
> Unfortunately, you probably have to account for people who SHOUT:
>
> while input('Do you like python?').lo
On Mon, Oct 13, 2014 at 11:09 PM, Marko Rauhamaa wrote:
> Chris Angelico :
>
>> Or, even simpler: Use an active condition.
>>
>> while input('Do you like python?') not in ('yes', 'y'): pass
>
> Instead of the traditional "pull" technology, you could take advantage
> of the state-of-the-art "push"
On Mon, Oct 13, 2014 at 7:00 PM, Rustom Mody wrote:
> On Monday, October 13, 2014 1:24:27 PM UTC+5:30, Chris Angelico wrote:
>> On Mon, Oct 13, 2014 at 1:31 PM, Rustom Mody wrote:
>> > Hearing a bit about docker nowadays.
>> > Here's why its supposedly better than a VM:
>> > https://www.docker.com
On 10/12/14 9:33 AM, Albert-Jan Roskam wrote:
Hi,
(sorry for cross-posting)
A few days ago I needed to check whether some Python code ran with Python 2.6.
What is the easiest way to install another Python version along side the
default Python version? My own computer is Debian Linux 64 bit, b
On Mon, Oct 13, 2014 at 5:39 AM, Venugopal Reddy
wrote:
> Dear All,
>
> How to write a program for reading or parsing the XML file in Sub root Wise.
I don't know what "Sub root Wise" is. You can find an overview of
Python's XML parsing interfaces at
https://docs.python.org/2/library/xml.html. I w
On Mon, 13 Oct 2014 09:56:02 +1100
Steven D'Aprano wrote:
>
> When you have multiple clauses in the condition, it's easier to reason about
> them if you write the clauses as positive statements rather than negative
> statements, that is, "something is true" rather than "something is not
> true",
On Monday, October 13, 2014 9:43:03 PM UTC+5:30, Rob Gaddi wrote:
> On Mon, 13 Oct 2014 09:56:02 +1100
> Steven D'Aprano wrote:
> > When you have multiple clauses in the condition, it's easier to reason about
> > them if you write the clauses as positive statements rather than negative
> > stateme
On Mon, 13 Oct 2014 09:26:57 -0700 (PDT)
Rustom Mody wrote:
> On Monday, October 13, 2014 9:43:03 PM UTC+5:30, Rob Gaddi wrote:
> > On Mon, 13 Oct 2014 09:56:02 +1100
> > Steven D'Aprano wrote:
> > > When you have multiple clauses in the condition, it's easier to reason
> > > about
> > > them i
On Monday, October 13, 2014 10:13:20 PM UTC+5:30, Rob Gaddi wrote:
> On Mon, 13 Oct 2014 09:26:57 -0700 (PDT)
> Rustom Mody wrote:
> > On Monday, October 13, 2014 9:43:03 PM UTC+5:30, Rob Gaddi wrote:
> > > On Mon, 13 Oct 2014 09:56:02 +1100
> > > Steven D'Aprano wrote:
> > > > When you have mul
Hi,
I have a text file. Now it is required to select every other line of that text
to
generate a new text file. I have read through Python grammar, but still lack
the
idea at the beginning of the task. Could you tell me some methods to get this?
Thanks,
--
https://mail.python.org/mailman/lis
On Tue, Oct 14, 2014 at 4:38 AM, Rff wrote:
> I have a text file. Now it is required to select every other line of that
> text to
> generate a new text file. I have read through Python grammar, but still lack
> the
> idea at the beginning of the task. Could you tell me some methods to get
> t
In <3be64ca8-d2e7-493a-b4f3-ef114f581...@googlegroups.com> Rff
writes:
> Hi,
> I have a text file. Now it is required to select every other line of that
> text to generate a new text file. I have read through Python grammar, but
> still lack the idea at the beginning of the task. Could you tell
On 10/13/2014 10:38 AM, Rff wrote:
Hi,
I have a text file. Now it is required to select every other line of that text
to
generate a new text file. I have read through Python grammar, but still lack
the
idea at the beginning of the task. Could you tell me some methods to get this?
Thanks,
On 13/10/2014 18:48, John Gordon wrote:
In <3be64ca8-d2e7-493a-b4f3-ef114f581...@googlegroups.com> Rff
writes:
Hi,
I have a text file. Now it is required to select every other line of that
text to generate a new text file. I have read through Python grammar, but
still lack the idea at the beg
On 10/13/2014 11:02 AM, Mark Lawrence wrote:
Why bother to initialise a counter when you can get the enumerate
function to do all the work for you?
I see it as a question of addressing the audience.
Emile
--
https://mail.python.org/mailman/listinfo/python-list
Trying to get scipy 0.14 running on python 3.4.1 on SLES 11 SP2 LINUX system.
Scipy seemed to compile fine using the command "python setup.py install" but
when I try the scipy.test("full"), I get errors regarding gfortran. I am using
GCC(gfortran) version 4.9.1.
The error states that /usr/lib/l
On Mon, Oct 13, 2014 at 2:11 PM, emile wrote:
> On 10/13/2014 11:02 AM, Mark Lawrence wrote:
>
>> Why bother to initialise a counter when you can get the enumerate
>> function to do all the work for you?
>
>
> I see it as a question of addressing the audience.
>
> Emile
I don't agree with the ide
On 2014-10-13, Chris Angelico wrote:
> On Tue, Oct 14, 2014 at 4:38 AM, Rff wrote:
>> I have a text file. Now it is required to select every other line of that
>> text to
>> generate a new text file. I have read through Python grammar, but still
>> lack the
>> idea at the beginning of the tas
On 2014-10-13 10:38, Rff wrote:
> Hi,
> I have a text file. Now it is required to select every other line
> of that text to generate a new text file. I have read through
> Python grammar, but still lack the idea at the beginning of the
> task. Could you tell me some methods to get this?
You could
On 2014-10-13 14:45, Joel Goldstick wrote:
> Not apropos to the OP, but what came up in my mind was to write a
> generator function that returns every other line. This would
> separate the reading from the writing code.
You mean like
offset = 0 # or 1 if you prefer
for line in itertools.isli
On 10/13/2014 12:12 PM, Tim Chase wrote:
You mean like
offset = 0 # or 1 if you prefer
for line in itertools.islice(source_iter, offset, None, 2):
do_something(line)
I certainly did. Learning the python standard library is different from
learning python and each in its own time.
On 10/13/2014 4:31 PM, Dennis Lee Bieber wrote:
On Mon, 13 Oct 2014 10:49:27 +0100, Robin Becker
declaimed the following:
c:\users\rptlab\tmp\tmcallister\build\pysqlite\src\connection.h(33) : fatal
error C1083: Cannot open include file: 'sqli
te3.h': No such file or directory
Did \n get stu
On 10/10/2014 04:22 PM, Juan Christian wrote:
> Maybe that's because I feel the Django doc a bit confuse, I tried reading
> (and practicing!) tutorials, official doc, books, and so on, but I can't
> quite understand the whole thing.
>
> Is Flask really underestimated? Can you guys mention "big nam
On 10/13/2014 11:12 AM, Rustom Mody wrote:
> On Monday, October 13, 2014 10:13:20 PM UTC+5:30, Rob Gaddi wrote:
>> On Mon, 13 Oct 2014 09:26:57 -0700 (PDT)
>> Rustom Mody wrote:
>
>>> On Monday, October 13, 2014 9:43:03 PM UTC+5:30, Rob Gaddi wrote:
On Mon, 13 Oct 2014 09:56:02 +1100
St
On Mon, 13 Oct 2014 10:38:48 -0700, Rff wrote:
> I have a text file. Now it is required to select every other line of
> that text to
> generate a new text file. I have read through Python grammar, but still
> lack the idea at the beginning of the task. Could you tell me some
> methods to get th
On Mon, Oct 13, 2014 at 10:38 AM, Rff wrote:
> Hi,
> I have a text file. Now it is required to select every other line of that
> text to
> generate a new text file. I have read through Python grammar, but still lack
> the
> idea at the beginning of the task. Could you tell me some methods to g
Hi,
I have a log file which has lot of information like..SQL query.. number of
records read...records loaded etc..
My requirement is i would like to read the SQL query completly and write it to
another txt file.. also the log file may not be always same so can not make
static choices...
my lo
On 10/12/2014 08:05 PM, ryguy7272 wrote:
> Ah!!! I didn't know I needed to run it from the command prompt! Ok, not
> it makes sense, and everything works.
>
> Thanks to all!
You don't have to run python apps from the command line. Apps that
throw up windows can usually be run by double-cl
On 14/10/2014 11:47 AM, Sagar Deshmukh wrote:
I have a log file which has lot of information like..SQL query.. number of
records read...records loaded etc..
My requirement is i would like to read the SQL query completly and write it to
another txt file..
Generally we encourage people to post
On 13/10/2014 8:04 PM, Dave Angel wrote:
It would also help to spell it the same. In the OP's
implementation, he defined kwargs, and tried to use it as
kwarg.
That's perfectly okay, though: if `kwargs` is the name used to reference
the dictionary of keyword arguments, `kwarg` would be an
On Monday, 13 October 2014 22:40:07 UTC-7, alex23 wrote:
> On 14/10/2014 11:47 AM, Sagar Deshmukh wrote:
>
> > I have a log file which has lot of information like..SQL query.. number of
> > records read...records loaded etc..
>
> > My requirement is i would like to read the SQL query completly
43 matches
Mail list logo