On Mon, 08 Apr 2013 23:20:54 -0700, Mark Janssen wrote:
>> I'm not a lawyer, and I suspect you're not either. If a burglar climbs
>> up my trellis to try to attain a second floor window, and comes
>> crashing to the ground, he may very well successfully sue me for not
>> having a warning sign.
>
On 04/09/2013 02:20 AM, Mark Janssen wrote:
I'm not a lawyer, and I suspect you're not either. If a burglar climbs up
my trellis to try to attain a second floor window, and comes crashing to the
ground, he may very well successfully sue me for not having a warning sign.
No, I understand these
We're /definitely/ on topic for this list.
Just saying.
On Mon, Apr 8, 2013 at 11:20 PM, Mark Janssen wrote:
>> I'm not a lawyer, and I suspect you're not either. If a burglar climbs up
>> my trellis to try to attain a second floor window, and comes crashing to the
>> ground, he may very well s
On 04/08/2013 10:38 PM, Steven D'Aprano wrote:
On Mon, 08 Apr 2013 21:09:08 -0400, Roy Smith wrote:
There's a whole competition about writing the smallest program which
outputs the song "99 bottles of beer":
http://codegolf.com/99-bottles-of-beer
I see the top 10 entries are all written in P
> I'm not a lawyer, and I suspect you're not either. If a burglar climbs up
> my trellis to try to attain a second floor window, and comes crashing to the
> ground, he may very well successfully sue me for not having a warning sign.
No, I understand these cases are common lore, but it's this bull
Thanks Steven for pointing that out. This is my first topic in Google Groups.
So, I did not notice that the previous contents will also be taken in the new
post.
--
http://mail.python.org/mailman/listinfo/python-list
Hi Dylan,
Thank you for the alternative solution. I will look into that.
--
http://mail.python.org/mailman/listinfo/python-list
On 04/08/2013 11:37 PM, Mark Janssen wrote:
On Mon, Apr 8, 2013 at 7:05 PM, Dave Angel wrote:
On 04/08/2013 07:16 PM, Mark Janssen wrote:
On Sun, Apr 7, 2013 at 3:36 PM, Steven D'Aprano
wrote:
On Sun, 07 Apr 2013 14:47:11 -0700, jhunter.dunefsky wrote:
Actually, my current licence can be
'Aloha Friends!
I'm about to write an API against a huge propitiatory Oracle based network
inventory database. The database have many different concepts stored in
it's tables, can one concept can span over multiple tables.
I would like to write a class for accessing each concept, but only have a
On Mon, 08 Apr 2013 21:06:42 -0700, rusi wrote:
> On Apr 9, 7:51 am, Steven D'Aprano +comp.lang.pyt...@pearwood.info> wrote:
>> On Mon, 08 Apr 2013 19:43:51 +0100, Nobody wrote:
>> > On Sun, 07 Apr 2013 01:30:45 +, Steven D'Aprano wrote:
>>
>> >> Am I the only one here who has used a typewrit
On Mon, 08 Apr 2013 21:01:04 -0700, bhk755 wrote:
[snip over 260 lines of unnecessary quoted text]
> Hi Dylan,
>
> Thank you for the alternative solution. I will look into that.
Please trim your replies. There's absolutely no reason to expect people
to scroll through almost FOUR PAGES of quot
On Apr 9, 9:06 am, rusi wrote:
> Dunno what you mean by 'out-of-band'
> If I set tabstops for a para to say 4-13-25-36 in a wordprocessor,
> save the file and look inside, I will find the tuple (4,13,25,36) in
> some encoded form.
To make this conform to current practices, I should use some lengt
On Tue, Apr 9, 2013 at 12:38 PM, Steven D'Aprano
wrote:
> On Mon, 08 Apr 2013 21:09:08 -0400, Roy Smith wrote:
>
>>> There's a whole competition about writing the smallest program which
>>> outputs the song "99 bottles of beer":
>>>
>>> http://codegolf.com/99-bottles-of-beer
>>
>> I see the top 10
On Apr 9, 7:51 am, Steven D'Aprano wrote:
> On Mon, 08 Apr 2013 19:43:51 +0100, Nobody wrote:
> > On Sun, 07 Apr 2013 01:30:45 +, Steven D'Aprano wrote:
>
> >> Am I the only one here who has used a typewriter?
>
> >> Tab stops were set manually, to a physical distance into the page,
> >> using
On Monday, April 8, 2013 3:37:38 PM UTC+5:30, bhk...@gmail.com wrote:
> I am trying to create 2D arrays without using advanced features like numpy,
> for this I have created 2 separate modules arrays.py and array2D.py. Here's
> the code for that:
>
>
>
> arrays.py module:
>
>
On Mon, Apr 8, 2013 at 7:05 PM, Dave Angel wrote:
> On 04/08/2013 07:16 PM, Mark Janssen wrote:
>>
>> On Sun, Apr 7, 2013 at 3:36 PM, Steven D'Aprano
>> wrote:
>>>
>>> On Sun, 07 Apr 2013 14:47:11 -0700, jhunter.dunefsky wrote:
>>>
Actually, my current licence can be found here:
https:/
On Mon, 08 Apr 2013 11:44:51 +0200, Antoon Pardon wrote:
> Here is the idea. I have a number of classes with the same interface.
> Something like the following:
>
> class Foo1:
> def bar(self, ...):
> work
> def boo(self, ...):
> do something
> self.bar(...)
>
> W
On 2013.04.08 21:38, Steven D'Aprano wrote:
> In fact, I may make it a bare . so that not only will it be the shortest
> program, but also the smallest program in terms of number of non-white
> pixels.
Until someone implements it in Whitespace.
--
CPython 3.3.0 | Windows NT 6.2.9200 / FreeBSD 9.
On Mon, 08 Apr 2013 19:43:51 +0100, Nobody wrote:
> On Sun, 07 Apr 2013 01:30:45 +, Steven D'Aprano wrote:
>
>> Am I the only one here who has used a typewriter?
>>
>> Tab stops were set manually, to a physical distance into the page,
>> using a mechanical stop. This long predates the "rule"
On Mon, 08 Apr 2013 21:09:08 -0400, Roy Smith wrote:
>> There's a whole competition about writing the smallest program which
>> outputs the song "99 bottles of beer":
>>
>> http://codegolf.com/99-bottles-of-beer
>
> I see the top 10 entries are all written in Perl. I suppose this says
> somethi
On 04/08/2013 07:16 PM, Mark Janssen wrote:
On Sun, Apr 7, 2013 at 3:36 PM, Steven D'Aprano
wrote:
On Sun, 07 Apr 2013 14:47:11 -0700, jhunter.dunefsky wrote:
Actually, my current licence can be found here:
https://github.com/jhunter-d/im.py/blob/master/LICENCE. Whaddaya think
about this, Us
On 2013-04-08 21:09, Roy Smith wrote:
>> http://codegolf.com/99-bottles-of-beer
>
> I see the top 10 entries are all written in Perl. I suppose this
> says something.
About the capabilities of Perl for writing such code, or about the
drinking habits of Perl programmers? :-)
Or-about-how-perl-dr
In article ,
Arnaud Delobelle wrote:
> On 8 April 2013 17:20, Chris Angelico wrote:
> > On Tue, Apr 9, 2013 at 1:37 AM, Roy Smith wrote:
> >> I can't help point out, however, that if your initial implementation is to
> >> have your code return a constant, it's pretty likely to be an optimum
On Mon, 08 Apr 2013 06:12:02 -0700, dbv wrote:
> In 2.7.4, io.py shows:
>
> import _io
> import abc
>
> from _io import (DEFAULT_BUFFER_SIZE, BlockingIOError,
> UnsupportedOperation,
> open, FileIO, BytesIO, StringIO, BufferedReader,
> BufferedWriter, BufferedRW
On Mon, Apr 8, 2013 at 5:44 AM, Antoon Pardon
wrote:
> Now of course I could subclass every class from the original family
> from Foo1 to Foon but that would mean a lot of duplicated code. Is
> there a way to reduce the use of duplicated code in such circumstances?
As a rule, if there's duplicate
On Sun, Apr 7, 2013 at 3:36 PM, Steven D'Aprano
wrote:
> On Sun, 07 Apr 2013 14:47:11 -0700, jhunter.dunefsky wrote:
>
>> Actually, my current licence can be found here:
>> https://github.com/jhunter-d/im.py/blob/master/LICENCE. Whaddaya think
>> about this, Useneters?
>
>
> I think you're lookin
On Tue, Apr 9, 2013 at 8:51 AM, Walter Hurry wrote:
> On Tue, 09 Apr 2013 08:00:06 +1000, Chris Angelico wrote:
>
>> On Tue, Apr 9, 2013 at 7:29 AM, Grant Edwards
>> wrote:
>>> On 2013-04-08, Walter Hurry wrote:
The fact of Python enforcing it (or all tabs; a poor second choice)
is *a
On Tue, 09 Apr 2013 08:00:06 +1000, Chris Angelico wrote:
> On Tue, Apr 9, 2013 at 7:29 AM, Grant Edwards
> wrote:
>> On 2013-04-08, Walter Hurry wrote:
>>> The fact of Python enforcing it (or all tabs; a poor second choice)
>>> is *a good thing*, easy and natural IMHO. No need for "end if" or "
On Tue, Apr 9, 2013 at 7:29 AM, Grant Edwards wrote:
> On 2013-04-08, Walter Hurry wrote:
>> The fact of Python enforcing it (or all tabs; a poor second choice)
>> is *a good thing*, easy and natural IMHO. No need for "end if" or
>> "end loop" or "fi". One wonders whether OP is simply trolling.
>
On Mon, 08 Apr 2013 19:48:58 +, Grant Edwards wrote:
> On 2013-04-08, Nobody wrote:
>> On Sun, 07 Apr 2013 01:30:45 +, Steven D'Aprano wrote:
>>
>>> Am I the only one here who has used a typewriter?
>>>
>>> Tab stops were set manually, to a physical distance into the page,
>>> using a me
On 2013-04-08, Walter Hurry wrote:
> Personally I have always used 4 spaces. I use it in SQL, shell
> scripts and Python. It makes code simple to read, and unambiguous.
Same here -- mostly because that's what the emacs "Python-mode" does
by default, and it seems to be commonly accepted "right wa
On 8 April 2013 10:44, Antoon Pardon wrote:
> Here is the idea. I have a number of classes with the same interface.
> Something like the following:
>
> class Foo1:
> def bar(self, ...):
> work
> def boo(self, ...):
> do something
> self.bar(...)
>
> What I want is t
On 2013-04-08, David Robinow wrote:
> On Mon, Apr 8, 2013 at 11:20 AM, Grant Edwards wrote:
>
>> I just installed ActiveState 2.7 64-bit on a Windows 7 machine running
>> a current version of Cygwin. While python programs (both GUI and
>> text-mode) run fine, I'm unable to use Python interactivel
On Mon, Apr 8, 2013 at 11:20 AM, Grant Edwards wrote:
> I just installed ActiveState 2.7 64-bit on a Windows 7 machine running
> a current version of Cygwin. While python programs (both GUI and
> text-mode) run fine, I'm unable to use Python interactively from
> either the Cygwin terminal or in a
On 2013-04-08, Nobody wrote:
> On Sun, 07 Apr 2013 01:30:45 +, Steven D'Aprano wrote:
>
>> Am I the only one here who has used a typewriter?
>>
>> Tab stops were set manually, to a physical distance into the page, using
>> a mechanical stop. This long predates the "rule" that tab stops are e
On 4/8/2013 4:33 AM, Bienlein wrote:
Hello,
I'm absolutely new to Python, just looked at the language description
for the first time. The first thought that came to my mind was
whether you can program in Python in an interactive programming
style, i.e. I can change code in the debugger which be
On 4/8/2013 10:50 AM, Albert van der Horst wrote:
In article ,
Terry Reedy wrote:
On 3/18/2013 5:17 PM, Peng Yu wrote:
Hi,
I don't quite understand how -m option is used. And it is difficult to
search for -m in google. Could anybody provide me with an example on
how to use this option?
pyt
On Sun, 07 Apr 2013 01:30:45 +, Steven D'Aprano wrote:
> Am I the only one here who has used a typewriter?
>
> Tab stops were set manually, to a physical distance into the page, using
> a mechanical stop. This long predates the "rule" that tab stops are every
> 8 characters.
And your point
On 8 April 2013 08:45, wrote:
> Suppose I want to read an object from some stream. How do I do it?
>
> For example, if the input stream contained the text:
> [1, # python should ignore this comment
> 2]
>
> and I do a "read" on it, I should obtain the result
> [1, 2]
You might be interested in c
On 8 April 2013 17:20, Chris Angelico wrote:
> On Tue, Apr 9, 2013 at 1:37 AM, Roy Smith wrote:
>> I can't help point out, however, that if your initial implementation is to
>> have your code return a constant, it's pretty likely to be an optimum
>> solution in both time and space :-)
>
> Likel
On Tue, Apr 9, 2013 at 1:37 AM, Roy Smith wrote:
> I can't help point out, however, that if your initial implementation is to
> have your code return a constant, it's pretty likely to be an optimum
> solution in both time and space :-)
Likely, but not certain.
# 1
def fifty_stars():
return "
On Apr 8, 2013, at 11:10 AM, Arnaud Delobelle wrote:
> On 8 April 2013 14:21, Roy Smith wrote:
>
>> For a while, I was rabidly(*) into TDD (Test Driven Development). The
>> cycle I was using was, "Write a specification of a behavior, write a
>> (failing) test for that behavior, then write the
I just installed ActiveState 2.7 64-bit on a Windows 7 machine running
a current version of Cygwin. While python programs (both GUI and
text-mode) run fine, I'm unable to use Python interactively from
either the Cygwin terminal or in an ssh session. I tried adding the
"-u" option, but that makes
I've been working on a little project and have a working Linux
implementation so far. Basically it allows a user to use any USB stick as a
key to lock and unlock their computer. More info in the repo or PyPi
https://pypi.python.org/pypi/USBLock
Basically run the program with -a to add a device (ad
Am 08.04.2013 15:42 schrieb dbv:
Ah, okay. Then on Windows, _io.pyd should be in the /DLLs folder but it isn't
there ?
It seems to be a built-in module:
>>> import _io
>>> _io
alike to
>>> import __builtin__
>>> __builtin__
as opposed to
>>> import win32ui
>>> win32ui
'C:\Python27\lib\
On 8 April 2013 14:21, Roy Smith wrote:
> For a while, I was rabidly(*) into TDD (Test Driven Development). The
> cycle I was using was, "Write a specification of a behavior, write a
> (failing) test for that behavior, then write the least possible amount
> of code to make the test pass. Lather
In article ,
Terry Reedy wrote:
>On 3/18/2013 5:17 PM, Peng Yu wrote:
>> Hi,
>>
>> I don't quite understand how -m option is used. And it is difficult to
>> search for -m in google. Could anybody provide me with an example on
>> how to use this option?
>
>python -m test
>at a command line runs th
_io is a builtin module
--
http://mail.python.org/mailman/listinfo/python-list
Ah, okay. Then on Windows, _io.pyd should be in the /DLLs folder but it isn't
there ?
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, Apr 8, 2013 at 11:12 PM, dbv wrote:
> In 2.7.4, io.py shows:
>
> import _io
> import abc
>
> from _io import (DEFAULT_BUFFER_SIZE, BlockingIOError,
> UnsupportedOperation,
> open, FileIO, BytesIO, StringIO, BufferedReader,
> BufferedWriter, BufferedRWPair
In article ,
Chris Angelico wrote:
> On Mon, Apr 8, 2013 at 7:48 AM, Steven D'Aprano
> wrote:
> > Like every programming problem, the solution is to break it apart into
> > small, simple steps that even a computer can follow.
> > ...
>
> 5) Shortcut the whole thing, since the problem was under
In 2.7.4, io.py shows:
import _io
import abc
from _io import (DEFAULT_BUFFER_SIZE, BlockingIOError, UnsupportedOperation,
open, FileIO, BytesIO, StringIO, BufferedReader,
BufferedWriter, BufferedRWPair, BufferedRandom,
IncrementalNewlineDecoder,
On Mon, Apr 8, 2013 at 10:22 PM, Dave Angel wrote:
> On 04/08/2013 08:01 AM, Dylan Evans wrote:
>
>> On Mon, Apr 8, 2013 at 9:48 PM, Alain Ketterlin <
>> al...@dpt-info.u-strasbg.fr
>>
>>> wrote:
>>>
>>
>> loial writes:
>>>
>>> I want to call a child process to run a shell script and wait for
On Mon, Apr 8, 2013 at 8:07 PM, wrote:
> I am trying to create 2D arrays without using advanced features like
> numpy, for this I have created 2 separate modules arrays.py and array2D.py.
> Here's the code for that:
>
> arrays.py module:
> ==
> import ctypes
>
> class Array:
>
> #
On 08/04/2013 4:33 AM, Bienlein wrote:
Hello,
I'm absolutely new to Python, just looked at the language description for the
first time. The first thought that came to my mind was whether you can program
in Python in an interactive programming style, i.e. I can change code in the
debugger whi
On 04/08/2013 07:00 AM, loial wrote:
I want to call a child process to run a shell script and wait for that script
to finish. Will the code below wait for the script to finish? If not then how
do I make it wait?
Any help appreciated.
import subprocess
command = "/home/john/myscript"
proces
On 04/08/2013 08:01 AM, Dylan Evans wrote:
On Mon, Apr 8, 2013 at 9:48 PM, Alain Ketterlin
wrote:
loial writes:
I want to call a child process to run a shell script and wait for that
script to finish. Will the code below wait for the script to finish?
If not then how do I make it wait?
[.
On Mon, Apr 8, 2013 at 9:48 PM, Alain Ketterlin wrote:
> loial writes:
>
> > I want to call a child process to run a shell script and wait for that
> > script to finish. Will the code below wait for the script to finish?
> > If not then how do I make it wait?
> [...]
> > process = subprocess.Pop
On Apr 8, 4:41 pm, Dave Angel wrote:
> Go back to the previous message and you'll see Adam tells you exactly
> what to type at the terminal. But to be more literal:
>
> python ex13.py first 2nd 3rd
followed by RET (also called ENTER) key
--
http://mail.python.org/mailman/listinfo/python-list
loial writes:
> I want to call a child process to run a shell script and wait for that
> script to finish. Will the code below wait for the script to finish?
> If not then how do I make it wait?
[...]
> process = subprocess.Popen(command,
> stdin=subprocess.PIPE,stdout=subprocess.PIPE, stderr=su
On 04/08/2013 07:24 AM, leonardo wrote:
thanks adam, but it is not clear to me yet.
if i open the terminal how do i work on it? what should i type in?
Please don't top-post. It kills off the context.
Go back to the previous message and you'll see Adam tells you exactly
what to type at the t
thanks adam, but it is not clear to me yet.
if i open the terminal how do i work on it? what should i type in?
thanks
Il giorno 08/apr/2013, alle ore 11:25, Adam Mesha ha scritto:
> On Mon, Apr 8, 2013 at 11:01 AM, leonardo selmi wrote:
> then i get this error:
>
> Traceback (most recent ca
I want to call a child process to run a shell script and wait for that script
to finish. Will the code below wait for the script to finish? If not then how
do I make it wait?
Any help appreciated.
import subprocess
command = "/home/john/myscript"
process = subprocess.Popen(command,
stdin=su
On 04/08/2013 06:32 AM, Casperb wrote:
Hi all,
I'm new to Python and have a pretty basic question, explained in the following
screendump:
http://i.imgur.com/oaCuKp5.jpg
After I save my script, the nice colours that make the code easier to read
disappear. How do I stop that from happening?
On Apr 7, 6:36 pm, Steven D'Aprano wrote:
> On Sun, 07 Apr 2013 14:47:11 -0700, jhunter.dunefsky wrote:
> > Actually, my current licence can be found here:
> >https://github.com/jhunter-d/im.py/blob/master/LICENCE. Whaddaya think
> > about this, Useneters?
>
> I think you're looking for a world o
Hi all,
I'm new to Python and have a pretty basic question, explained in the following
screendump:
http://i.imgur.com/oaCuKp5.jpg
After I save my script, the nice colours that make the code easier to read
disappear. How do I stop that from happening?
Any help much appreciated.
--
http://mai
I am trying to create 2D arrays without using advanced features like numpy, for
this I have created 2 separate modules arrays.py and array2D.py. Here's the
code for that:
arrays.py module:
==
import ctypes
class Array:
#Creates an array with size elements.
def __init__( sel
On Mon, Apr 8, 2013 at 7:29 PM, leonardo wrote:
> thanks barrett, but i am using a mac..
Open up Terminal - that'll give you a window with a bash prompt.
Proceed from there; it's the same as the default shell on many
Linuxes.
ChrisA
--
http://mail.python.org/mailman/listinfo/python-list
Here is the idea. I have a number of classes with the same interface.
Something like the following:
class Foo1:
def bar(self, ...):
work
def boo(self, ...):
do something
self.bar(...)
What I want is the equivallent of:
class Far1(Foo1):
def boo(self, ...)
thanks barrett, but i am using a mac..
Il 08/04/2013 11.15, Barrett Lewis ha scritto:
Do you happen to be on windows? Because if you are then you need to
edit the registry. If you are on windows let me know and I will walk
you through the fix, but if not then it would be a waste of time for
On Mon, 08 Apr 2013 01:33:13 -0700, Bienlein wrote:
> Hello,
>
> I'm absolutely new to Python, just looked at the language description
> for the first time. The first thought that came to my mind was whether
> you can program in Python in an interactive programming style, i.e. I
> can change cod
On Mon, Apr 8, 2013 at 11:01 AM, leonardo selmi wrote:
> then i get this error:
>
> Traceback (most recent call last):
> File "/Users/leonardo/Documents/ex13.py", line 3, in
> script, first, second, third = argv
> ValueError: need more than 1 value to unpack
>
You didn't provide any argum
Do you happen to be on windows? Because if you are then you need to edit
the registry. If you are on windows let me know and I will walk you through
the fix, but if not then it would be a waste of time for me to explain it.
--
http://mail.python.org/mailman/listinfo/python-list
hello all,
i have typed the following program from the book "learn python the hard way":
from sys import argv
script, first, second, third = argv
print "The script is called:", script
print "Your first variable is:", first
print "Your second variable is:", second
print "Your third variable is:"
- Original Message -
> In my settings.py , I have specified my cache as :
> CACHES = {
> 'default': {
> ..
> }
> }
>
> In my views.py, I have
>
> import requests
> from django.core.cache import cache, get_cache
>
> def aview():
> #check cache
> if not get_ca
There is no "read in a stream until it's a valid literal" function as
far as I know, but ast.literal_eval will turn your string into an
object.
On Mon, Apr 8, 2013 at 12:45 AM, wrote:
> Suppose I want to read an object from some stream. How do I do it?
>
> For example, if the input stream contai
Hello,
I'm absolutely new to Python, just looked at the language description for the
first time. The first thought that came to my mind was whether you can program
in Python in an interactive programming style, i.e. I can change code in the
debugger which becomes immediately effective (no edit
> For example, if the input stream contained the text:
> [1, # python should ignore this comment
> 2]
>
> and I do a "read" on it, I should obtain the result
> [1, 2]
> --
>
I don't know much about lisp but given that input and the desired output
you can write functions like the following
def str
Suppose I want to read an object from some stream. How do I do it?
For example, if the input stream contained the text:
[1, # python should ignore this comment
2]
and I do a "read" on it, I should obtain the result
[1, 2]
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, Apr 8, 2013 at 5:36 PM, Barrett Lewis wrote:
> I am viewing it on Chrome Version 26.0.1410.43 m for windows and it works
> perfectly for me.
Huh. Extremely weird. Ctrl-F5 fixed it, and now the source looks
different. Either someone's *right now* editing stuff (in which case
I'll shut up a
I am viewing it on Chrome Version 26.0.1410.43 m for windows and it works
perfectly for me.
On Mon, Apr 8, 2013 at 12:32 AM, Chris Angelico wrote:
> On Mon, Apr 8, 2013 at 4:38 PM, Barrett Lewis
> wrote:
> > I looked up the source to the decorator
> > found here:
> http://hg.python.org/cpython
On Mon, Apr 8, 2013 at 4:38 PM, Barrett Lewis wrote:
> I looked up the source to the decorator
> found here:http://hg.python.org/cpython/file/406b47c64480/Lib/contextlib.py
> for anyone interested.
Strangely, line indentation seems to be swallowed in the web view of
the Mercurial tree. The code d
82 matches
Mail list logo