On Thu, 12 Jul 2012 21:26:20 -0700, rantingrickjohnson wrote:
> On Thursday, July 12, 2012 10:13:47 PM UTC-5, Steven D'Aprano wrote:
>> Rick has obviously never tried to open a file for reading when somebody
>> else has it opened, also for reading, and discovered that despite
>> Windows being alle
Frederic Rentsch wrote:
> I'm sorry I can't post an intelligible piece that does NOT work. I
> obviously can't post the whole thing.
How about a pastebin then? Or even bitbucket/github as you need to track
changes anyway?
> It is way too convoluted.
"Convoluted" code is much easier to debug t
If I copy and paste the following command into a command window, it does what
I need.
c:\Programs\bob\bob.exe -x -y "C:\text\path\to some\file.txt" |
c:\Programs\kate\kate.exe -A 2 --dc "Print Media Is Dead" --da "Author" --dt
"Title" --hf "Times" --bb "14" --aa "" --font "Ariel" - "C:\rtf
On Friday, 13 July 2012 05:03:23 UTC+1, Temia Eszteri wrote:
> I'm going to be looking into writing a wrapper for the Allegro 5 game
> development libraries, either with ctypes or Cython. They technically
> have a basic 1:1 ctypes wrapper currently, but I wanted to make
> something more pythonic,
2012/7/13 Steven D'Aprano :
> Well of course it does. If copytree fails, the try block ends and
> execution skips straight to the except block, which runs, and then the
> program halts because there's nothing else to be done.
>
> That at least is my guess, based on the described symptoms.
>
Well
Martin P. Hellwig, 13.07.2012 09:39:
> On Friday, 13 July 2012 05:03:23 UTC+1, Temia Eszteri wrote:
>> I'm going to be looking into writing a wrapper for the Allegro 5 game
>> development libraries, either with ctypes or Cython. They technically
>> have a basic 1:1 ctypes wrapper currently, but I
Hi,
I have built Python 2.7.3 from source and although the interpreter
starts up and runs scripts (so far OK) the 'test___all__' regression
test fails.
The machine I'm building on is a virtual server running a version of Red
Hat Linux
Build commands:
./configure --prefix /usr
Greetings Fellow Group,
I'd need your help to fix some issues I have with my unitary tests.
I'm trying to bring them to the next level by Mocking equipments
controlled by my application.
Despite me reading http://www.voidspace.org.uk/python/mock/index.html I
cannot figure out how to do the f
Am 13.07.2012 12:09, schrieb Jean-Michel Pichavant:
I have an App object with the 'target' attribute. This target is
controlling a piece of hardware. The hardware itself holds a software,
hence the target object having an 'api' attribute. I hope I make sense.
So basically I'd like
self.target.a
On Friday, February 20, 2009 4:06:42 AM UTC, W. eWatson wrote:
> I'm using IDLE for editing, but execute programs directly. If there are
> execution or "compile" errors, the console closes before I can see
> what it
> contains. How do I prevent that?
> --
> W. eW
In article <4ff0f8e0$0$29988$c3e8da3$54964...@news.astraweb.com>,
Steven D'Aprano wrote:
>On Sun, 01 Jul 2012 05:55:24 -0400, Terry Reedy wrote:
>
>> On 7/1/2012 2:54 AM, Steven D'Aprano wrote:
>>
>>> So no, Python has always included chained comparisons, and yes, it is
>>> shameful that a langua
In article ,
Gilles wrote:
>Hello
>
>Someone I know with no computer knowledge has a studio appartment to
>rent in Paris and spent four months building a small site in Joomla to
>find short-time renters.
>
>The site is just...
>- a few web pages that include text (in four languages) and pictures
I've been using unittest for many years, but have steadfastly (perhaps
stubbornly) avoided newfangled improvements like nose. I finally
decided to take a serious look at nose. There were a few pain points I
had to work through to get our existing collection of tests to run under
nose. I figu
On Jul 13, 11:36 am, Steven D'Aprano wrote:
> On Thu, 12 Jul 2012 21:33:40 -0700, rusi wrote:
> > On Jul 11, 11:41 am, Daniel Fetchinson
> > wrote:
> >> funcs = [ lambda x: x**i for i in range( 5 ) ] print funcs[0]( 2 )
> >> print funcs[1]( 2 )
> >> print funcs[2]( 2 )
>
> >> This gives me
>
> >>
To come back to the OPs question.
Variables can be assigned. Or they can be bound.
[C++ programmers will be familiar with the difference between
initialization and assignment]
List comprehensions are defined in terms of assignment to the local
variable rather than binding.
Hence the issue.
Below
On Fri, 13 Jul 2012 12:30:47 +, Albert van der Horst wrote:
>>Apart from Python, Mathematica, Perl 6, CoffeeScript, Cobra and Clay
>>give chained comparisons the standard meaning. It is, or was, a feature
>>request for Boo, but I can't tell whether it has been implemented or
>>not.
>
> Algol
On Sat, Jul 14, 2012 at 1:04 AM, Steven D'Aprano
wrote:
> Actually, no. Is True less than False, or is it greater? In boolean
> algebra, the question has no answer. It is only an implementation detail
> of Python that chooses False < True.
Maybe in boolean algebra, but in code, it's handy to have
On Friday, July 6, 2012 9:58:10 AM UTC-4, Steven D'Aprano wrote:
> (Sadly, when I say "we" I mean
> collectively. Many language designers, and programmers, don't have the
> foggiest clue as to what makes a good clean design. Hence C++ and PHP.)
I'm not going to defend C++, but to be fair, a majo
> Well "neat tricks" aside, I am of the firm belief that deleting files should
> never be possible whilst they are open.
This is one of the few instances I think Windows does something better
than OS X. Windows will check before you attempt to delete (i.e. move
to Recycling Bin) while OS X will m
> VERBOSE = True
>
> def function(arg):
> if VERBOSE:
>print("calling function with arg %r" % arg)
> process(arg)
>
> def caller():
> VERBOSE = False
> function(1)
>
> -
> Python semantics: function sees VERBOSE False
> Haskell
On Jul 13, 8:36 pm, Chris Angelico wrote:
> On Sat, Jul 14, 2012 at 1:04 AM, Steven D'Aprano
>
> wrote:
> > Actually, no. Is True less than False, or is it greater? In boolean
> > algebra, the question has no answer. It is only an implementation detail
> > of Python that chooses False < True.
>
>
On 13/07/12 04:16:53, Steven D'Aprano wrote:
> On Thu, 12 Jul 2012 16:37:42 +0100, andrea crotti wrote:
>
>> 2012/7/12 John Gordon :
>>> In andrea crotti
>>> writes:
>>>
Well that's what I thought, but I can't find any explicit exit
anywhere in shutil, so what's going on there?
>>>
>>>
On Jul 13, 9:12 pm, "Prasad, Ramit" wrote:
> > VERBOSE = True
>
> > def function(arg):
> > if VERBOSE:
> > print("calling function with arg %r" % arg)
> > process(arg)
>
> > def caller():
> > VERBOSE = False
> > function(1)
>
> > -
> > Please do NOT catch BaseException, since that is the wrong thing to do.
>
> I would agree if you had said "in production code".
>
> If you are investigating why a third-party function is stopping your
> interpreter, then catching BaseException may tell you that the code
> is raising the wrong
On Sat, Jul 14, 2012 at 3:08 AM, Prasad, Ramit
wrote:
> I would say the opposite. In production code usually I want it
> to recover, log as much information as I need (including sending
> any notifications), and NOT just die.
>
> In development, not catching the exception will give me a full
> tra
On Sat, Jul 14, 2012 at 2:46 AM, rusi wrote:
> Ok let me restate: if python were to work that way (without the
> global) we could say either
> a Python chooses to have dynamic scoping of variables
> or
> b There is a bug in python's scoping rules
Or c, there's a declaration at the top:
from __fu
On 07/13/2012 11:00 AM, Prasad, Ramit wrote:
Well "neat tricks" aside, I am of the firm belief that deleting files should
never be possible whilst they are open.
This is one of the few instances I think Windows does something better
than OS X. Windows will check before you attempt to delete (i.e
On 13/07/12 18:12:40, Prasad, Ramit wrote:
>> VERBOSE = True
>>
>> def function(arg):
>> if VERBOSE:
>>print("calling function with arg %r" % arg)
>> process(arg)
>>
>> def caller():
>> VERBOSE = False
>> function(1)
>>
>> -
>> Pyt
> >> Well "neat tricks" aside, I am of the firm belief that deleting files
> should
> >> never be possible whilst they are open.
> > This is one of the few instances I think Windows does something better
> > than OS X. Windows will check before you attempt to delete (i.e. move
> > to Recycling Bin)
> >> VERBOSE = True
> >>
> >> def function(arg):
> >> if VERBOSE:
> >>print("calling function with arg %r" % arg)
> >> process(arg)
> >>
> >> def caller():
> >> VERBOSE = False
> >> function(1)
> >>
> >> -
> >> Python semantics: fu
On Sat, Jul 14, 2012 at 3:59 AM, Prasad, Ramit
wrote:
> I lean slightly towards the POSIX handling with the addition that
> any additional write should throw an error. You are now saving to
> a file that will not exist the moment you close it and that is probably
> not expected.
There are several
On 13/07/12 19:59:59, Prasad, Ramit wrote:
> I lean slightly towards the POSIX handling with the addition that
> any additional write should throw an error. You are now saving to
> a file that will not exist the moment you close it and that is
> probably not expected.
I'd say: it depends.
If t
On Fri, Jul 13, 2012 at 11:53 AM, Hans Mulder wrote:
> The function `function` refers to a variable `VERBOSE` that
> isn't local. In some programming langauages, the interpreter
> would then scan the call stack at run-time, looking for a scope
> where that name is defined. It would find the loca
On 13/07/12 20:54:02, Ian Kelly wrote:
> I've also seen the distinction described as "early" vs. "late" binding
> on this list, but I'm not sure how precise that is -- I believe that
> terminology more accurately describes whether method and attribute
> names are looked up at compile-time or at run
I think you can use pythonw.exe which will read stdin and for any
input before closing.
(I read this a while back, ma guy here.)
Sent from my iPhone
On Jul 13, 2012, at 7:27 AM, "summerholidaylearn...@gmail.com"
wrote:
> On Friday, February 20, 2009 4:06:42 AM UTC, W. eWatson wrote:
>> I'm usi
On 13/07/2012 19:28, Hans Mulder wrote:
On 13/07/12 19:59:59, Prasad, Ramit wrote:
I lean slightly towards the POSIX handling with the addition that
any additional write should throw an error. You are now saving to
a file that will not exist the moment you close it and that is
probably not expe
On 07/13/2012 12:59 PM, Prasad, Ramit wrote:
I lean slightly towards the POSIX handling with the addition that any
additional write should throw an error. You are now saving to a file
that will not exist the moment you close it and that is probably not
expected. Ramit
But if I created, then del
Am 13.07.2012 21:57, schrieb MRAB:
> It's possible to create a temporary file even in Windows.
Windows has a open() flag named O_TEMPORARY for temporary files. With
O_TEMPORARY the file is removed from disk as soon as the file handle is
closed. On POSIX OS it's common practice to unlink temporary
On Fri, 2012-07-13 at 09:26 +0200, Peter Otten wrote:
> Frederic Rentsch wrote:
>
> > I'm sorry I can't post an intelligible piece that does NOT work. I
> > obviously can't post the whole thing.
>
> How about a pastebin then? Or even bitbucket/github as you need to track
> changes anyway?
>
>
Op vrijdag 13 juli 2012 03:52:51 UTC+2 schreef Vincent Vande Vyvre het volgende:
> On 12/07/12 08:42, Jean Dubois wrote:
> > On 12 jul, 02:59, Vincent Vande Vyvre
> > wrote:
> >> On 11/07/12 17:37, Jean Dubois wrote:
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>> I'm trying
Announcing Urwid 1.0.2
--
Urwid home page:
http://excess.org/urwid/
Manual:
http://excess.org/urwid/wiki/UrwidManual
Tarball:
http://excess.org/urwid/urwid-1.0.2.tar.gz
About this release:
===
This is a stable bug-fix-only release.
A number of bugs t
Google tells me that various certifications are available but I'd like
to know if any of these are approved by the PSF or whoever would be
responsible? If there's anything out there I've missed it :-(
--
Cheers.
Mark Lawrence.
--
http://mail.python.org/mailman/listinfo/python-list
From now on, for each operator I would have to remember wether it
is a supposedly comparison operator or not.
I believe the following rule is true: if a op b is True or False raises,
then op is a potentially chained comparison operation. They are (not)
equal (and (not) is), the 4 order compa
On 7/13/2012 4:24 PM, Frederic Rentsch wrote:
On Fri, 2012-07-13 at 09:26 +0200, Peter Otten wrote:
Another random idea: run your code on a more recent python/tcl installation.
That might have been clearer as python + tcl/tk installation.
I next spent a day with an attempt to upgrade t
Mark Lawrence wrote:
Google tells me that various certifications are available but I'd like
to know if any of these are approved by the PSF or whoever would be
responsible? If there's anything out there I've missed it :-(
There is an O'Reilly Python Certification class offered in conjunctio
Hi,
I just want to use a beep command that works cross platform.
I tried the simplest approach (just printing the BEL character '\a'
chr(7) to the console.
This fails on my Ubuntu 12.04 host, as the pcspkr is in the list of the
blacklisted kernel modules.
I found another snippet trying
On Fri, 13 Jul 2012 15:15:13 -0500, Chris Gonnerman wrote:
> On 07/13/2012 12:59 PM, Prasad, Ramit wrote:
>> I lean slightly towards the POSIX handling with the addition that any
>> additional write should throw an error. You are now saving to a file
>> that will not exist the moment you close it
On Jul 13, 10:53 pm, Hans Mulder wrote:
> If you add `global VERBOSE` to `caller`, then there is only one
> variable named `VERBOSE` and what `function` does, depends on
> the most recent assignment to that variable.
>
> If you remove your `global VERBOSE`, then there are two
> variables by that n
On Sat, 14 Jul 2012 03:00:05 +0200, Gelonida N wrote:
> How do others handle simple beeps?
>
> I just want to use them as alert, when certain events occur within a
> very long running non GUI application.
Why? Do you hate your users?
> What I do at the moment is:
>
> For Windows I use winsoun
On Fri, 13 Jul 2012 19:31:24 -0700, rusi wrote:
> Consider the following
>
> def foo(x):
> i = 100
> if x:
> j = [i for i in range(10)]
> return i
> else:
> return i
A simpler example:
def foo():
i = 100
j = [i for i in range(10)]
return i
In Pyt
On Jul 14, 8:43 am, Steven D'Aprano wrote:
> On Fri, 13 Jul 2012 19:31:24 -0700, rusi wrote:
> > Consider the following
>
> > def foo(x):
> > i = 100
> > if x:
> > j = [i for i in range(10)]
> > return i
> > else:
> > return i
>
> A simpler example:
>
> def foo(
Hi,
This is a general question, loosely related to python since it will be the
implementation language.
I would like some suggestions as to manage simulation results data from my ASIC
design.
For my design,
- I have a number of simulations testcases (TEST_XX_YY_ZZ), and within each of
these t
52 matches
Mail list logo