On Mar 31, 6:05 am, harrismh777 wrote:
> Greetings,
>
> The purpose of this communique is to document a process for
> installing python2.7.1 in parallel with python3.2 on a concurrent
> desktop with independent idle and python path structure.
Not sure if this is relevant...
python-mode (emac
If you want to get the innovative information on the Job & job Market,
please click on this website:
www.111jobs.blogspot.com
This website is based on the job technique and idea.
--
http://mail.python.org/mailman/listinfo/python-list
For getting the effective information on the News, please click on
this website:
www.ml97712.blogspot.com
This website will provide you the knowledge about the best news.
--
http://mail.python.org/mailman/listinfo/python-list
For getting good knowledge about Marxism and Literature, Marx & his
Opinions to sharpen thinking analytically, don't forget to click on
the website given below:-
www.analyzethink.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
Chris Angelico writes:
>> def f(x,n,w): return x if n==1 else\
>> (lambda x0=f(x[::2],n/2,w[::2]),\
>> x1=f(x[1::2],n/2,w[::2]): reduce(lambda a,b: a+b ,\
>> zip(*[(x0[k]+w[k]*x1[k],\
>> x0[k]-w[k]*x1[k
On Mon, 04 Apr 2011 20:59:52 -0700, geremy condra wrote:
> On Mon, Apr 4, 2011 at 7:45 PM, Steven D'Aprano
> wrote:
>> * The disclaimers about timing code snippets that can be found in the
>> timeit module apply. If possible, use timeit rather than roll-you-own
>> timers.
>
> Huh. In looking in
On 4/4/2011 9:16 PM, harrismh777 wrote:
Another item that would be nice as an IDLE enhancement would be a menu
option that applies the fixers (either direction depending on version
2.7 <--> 3.2) right in the IDE. Entries that could not be fixed could be
flagged for manual update.
I have had th
On Tuesday, April 5, 2011 2:16:07 AM UTC+1, harrismh777 wrote:
> Steven D'Aprano wrote:
> > I prefer to consider Python 2.7 and Python 3.x as different dialects of
> > the same language. There are a very few handful of incompatibilities,
> > most of which can be automatically resolved by the 2to3 f
In an extended case when you try and capture how a function works over a range
of inputs, you might want to not assume some relationship between input size
and time, as this mnight limit your ability to change algorithms and still have
acceptable performance.
I.e. instead of this:
input_range
On Mon, Apr 4, 2011 at 7:45 PM, Steven D'Aprano
wrote:
> I'm writing some tests to check for performance regressions (i.e. you
> change a function, and it becomes much slower) and I was hoping for some
> guidelines or hints.
>
> This is what I have come up with so far:
>
>
> * The disclaimers abou
On Mon, Apr 4, 2011 at 7:45 PM, Steven D'Aprano <
steve+comp.lang.pyt...@pearwood.info> wrote:
> I'm writing some tests to check for performance regressions (i.e. you
> change a function, and it becomes much slower) and I was hoping for some
> guidelines or hints.
>
> This is what I have come up w
On Monday, April 4, 2011 9:40:33 AM UTC-4, Νικόλαος Κούρας wrote:
In one of your messages you wrote the following:
> cursor.execute( '''INSERT INTO users(mail, comment) VALUES(%s,
> %s)''', (mail, comment) )
> except MySQLdb.Error:
> print ( "Error %d: %s" % (e.args[0], e.args[1]) )
Is this a ty
I'm writing some tests to check for performance regressions (i.e. you
change a function, and it becomes much slower) and I was hoping for some
guidelines or hints.
This is what I have come up with so far:
* The disclaimers about timing code snippets that can be found in the
timeit module appl
Steven D'Aprano wrote:
I prefer to consider Python 2.7 and Python 3.x as different dialects of
the same language. There are a very few handful of incompatibilities,
most of which can be automatically resolved by the 2to3 fixers.
Yes, I am actually finding this to be consistent with my experienc
On Apr 4, 2011, at 9:03 PM, Dan Stromberg wrote:
> On Mon, Apr 4, 2011 at 4:34 PM, Philip Semanchuk wrote:
>
>> So if you're going to use multiprocessing, you're going to use pickle, and
>> you need pickleable objects.
>>
>
> http://docs.python.org/library/multiprocessing.html#sharing-state-be
On Apr 4, 2011, at 9:08 AM, Wiktor Adamski wrote:
> I have 2 threads in C code using python 2.5.2. First thread creates
> new interpreter (i need several interpreters but those 2 threads use
> only one) like that:
>
> PyEval_AcquireLock();
> threadState = Py_NewInterpreter();
> PyThreadState_Swa
On Mon, Apr 4, 2011 at 4:34 PM, Philip Semanchuk wrote:
> So if you're going to use multiprocessing, you're going to use pickle, and
> you need pickleable objects.
>
http://docs.python.org/library/multiprocessing.html#sharing-state-between-processes
--
http://mail.python.org/mailman/listinfo/pyt
On Tue, 05 Apr 2011 07:41:37 +1000, Chris Angelico wrote:
> On Tue, Apr 5, 2011 at 7:10 AM, rantingrick
> wrote:
>> olks who have vast libraries of Python code that have been rendered
>> useless because a few elites have spent too much time lamenting
>> minutia.
>
> How is the code "rendered use
On 4/4/11 3:20 PM, John Ladasky wrote:
Hi folks,
I'm developing some custom neural network code. I'm using Python 2.6,
Numpy 1.5, and Ubuntu Linux 10.10. I have an AMD 1090T six-core CPU,
and I want to take full advantage of it. I love to hear my CPU fan
running, and watch my results come bac
On Apr 4, 2011, at 4:20 PM, John Ladasky wrote:
> I have been playing with multiprocessing for a while now, and I have
> some familiarity with Pool. Apparently, arguments passed to a Pool
> subprocess must be able to be pickled.
Hi John,
multiprocessing's use of pickle is not limited to Pool.
On Mon, 04 Apr 2011 17:09:07 -0500, harrismh777 wrote:
> Python(3) is a new language. It has many of the same characteristics
> of Python2, but will be more consistent, cleaner, leaner, more robust...
> and certainly loved more universally by more people the world over for
> centuries to come.
On 4/4/2011 3:16 PM Gregory Ewing said...
Chris Angelico wrote:
(Remind me how it is that Python code is more readable than line noise
or Perl code?)
Crazy thought: I wonder if Perl programmers have "multi
line Perl" competitions where they laugh their heads off
at how readable the code is, a
On Tue, Apr 5, 2011 at 8:16 AM, Gregory Ewing
wrote:
> Chris Angelico wrote:
>
> Crazy thought: I wonder if Perl programmers have "multi
> line Perl" competitions where they laugh their heads off
> at how readable the code is, and how nobody in their
> right mind would ever write Perl code that wa
The University of Toronto Department of Physics brings PyCamp to Toronto
on Monday, June 27 through Thursday, June 30, 2011.
Register today at http://trizpug.org/boot-camp/torpy11/
For beginners, this ultra-low-cost Python Boot Camp makes you productive
so you can get your work done quickly. P
On Tue, Apr 5, 2011 at 8:16 AM, rantingrick wrote:
>> and (b) in any place where it's not,
>> it's going to be about one command to install a python2?
>
> Oh thanks Chris for revealing the simplicity of 2 to 3 code porting.
> And might ask where you will begin to volunteer your expertise to the
>
Chris Angelico wrote:
(Remind me how it is that Python code is more readable than line noise
or Perl code?)
Crazy thought: I wonder if Perl programmers have "multi
line Perl" competitions where they laugh their heads off
at how readable the code is, and how nobody in their
right mind would eve
On Apr 4, 4:41 pm, Chris Angelico wrote:
> How is the code "rendered useless" when (a) Python 2.7 is still the
> default Python in many places,
That's the point. We are going to see Python2.x around for a very long
time. A *very* long time Chris. Sadly if this conversion was planned a
wee bit bet
Paul Rubin wrote:
Vector processors are back, they just call them GPGPU's now.
Also present to some extent in the CPU, with
MMX, Altivec, etc.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, Apr 4, 2011 at 1:20 PM, John Ladasky wrote:
> When should one pickle and copy? When to implement an object in
> shared memory? Why is pickling apparently such a non-trivial process
> anyway? And, given that multi-core CPU's are apparently here to stay,
> should it be so difficult to ma
rantingrick wrote:
Yes and whilst that was a brilliant display of bombastic arrogance
your statements miss the point completely.
And what about the large steaming pile of elephant dung in
the room your nose seems to be unable to smell?
As we all know Python has experienced an explosion of u
geremy condra wrote:
I'd be interested in seeing the performance impact of this, although I
wonder if it'd be feasible.
A project I have in the back of my mind goes something
like this:
1) Design an instruction set for a Python machine and
a microcode architecture to support it
2) Write a si
On Mon, Apr 4, 2011 at 16:44, Martin v. Loewis wrote:
>> is there a way that this can be done in python2.4? It's annoying but I
>> need to support python2.4 for a while yet :-(
>
> ldd /usr/lib/python2.4/lib-dynload/_ssl.so
> [...]
> libssl.so.0.9.8 => /usr/lib/libssl.so.0.9.8 (0x7f6a5
Terry Reedy wrote:
So a
small extension to array with .map, .filter, .reduce, and a wrapper
class would be more useful than I thought.
Also useful would be some functions for doing elementwise
operations between arrays. Sometimes you'd like to just do
a bit of vector arithmetic, and pulling in
On Tue, Apr 5, 2011 at 6:09 AM, gb wrote:
> harrismh777 writes:
>
>> Seriously, these little one liners teach me more about the python
>> language in less time than [...]
>
> def f(x,n,w): return x if n==1 else\
> (lambda x0=f(x[::2],n/2,w[::2]),\
> x1=f(x[1::2],n/2,w[::2]): reduce(
> import ssl
> ssl.OPENSSL_VERSION
>
> is there a way that this can be done in python2.4? It's annoying but I
> need to support python2.4 for a while yet :-(
ldd /usr/lib/python2.4/lib-dynload/_ssl.so
[...]
libssl.so.0.9.8 => /usr/lib/libssl.so.0.9.8 (0x7f6a5a9b7000)
[...]
HTH,
Marti
On Tue, Apr 5, 2011 at 7:10 AM, rantingrick wrote:
> olks who have vast libraries of Python
> code that have been rendered useless because a few elites have spent
> too much time lamenting minutia.
How is the code "rendered useless" when (a) Python 2.7 is still the
default Python in many places,
Peter Otten wrote:
> You could automatically convert from a custom format like that in your
> original post...
Here's a class wrapping your functionality:
import re
class Template(object):
'''uses double brackets e.g [[ob.attr]] as delims to get
around curly bracket ({}) collisions
On Apr 4, 2:06 pm, Matt H wrote:
> I am subclassing tkSimpleDialog.Dialog as a (sqlite) database front-
> end. This parent dialog opens a number of child dialogs to propagate
> sub-tables (like sub-forms in OOo). These subforms write their input
> into the database (INSERT...)
>
> The parent dialo
On Apr 2, 5:13 am, Steven D'Aprano wrote:
> "Should I use the list, list2, sortable_list, sortable_list2,
> sortable_lost3, [note spelling, which we're stuck with forever],
> heterogeneous_list, heterogeneous_list_without_stooge_sort, new_list,
> fancy_list, fancy_list2, fancy_list_with_extra_oom
Peter Otten wrote:
> You could automatically convert from a custom format like that in your
> original post:
>
> import re
>
> _lookup = {
> "[[": "{",
> "]]": "}",
> "{": "{{",
> "}": "}}",
>
> }
>
> def _substitute(m):
> return _lookup[m.group()]
>
> def custom_format(template
Hi
I'm trying to determine the version of OpenSSL that a given python is
compiled against, with python2.7 I can do this with:
import ssl
ssl.OPENSSL_VERSION
is there a way that this can be done in python2.4? It's annoying but I
need to support python2.4 for a while yet :-(
Cheers
Adam
--
http
Hi folks,
I'm developing some custom neural network code. I'm using Python 2.6,
Numpy 1.5, and Ubuntu Linux 10.10. I have an AMD 1090T six-core CPU,
and I want to take full advantage of it. I love to hear my CPU fan
running, and watch my results come back faster.
When I'm training a neural net
John Nagle writes:
> That sort of thing was popular in the era of the early
> Cray machines. Once superscalar CPUs were developed,
> the overhead on tight inner loops went down, and several
> iterations of a loop could be in the pipeline at one time,
Vector processors are back, they just cal
John Roth wrote:
You might want to look at PEP 394, which is tentatively scheduled for
Python 3.3 and the next maintenance release of 2.7. As far as I can
tell, this pretty much solves the problem for Unixoid and MacOS
systems.
Thanks John. I finally read PEP 394 and 397. Yes, these handle the
harrismh777 writes:
> Seriously, these little one liners teach me more about the python
> language in less time than [...]
def f(x,n,w): return x if n==1 else\
(lambda x0=f(x[::2],n/2,w[::2]),\
x1=f(x[1::2],n/2,w[::2]): reduce(lambda a,b: a+b ,\
On 4/4/2011 12:47 AM, Gregory Ewing wrote:
John Nagle wrote:
A tagged machine might make Python faster. You could have
unboxed ints and floats, yet still allow values of other types,
with the hardware tagging helping with dispatch. But it probably
wouldn't help all that much. It didn't in the L
On 2011-04-04 18:54:40 +0200, Jabba Laci said:
I want to construct an XML file with lxml but I don't find how to add
the '' header.
from lxml import etree as ET
html = ET.Element("html")
print ET.tostring(html)
Add the "xml_declaration=True" as an argument of etree.tostring().
--
C-K
--
ht
On Apr 4, 9:41 am, Terry Reedy wrote:
> On 4/4/2011 1:51 AM, Paul Rubin wrote:
>
> > I didn't realize Python used Karatsuba. The main issue is probably that
> > Python uses a straightforward portable C implementation that's not
> > terribly efficient,
>
> but relatively easy for a couple of peopl
On 4 Απρ, 17:38, Mel wrote:
> Íéêüëáïò Êïýñáò wrote:
> >> > iam getting the following error which i dont understand
>
> >> > **
> >> > 163 # insert guest comments into database if form was
> >> > submitted
> >> > 164 if
O
fix exactly, and there is always worry that permanance enhancements may
have unforseen side effects. I will let Raymond make the call on this.
/permanance/performance/, /unforseen/unforeseen/
--
Terry Jan Reedy
--
http://mail.python.org/mailman/listinfo/python-list
"eryksun ()" writes:
> figure(fig1.number)
> plot(...)
that's already much better than figure(1);...;figure(2);...
> Alternatively, you can use the plot methods of a particular axes:
>
> fig1 = figure()
> ax1 = axes()
> fig2 = figure()
> ax2 = axes()
>
> ax1.plot(...
I am subclassing tkSimpleDialog.Dialog as a (sqlite) database front-
end. This parent dialog opens a number of child dialogs to propagate
sub-tables (like sub-forms in OOo). These subforms write their input
into the database (INSERT...)
The parent dialog then either commits or rolls-back transacti
On 4/4/2011 1:20 PM, geremy condra wrote:
On Mon, Apr 4, 2011 at 9:41 AM, Terry Reedy wrote:
(I believe that retaining two implementations internally was considered but
rejected. Could be wrong.)
There are two implementations, grade school multiplication and
karatsuba, which kicks in after
On 4/4/2011 1:14 PM, Terry Reedy wrote:
On 4/4/2011 5:23 AM, Paul Rubin wrote:
Gregory Ewing writes:
What might help more is having bytecodes that operate on
arrays of unboxed types -- numpy acceleration in hardware.
That is an interesting idea as an array or functools module patch.
Basically
On 4/4/2011 9:35 AM, Lie Ryan wrote:
On 04/04/11 19:34, Antoon Pardon wrote:
On Fri, Apr 01, 2011 at 10:21:33PM -0400, Terry Reedy wrote:
rewriting cmp_to_key in C is underway
http://bugs.python.org/issue11707
Nice to know! Any chance this wil get into 2.7.x?
Python 2.7 still have list.so
On 4/4/2011 5:34 AM, Antoon Pardon wrote:
On Fri, Apr 01, 2011 at 10:21:33PM -0400, Terry Reedy wrote:
rewriting cmp_to_key in C is underway
http://bugs.python.org/issue11707
Nice to know! Any chance this wil get into 2.7.x?
I posted the question to the issue.
--
Terry Jan Reedy
--
http:
On Mon, Apr 4, 2011 at 9:41 AM, Terry Reedy wrote:
> On 4/4/2011 1:51 AM, Paul Rubin wrote:
>
>> I didn't realize Python used Karatsuba. The main issue is probably that
>> Python uses a straightforward portable C implementation that's not
>> terribly efficient,
>
> but relatively easy for a coupl
On 4/4/2011 5:23 AM, Paul Rubin wrote:
Gregory Ewing writes:
What might help more is having bytecodes that operate on
arrays of unboxed types -- numpy acceleration in hardware.
That is an interesting idea as an array or functools module patch.
Basically a way to map or fold arbitrary function
Hi,
I want to construct an XML file with lxml but I don't find how to add
the '' header.
from lxml import etree as ET
html = ET.Element("html")
print ET.tostring(html)
simply prints
Thanks,
Laszlo
--
http://mail.python.org/mailman/listinfo/python-list
On 4/4/2011 1:51 AM, Paul Rubin wrote:
I didn't realize Python used Karatsuba. The main issue is probably that
Python uses a straightforward portable C implementation that's not
terribly efficient,
but relatively easy for a couple of people to maintain. For (C)Python 3,
which no longer has a
On Mon, Apr 4, 2011 at 12:47 AM, Gregory Ewing
wrote:
> John Nagle wrote:
>
>> A tagged machine might make Python faster. You could have
>> unboxed ints and floats, yet still allow values of other types,
>> with the hardware tagging helping with dispatch. But it probably
>> wouldn't help all
On Mon, 04 Apr 2011 05:14:46 -0700, Mustafa Cayci wrote:
> Hello,
>
> I followed several postings in Google and came up with the beginning of
> the following code:
> During the execution, I am getting
>
> Problem invoking WLST - Traceback (innermost last):
> File "/home/oracle/wlsuserconfigfil
Alia Khouri wrote:
> Terry Reedy wrote:
>
>> Just double the brackets, just as one doubles '\\' to get '\' in a
>> string.
>>
>> >>> "class {0}Model {{ public bool IsModel(){{ returntrue;
>> ".format('My')
>>
>> 'class MyModel { public bool IsModel(){ returntrue; } }'
>>
>
> Indeed, I tried
On Apr 3, 8:06 am, Mag Gam wrote:
> Thanks for the responses.
>
> Basically, I have a large file with this format,
>
> Date INFO username command srcipaddress filename
>
> I would like to do statistics on:
> total number of usernames and who they are
> username and commands
> username and filename
Terry Reedy wrote:
> Just double the brackets, just as one doubles '\\' to get '\' in a string.
>
> >>> "class {0}Model {{ public bool IsModel(){{ returntrue; ".format('My')
>
> 'class MyModel { public bool IsModel(){ returntrue; } }'
>
Indeed, I tried that, but it means I have to double bra
Hi All,
PyDev 2.0 has been released
Details on PyDev: http://pydev.org
Details on its development: http://pydev.blogspot.com
Release Highlights:
===
Major
-
* TDD actions on Ctrl+1
* Improved code coverage support
See video at: http://pydev.org/video_pydev_20.html
On Apr 4, 5:06 am, Kushal Kumaran
wrote:
> On Mon, Apr 4, 2011 at 9:48 AM, ecu_jon wrote:
> > On Apr 4, 12:17 am, Chris Rebert wrote:
> >> On Sun, Apr 3, 2011 at 8:30 PM, ecu_jon wrote:
> >> > i am writing a basic backup program for my school. so they wanted the
> >> > possibility to be able to
Νικόλαος Κούρας wrote:
>> > iam getting the following error which i dont understand
>>
>> > **
>> > 163 # insert guest comments into database if form was
>> > submitted
>> > 164 if "@" in mail and comment not in ("Σχολιά
Νικόλαος Κούρας wrote:
>> if "@" in mail and comment not in INVALID_COMMENTS:
> In my original question can you explain to me what the meaning of the
> following error is?
>
>
> mail = None, comment = None
> TypeError: iterable argument required
> arg
>Sending POST data can be done as follows (I'm changing bar=foo to
Thanks for this, and the links.
On 4/4/2011 12:24 AM, Chris Rebert wrote:
On Sun, Apr 3, 2011 at 10:36 PM, Littlefield, Tyler wrote:
Hello:
I have some data that needs to be fed through a html form to get validated
and processe
On 3 Απρ, 17:01, "eryksun ()" wrote:
> On Saturday, April 2, 2011 12:26:18 PM UTC-4, Νικόλαος Κούρας wrote:
> > Hello, after inserting this line if "@" in mail and comment not in
> > ("Σχολιάστε ή ρωτήστε με σχετικά", ""):
>
> > iam getting the following error which i dont understand
>
> > ***
On 04/04/11 19:34, Antoon Pardon wrote:
> On Fri, Apr 01, 2011 at 10:21:33PM -0400, Terry Reedy wrote:
>>
>> rewriting cmp_to_key in C is underway
>>
>> http://bugs.python.org/issue11707
>>
> Nice to know! Any chance this wil get into 2.7.x?
Python 2.7 still have list.sort(cmp=...)/sorted(cmp=...)
I have 2 threads in C code using python 2.5.2. First thread creates
new interpreter (i need several interpreters but those 2 threads use
only one) like that:
PyEval_AcquireLock();
threadState = Py_NewInterpreter();
PyThreadState_Swap(threadState);
// calling python API
PyThreadState_Swap(NULL);
Hello,
I followed several postings in Google and came up with the beginning of the
following code:
During the execution, I am getting
Problem invoking WLST - Traceback (innermost last):
File "/home/oracle/wlsuserconfigfiles/./Health_Check_Servers.py", line 80, in
?
File "/home/oracle/wlsus
On 04/04/2011 01:36 AM, Littlefield, Tyler wrote:
> Hello:
> I have some data that needs to be fed through a html form to get
> validated and processed and the like. How can I use python to send data
> through that form, given a specific url? the form says it uses post, but
> I"m not really sure
On Fri, Apr 01, 2011 at 10:21:33PM -0400, Terry Reedy wrote:
>
> rewriting cmp_to_key in C is underway
>
> http://bugs.python.org/issue11707
>
Nice to know! Any chance this wil get into 2.7.x?
--
Antoon Pardon
--
http://mail.python.org/mailman/listinfo/python-list
Gregory Ewing writes:
> What might help more is having bytecodes that operate on
> arrays of unboxed types -- numpy acceleration in hardware.
That is an interesting idea as an array or functools module patch.
Basically a way to map or fold arbitrary functions over arrays, with a
few obvious optim
On Mon, Apr 4, 2011 at 9:48 AM, ecu_jon wrote:
> On Apr 4, 12:17 am, Chris Rebert wrote:
>> On Sun, Apr 3, 2011 at 8:30 PM, ecu_jon wrote:
>> > i am writing a basic backup program for my school. so they wanted the
>> > possibility to be able to set source/destination from a config file.
>> > my
Hello friends.
What are you looking for. You can find everything
what you want.
just visit: www.hothitsbollywood.blogspot.com
www.aishwaryaraismile.blogspot.com
www.bollywoodhotpik.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
John Nagle wrote:
A tagged machine might make Python faster. You could have
unboxed ints and floats, yet still allow values of other types,
with the hardware tagging helping with dispatch. But it probably
wouldn't help all that much. It didn't in the LISP machines.
What might help more
Paul Rubin wrote:
You can order 144-core Forth chips right now,
http://greenarrays.com/home/products/index.html
They are asynchronous cores running at around 700 mhz, so you get an
astounding amount of raw compute power per watt and per dollar. But for
me at least, it's not that easy to fi
81 matches
Mail list logo