On Tue, Oct 9, 2012 at 1:14 PM, Guido van Rossum wrote:
> Maybe we should do something more drastic and always create a new,
> unique constant whenever a literal occurs as an argument of 'is' or
> 'is not'? Then such code would never work, leading people to examine
> their code more closely. I bet
Dave Angel writes:
> On 10/09/2012 02:07 AM, Bob Martin wrote:
> > in 682592 20121008 232126 "Prasad, Ramit" wrote:
[snip mess]
> > How does one unpack this post? ;-)
>
> Since that's not the way it arrived here, i have to ask, how do you
> get these posts? Are you subscribed to individual mess
Il giorno venerdì 21 settembre 2012 16:04:48 UTC+2, mikcec82 ha scritto:
> Hallo to all,
>
>
>
> I'm using Python 2.7.3 with Windows 7 @ 64 bit
>
> and an Intel Core i3 -2350M CPU @2.30GHz 2.3GHz.
>
>
>
> Sometimes, when I'm programming in Python on my screen compare this blue
> screen:
>
Hi,
Is it possible to define an Event which should fire when a value of a variable
changes? Something like below
self.Bind(wx.EVT_ON_VAL_CHANGE, variable_to_watch, self.Callback)
I need a Text ctrl UI which continuously changes values based on external data
changes. Unfortunately I could not f
On 10/09/2012 09:37 AM, mikcec82 wrote:
> In my script I open and close an html (in a FOR cycle); could be this the
> problem?
Unless you're running your Python script as a kernel driver (and you
can't do that accidentally), there is no way that your user-space
program should cause a bluescreen. T
On 10/09/12 02:22, Jussi Piitulainen wrote:
>>> in 682592 20121008 232126 "Prasad, Ramit" wrote:
> [snip mess]
>>> How does one unpack this post? ;-)
>>
>> Since that's not the way it arrived here, i have to ask, how do you
>> get these posts?
>
> I see a carriage return rendered as ^M at the end
Does somebody know where I can get the documentation for pydelicious?
The documentation links ("For code documentation
see doc/pydelicious or doc/dlcs.py.") in
http://packages.python.org/pydelicious/README.html#id3
gave me
404 Not Found
nginx/1.1.19
Prof. Dr.
Cameron Simpson wrote:
>| Because "\s{6}+"
>| has other meanings in different regex syntaxes and the designers didn't
>| want confusion?
>
> I think Python REs are supposed to be Perl compatible; ISTR an opening
> sentence to that effect...
>
I don't know the full history of how regex engines
On Tue, 09 Oct 2012 02:00:04 +1100, Chris Angelico wrote:
> On Tue, Oct 9, 2012 at 1:48 AM, Dave Angel wrote:
>> import decimal
>> a = decimal.Decimal(4.3)
>> print(a)
>>
>> 5.0996447286321199499070644378662109375
>
> Ah, the delights of copy-paste :)
>
>> The Decimal class has the
mooremath...@gmail.com wrote:
> What's the best way to accomplish this? Am I over-complicating it?
> My gut feeling is there is a better way than the following:
>
import itertools
x = [1, 2, 3]
y = list(itertools.chain.from_iterable(('insertme', x[i]) for i in
range(len(x))
Hi Professor Soto,
Not sure what's going on with their servers', but I was able to find
the documentation on their repo:
https://pydelicious.googlecode.com/svn/trunk/doc/htmlref/index.html
https://pydelicious.googlecode.com/svn/trunk/doc/htmlref/HACKING.html
https://pydelicious.googlecode.com/svn
Actually it seems this project has been official abandoned.
Unofficially use this, was updated only a month ago:
https://github.com/mgan59/python-pinboard
On Tue, Oct 9, 2012 at 10:47 PM, Alec Taylor wrote:
> Hi Professor Soto,
>
> Not sure what's going on with their servers', but I was able to
below is the text file i have How to create Facility as a key and then assign
multiple values to it
FACILITY : BACKUP
FAILED BACKUP_BEFORE
FAILED BACKUP_INTERCHANGE
Total : 34
Passed : 32
Failed : 2
Not Run : 0
FACILITY : CDU
Total : 9
Passed : 9
Failed : 0
for example Facility BACKUP is a key
On Mon, 08 Oct 2012 19:34:26 -0700, rusi wrote:
> How about a 2-paren version?
>
x = [1,2,3]
reduce(operator.add, [['insert', a] for a in x])
> ['insert', 1, 'insert', 2, 'insert', 3]
That works, but all those list additions are going to be slow. It will be
an O(N**2) algorithm.
If
Tim Chase writes:
> On 10/09/12 02:22, Jussi Piitulainen wrote:
> >>> in 682592 20121008 232126 "Prasad, Ramit" wrote:
> > [snip mess]
> >>> How does one unpack this post? ;-)
> >>
> >> Since that's not the way it arrived here, i have to ask, how do you
> >> get these posts?
> >
> > I see a carri
Il giorno venerdì 21 settembre 2012 16:04:48 UTC+2, mikcec82 ha scritto:
> Hallo to all,
>
>
>
> I'm using Python 2.7.3 with Windows 7 @ 64 bit
>
> and an Intel Core i3 -2350M CPU @2.30GHz 2.3GHz.
>
>
>
> Sometimes, when I'm programming in Python on my screen compare this blue
> screen:
>
Duncan Booth wrote:
> mooremath...@gmail.com wrote:
>
>> What's the best way to accomplish this? Am I over-complicating it?
>> My gut feeling is there is a better way than the following:
>>
> import itertools
> x = [1, 2, 3]
> y = list(itertools.chain.from_iterable(('insertme', x[i]
On Tue, 09 Oct 2012 04:59:49 -0700, argbsk wrote:
> below is the text file i have How to create Facility as a key and then
> assign multiple values to it
To use Facility as a key in a dict:
d = {}
d['Facility'] = 'ham'
Note that keys are case-sensitive, so that 'Facility', 'facility',
'FACILIT
In article <50741ffe$0$6574$c3e8da3$54964...@news.astraweb.com>,
Steven D'Aprano wrote:
> On Tue, 09 Oct 2012 04:59:49 -0700, argbsk wrote:
>
> > below is the text file i have How to create Facility as a key and then
> > assign multiple values to it
>
> To use Facility as a key in a dict:
>
>
Am 09.10.2012 13:59, schrieb arg...@gmail.com:
below is the text file i have How to create Facility as a key and then assign
multiple values to it
The value part of a dict element can be any kind of object, like e.g. a
tuple, namedtuple or even a dict.
Uli
--
http://mail.python.org/mailma
How fast python web framework process routing (URL dispatch)?
Here is a benchmark for various web frameworks (bottle, django, flask, pyramid,
tornado and wheezy.web) running the following routing: static, dynamic, SEO and
missing... with a trivial 'hello world' application (all routes are point
On 09/10/2012 14:24, D.M. Procida wrote:
What exactly is the point of a private method? Why or when would I want
to use one?
Daniele
Hardly a Python question but using a search engine could have got you
here, and rather faster :)
http://stackoverflow.com/questions/2620699/why-private-method
Mark Lawrence wrote:
> On 09/10/2012 14:24, D.M. Procida wrote:
> > What exactly is the point of a private method? Why or when would I want
> > to use one?
> >
> > Daniele
> >
>
> Hardly a Python question but using a search engine could have got you
> here, and rather faster :)
>
http://stackov
I am trying to match a string that containing the "<" and ">" characters, using
the string contains function, but it never seems to find the lines containing
the string
e.g if mystring.contains("") :
Do I need to escape the characters...and if so how?
--
http://mail.python.org/mailman/listinf
On 12-10-09 06:59 AM, D.M. Procida wrote:
In Python, using an underscore is simply a convention to note that a
method is private - it doesn't actually hide it from other things -
correct?
Daniele
A single underscore semantically means private. A double underscore will
name mangle the functio
On Monday, October 8, 2012 10:06:50 PM UTC-4, Roy Smith wrote:
> In article ,
>
(big snip)
>
>
> > y = list(itertools.chain.from_iterable(('insertme', x[i]) for i in
> > range(len(x
>
>
>
> A statement ending in four close parens is usually going to be pretty
>
> difficult to figure
On 10/9/12 2:59 PM, D.M. Procida wrote:
Mark Lawrence wrote:
On 09/10/2012 14:24, D.M. Procida wrote:
What exactly is the point of a private method? Why or when would I want
to use one?
Daniele
Hardly a Python question but using a search engine could have got you
here, and rather faster :
On 2012-10-09, Bob Martin wrote:
> in 682592 20121008 232126 "Prasad, Ramit" wrote:
>>Thomas Bach wrote:=0D=0A> Hi there,=0D=0A> =0D=0A> On Sat, Oct 06, 2012 at =
>>03:08:38PM +, Steven D'Aprano wrote:=0D=0A> >=0D=0A> > my_tuple =3D my_=
>>tuple[:4]=0D=0A> > a,b,c,d =3D my_tuple if len(my_tup
On 10/09/2012 04:02 PM, loial wrote:
> I am trying to match a string that containing the "<" and ">" characters,
> using the string contains function, but it never seems to find the lines
> containing the string
>
> e.g if mystring.contains("") :
>
> Do I need to escape the characters...and if
On 10/09/12 08:59, D.M. Procida wrote:
>> On 09/10/2012 14:24, D.M. Procida wrote:
>>> What exactly is the point of a private method? Why or when would I want
>>> to use one?
>
> In Python, using an underscore is simply a convention to note that a
> method is private - it doesn't actually hide it
On 10/09/2012 10:02 AM, loial wrote:
> I am trying to match a string that containing the "<" and ">" characters,
> using the string contains function, but it never seems to find the lines
> containing the string
>
> e.g if mystring.contains("") :
>
> Do I need to escape the characters...and if so
On 10/09/12 07:05, Jussi Piitulainen wrote:
> Tim Chase writes:
>> However, it might be that there is no CR+LF on the last line,
>> or that one line is missing the CR, so your viewer heuristic
>> (vim does this) thinks it has Unix NL-only line-endings and
>> shows the ^M on all the lines that have
On 10/09/2012 10:23 AM, Dave Angel wrote:
> On 10/09/2012 10:02 AM, loial wrote:
>> I am trying to match a string that containing the "<" and ">" characters,
>> using the string contains function, but it never seems to find the lines
>> containing the string
>>
>> e.g if mystring.contains("") :
>
On Tue, Oct 9, 2012 at 10:02 AM, loial wrote:
> I am trying to match a string that containing the "<" and ">" characters,
> using the string contains function, but it never seems to find the lines
> containing the string
>
> e.g if mystring.contains("") :
>
> Do I need to escape the characters..
On 09/10/2012 15:23, Dave Angel wrote:
On 10/09/2012 10:02 AM, loial wrote:
I am trying to match a string that containing the "<" and ">" characters, using
the string contains function, but it never seems to find the lines containing the string
e.g if mystring.contains("") :
Do I need to esca
On Tuesday, 9 October 2012 15:19:33 UTC+1, Agon Hajdari wrote:
> On 10/09/2012 04:02 PM, loial wrote: > I am trying to match a string that
> containing the "<" and ">" characters, using the string contains function,
> but it never seems to find the lines containing the string > > e.g if
> mystri
I have the following module implementing a registry of functions with a
decorator:
$ cat x.py
registry = {} # global dictionary
def dec(func):
registry[func.__name__] = func
print registry, id(registry)
return func
if __name__ == '__main__':
import xlib
print registry, id(re
Am 09.10.2012 16:02, schrieb loial:
I am trying to match a string that containing the "<" and ">"
characters, using the string contains function, but it never seems to
find the lines containing the string
e.g if mystring.contains("") :
I can't locate a 'contains' function anywhere, what type i
Michele Simionato wrote:
> I have the following module implementing a registry of functions with a
> decorator:
>
> $ cat x.py
> registry = {} # global dictionary
>
> def dec(func):
> registry[func.__name__] = func
> print registry, id(registry)
> return func
>
> if __name__ == '__m
On Tuesday, October 9, 2012 5:24:17 PM UTC+2, Peter Otten wrote:
> Seriously, you shouldn't use the main script as a library; it is put into
>
> the sys.modules cache under the "__main__" key. Subsequent imports under its
>
> real name will not find that name in the cache and import another ins
On 2012-10-09, Peter Otten <__pete...@web.de> wrote:
> Welcome to python -- this is a trap every newbie falls into ;)
>
> Seriously, you shouldn't use the main script as a library;
There must be something wrong with me. It never even occurred to me
to try to import a file from within that same f
Greetings,
I'm trying to generate C++ code from an XML file. I'd like to use a template
engine, which imo produce something readable and maintainable.
My google search about this subject has been quite unsuccessful, I've been
redirected to template engine specific to html mostly.
Does anybody k
Thanks indeed for your tips. Now I understand the difference between tuples and
dictionaries deeper.
--
http://mail.python.org/mailman/listinfo/python-list
On 10/09/2012 11:36 AM, Michele Simionato wrote:
> On Tuesday, October 9, 2012 5:24:17 PM UTC+2, Peter Otten wrote:
>> Seriously, you shouldn't use the main script as a library; it is put into
>>
>> the sys.modules cache under the "__main__" key. Subsequent imports under its
>>
>> real name will
Bob Martin wrote
> in 682592 20121008 232126 "Prasad, Ramit" wrote:
> >Thomas Bach wrote:=0D=0A> Hi there,=0D=0A> =0D=0A> On Sat, Oct 06, 2012 at =
> >03:08:38PM +, Steven D'Aprano wrote:=0D=0A> >=0D=0A> > my_tuple =3D my_=
> >tuple[:4]=0D=0A> > a,b,c,d =3D my_tuple if len(my_tuple) =3D=3D 4 e
On Tue, Oct 9, 2012 at 2:35 AM, Hussain, Mushabbar
wrote:
>
>
> Hi,
>
> Is it possible to define an Event which should fire when a value of a
> variable changes? Something like below
>
>
>
> self.Bind(wx.EVT_ON_VAL_CHANGE, variable_to_watch, self.Callback)
>
>
>
> I need a Text ctrl UI which conti
Grant Edwards wrote:
> On 2012-10-09, Peter Otten <__pete...@web.de> wrote:
>
>> Welcome to python -- this is a trap every newbie falls into ;)
>>
>> Seriously, you shouldn't use the main script as a library;
>
> There must be something wrong with me. It never even occurred to me
> to try to im
I've just managed to install ipython and get it to run by typing ipython
notebook --pylab=inline
Now I'm getting the following error when I try to plot something in ipython
notebook:
AttributeError: 'module' object has no attribute 'FigureCanvas'
I've tried using imports to make this work:
On 10/09/2012 05:00 PM, Jean-Michel Pichavant wrote:
Greetings,
I'm trying to generate C++ code from an XML file. I'd like to use a template
engine, which imo produce something readable and maintainable.
My google search about this subject has been quite unsuccessful, I've been
redirected to t
On Tue, 09 Oct 2012 20:55:48 +0100
Andrea Crotti wrote:
> On 10/09/2012 05:00 PM, Jean-Michel Pichavant wrote:
> > Greetings,
> >
> > I'm trying to generate C++ code from an XML file. I'd like to use a
> > template engine, which imo produce something readable and maintainable.
> > My google sear
HotNet1
hi,
join small social bookmarking and share best links with pepole.
Please share your friends.We are waiting for you.
thank you
HotNet1 team
http://www.hotnet1.com
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, 09 Oct 2012 11:08:13 -0600, Ian Kelly wrote:
> On Tue, Oct 9, 2012 at 8:08 AM, Demian Brecht
> wrote:
>> A single underscore semantically means private. A double underscore
>> will name mangle the function such that it's only accessible strictly
>> by name through the class that it's defi
On 12-10-09 04:51 PM, Steven D'Aprano wrote:
Really? I tend to view name mangling as a waste of time, and complex
inheritance structures as something to avoid.
Yep, I've been coming around to this as of late.
--
Demian Brecht
@demianbrecht
http://demianbrecht.github.com
--
http://mail.python.o
Hi list,
I just noticed that in /usr/lib/python2.7/threading.py
class _Condition(_Verbose):
...
def _is_owned(self):
# Return True if lock is owned by current_thread.
# This method is called only if __lock doesn't have
_is_owned().
if self.__lock.acquire(0):
On 10/9/12 11:27 AM, bkee...@gmail.com wrote:
I've tried all the usual suspect of uninstalling and reinstalling IDLE and
Python 2.7.3, but my IDLE environment always crashes unexpectedly on Mac OS X
10.8.
Where did you get Python? What version of Tcl/Tk do you have installed?
Is it the one f
Hi,
Has PEP- introduced backward incompatibilities or changes in unicode
encoding
and decoding or should this updated pep require python 3 to make mod_wsgi
working with wsgi 1.0 (pep-333)
scripts ? Moreover is it possible to use python 2.7 with mod_wsgi at all
without the utf-8
encoding er
On 2012-10-10 01:32, Wenhua Zhao wrote:
Hi list,
I just noticed that in /usr/lib/python2.7/threading.py
class _Condition(_Verbose):
...
def _is_owned(self):
# Return True if lock is owned by current_thread.
# This method is called only if __lock doesn't have
_is_owne
I have an external process, 'tralics' that emits mathml when you feed it
latex equations. I want to get that mathml into a string.
The problem for me is that tralics wants to talk to a tty and I've never
done that before; it basically starts its own subshell.
I have the following code which w
Hi everyone,
it's been a while since the last stable release series appeared, so I'm
proud to announce the final release of lxml 3.0.
http://lxml.de/
http://pypi.python.org/pypi/lxml/3.0
Changelog: http://lxml.de/changes-3.0.html
In short, lxml is the most feature-rich and easy-to-use library
59 matches
Mail list logo