On 22/02/2012 23:17, Adrian Klaver wrote:
I can see where that would be preferred when managing multiple versions of
Python, but not when using a single version.
Sorry, I don't agree. It is *never* a good idea to install packages
globally. Using virtualenv or similar (buildout, etc) gives you
It requires concepts of 'python persistence' for the code to be designed .
Else it simple.
Looking for some flow??
On Thu, Feb 23, 2012 at 12:01 PM, Chris Angelico wrote:
> On Thu, Feb 23, 2012 at 5:24 PM, Smiley 4321 wrote:
> > I need to write two file using python script as below -
> >
On Wednesday, February 22, 2012 03:14:51 PM George Tsinarakis did opine:
> Dear Sirs,
>
> We are researchers in Technical University of Crete and our current
> research is in the field of motivation analysis of open source and open
> content software projects participants. We would like to ask yo
On Thu, Feb 23, 2012 at 7:45 PM, Smiley 4321 wrote:
> It requires concepts of 'python persistence' for the code to be designed .
>
> Else it simple.
>
> Looking for some flow??
Go through the tutorial on python.org if you haven't, get some code
written, and then codify your questions :) Chances a
Hi Guys,
I have a custom user form class, it inherits my own custom Form class:
class UserForm(Form):
first_name = TextField(attributes={id='id_firstname'})
Now, everytime UserForm() is instantiated it saves the attributes of
each form members and passes it on to the new instance. I understa
On Thu, Feb 23, 2012 at 1:26 AM, Nav wrote:
> Hi Guys,
>
> I have a custom user form class, it inherits my own custom Form class:
>
> class UserForm(Form):
> first_name = TextField(attributes={id='id_firstname'})
>
> Now, everytime UserForm() is instantiated it saves the attributes of
> each fo
Nav wrote:
Hi Guys,
I have a custom user form class, it inherits my own custom Form class:
class UserForm(Form):
first_name = TextField(attributes={id='id_firstname'})
Now, everytime UserForm() is instantiated it saves the attributes of
each form members and passes it on to the new instanc
Smiley 4321 wrote:
It requires concepts of 'python persistence' for the code to be designed .
Else it simple.
Looking for some flow??
Hi,
Have a look at http://docs.python.org/library/pickle.html
Cheers,
JM
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I've just uploaded pypiserver 0.5.1 to the python package index.
pypiserver is a minimal PyPI compatible server. It can be used to serve
a set of packages and eggs to easy_install or pip.
pypiserver is easy to install (i.e. just easy_install pypiserver). It
doesn't have any external dependen
On 23/02/2012 5:58 PM, Plumo wrote:
I want to download content asynchronously. This would be
straightforward to do threaded or across processes, but difficult
asynchronously so people seem to rely on external libraries (twisted
/ gevent / eventlet).
Exactly - the fact it's difficult is why thos
Plumo writes:
> What do you recommend?
Threads.
> And why is there poor support for asynchronous execution?
The freenode #python crowd seems to hate threads and prefer twisted,
which seems to have the features you want and probably handles very
large #'s of connections better than POSIX thread
Hi,
I'm playing a bit with python dynamic methods and I came up with a
scenario that I don't understant. Considering the follow code:
# Declare a dummy class
class A(object):
pass
# generate a dynamic method and insert it to A class
for name in ['a', 'b', 'c']:
if name == 'b':
@p
Marc Aymerich wrote:
> Hi,
>
> I'm playing a bit with python dynamic methods and I came up with a
> scenario that I don't understant. Considering the follow code:
>
> # Declare a dummy class
> class A(object):
> pass
>
> # generate a dynamic method and insert it to A class
> for name in ['a
On Feb 23, 2:05 pm, Peter Otten <__pete...@web.de> wrote:
> Marc Aymerich wrote:
> > Hi,
>
> > I'm playing a bit with python dynamic methods and I came up with a
> > scenario that I don't understant. Considering the follow code:
>
> > # Declare a dummy class
> > class A(object):
> > pass
>
> >
>> I want to download content asynchronously. This would be
>> straightforward to do threaded or across processes, but difficult
>> asynchronously so people seem to rely on external libraries (twisted
>> / gevent / eventlet).
>
>
> Exactly - the fact it's difficult is why those tools compete.
It i
Following instructions here:
http://docs.python.org/py3k/distutils/builtdist.html#creating-windows-installers
I am trying to create a Windows installer for a pure-module distribution
using Python 3.2. I get a "LookupError: unknown encoding: mbcs"
Here is the full output of distutils and the tra
In http://docs.python.org/release/2.6.7/library/logging.html, it says:
logging.debug(msg[, *args[, **kwargs]])
[...]
There are two keyword arguments in kwargs which are inspected: exc_info
which, if it does not evaluate as false, causes exception information to
be added to the logging message. I
Hi,
i want to learn pyxl please help me...
kindly send useful information about pyxl
*Thank you in Advance*
XLS S :)
On Thu, Feb 23, 2012 at 4:45 AM, wrote:
> Chris Withers wrote:
>
> > On 22/02/2012 00:37, python-ex...@raf.org wrote:
> > >was good for previous versions. two reasons that sp
Roy Smith wrote:
> In http://docs.python.org/release/2.6.7/library/logging.html, it says:
>
> logging.debug(msg[, *args[, **kwargs]])
> [...]
> There are two keyword arguments in kwargs which are inspected: exc_info
> which, if it does not evaluate as false, causes exception information to
> be a
On 23 fév, 15:06, Steven D'Aprano wrote:
> Following instructions here:
>
> http://docs.python.org/py3k/distutils/builtdist.html#creating-windows...
>
> I am trying to create a Windows installer for a pure-module distribution
> using Python 3.2. I get a "LookupError: unknown encoding: mbcs"
>
> He
Duh, I figured out what's going on. I'm using a custom Formatter class, which
overrides format(). It's the job of format() to handle this, and ours doesn't!
--
http://mail.python.org/mailman/listinfo/python-list
On Feb 22, 4:44 am, Fayaz Yusuf Khan
wrote:
> Anyway, I read the source and found many interesting things that ought to be
> mentioned in the docs.
> Such as flush() should be called from close() whenever it's implemented.
> (FileHandler.close() is doing it)
This is entirely handler-dependent -
On 23/02/2012 14:40, xlstime wrote:
Hi,
i want to learn pyxl please help me...
kindly send useful information about pyxl
I would suggest:
- using your real name when posting
- reading the tutorial at http://www.python-excel.org/
cheers,
Chris
--
Simplistix - Content Management, Batch Pro
Il 23 febbraio 2012 07:58, Plumo ha scritto:
> I want to download content asynchronously. This would be straightforward to
> do threaded or across processes, but difficult asynchronously so people seem
> to rely on external libraries (twisted / gevent / eventlet).
>
> (I would use gevent under d
On Thursday 23 Feb 2012 8:23:42 AM Vinay Sajip wrote:
> If locking is required in a particular handler class for close or
> flush, that can be implemented by the developer of that handler class.
> AFAIK there is no such need for the handler classes in the stdlib - if
> you have reason to believe ot
Below is some pretty simple code and the resulting output.
Sometimes the code runs through but sometimes it just freezes for no
apparent reason.
The output pasted is where it just got frozen on me.
It called start() on the 2nd worker but the 2nd worker never seemed to
enter the run method.
###
On Feb 23, 5:55 pm, Fayaz Yusuf Khan
wrote:
> Well, as emit() is always being called from within a lock, I assumed that
> flush() should/would also be handled similarly. Afterall, they are handling
> the
> same underlying output stream or in case of the BufferingHandler share the
> same
> buffe
$ cd /usr/bin
$ ls -l python*
-rwxr-xr-x 2 root root 9496 Oct 27 02:42 python
lrwxrwxrwx 1 root root6 Oct 29 19:34 python2 -> python
-rwxr-xr-x 2 root root 9496 Oct 27 02:42 python2.7
$ diff -s python python2.7
Files python and python2.7 are identical
$
I'm just curious: Why two identical fi
On Thu, 23 Feb 2012 19:11:16 +, HoneyMonster wrote:
(reformatted (I hope)
> $ cd /usr/bin
> $ ls -l python*
> -rwxr-xr-x 2 root root 9496 Oct 27 02:42 python
> lrwxrwxrwx 1 root root 6 Oct 29 19:34 python2 -> python
> -rwxr-xr-x 2 root root 9496 Oct 27 02:42 python2.7
> $ diff -s python pyt
On Thu, Feb 23, 2012 at 2:11 PM, HoneyMonster wrote:
> $ cd /usr/bin
> $ ls -l python*
> -rwxr-xr-x 2 root root 9496 Oct 27 02:42 python
> lrwxrwxrwx 1 root root 6 Oct 29 19:34 python2 -> python
> -rwxr-xr-x 2 root root 9496 Oct 27 02:42 python2.7
> $ diff -s python python2.7
> Files python an
On Thu, Feb 23, 2012 at 11:11 AM, Colin Higwell
wrote:
> $ cd /usr/bin
> $ ls -l python*
> -rwxr-xr-x 2 root root 9496 Oct 27 02:42 python
> lrwxrwxrwx 1 root root 6 Oct 29 19:34 python2 -> python
> -rwxr-xr-x 2 root root 9496 Oct 27 02:42 python2.7
> $ diff -s python python2.7
> Files python
On Thu, 23 Feb 2012 14:24:23 -0500, Jerry Hill wrote:
> On Thu, Feb 23, 2012 at 2:11 PM, HoneyMonster
> wrote:
>> $ cd /usr/bin $ ls -l python*
>> -rwxr-xr-x 2 root root 9496 Oct 27 02:42 python lrwxrwxrwx 1 root root
>> 6 Oct 29 19:34 python2 -> python -rwxr-xr-x 2 root root 9496 Oct 27
>> 02
On Feb 23, 5:55 pm, Fayaz Yusuf Khan
wrote:
> buffer. Shouldn't the access be synchronized?
I've now updated the repos for 2.7, 3.2 and default to add locking for
flush/close operations. Thanks for the suggestion.
Regards,
Vinay Sajip
--
http://mail.python.org/mailman/listinfo/python-list
On 23/02/2012 17:59, Eric Frederich wrote:
Below is some pretty simple code and the resulting output.
Sometimes the code runs through but sometimes it just freezes for no
apparent reason.
The output pasted is where it just got frozen on me.
It called start() on the 2nd worker but the 2nd worker n
On 2/23/2012 2:34 PM, HoneyMonster wrote:
On Thu, 23 Feb 2012 14:24:23 -0500, Jerry Hill wrote:
On Thu, Feb 23, 2012 at 2:11 PM, HoneyMonster
wrote:
$ cd /usr/bin $ ls -l python*
-rwxr-xr-x 2 root root 9496 Oct 27 02:42 python lrwxrwxrwx 1 root root
6 Oct 29 19:34 python2 -> python -rwx
I feel like the design of sum() is inconsistent with other language
features of python. Often python doesn't require a specific type, only
that the type implement certain methods.
Given a class that implements __add__ why should sum() not be able to
operate on that class?
We can fix this in a bac
On Feb 23, 1:19 pm, Buck Golemon wrote:
> I feel like the design of sum() is inconsistent with other language
> features of python. Often python doesn't require a specific type, only
> that the type implement certain methods.
>
> Given a class that implements __add__ why should sum() not be able t
On 23 February 2012 21:19, Buck Golemon wrote:
> I feel like the design of sum() is inconsistent with other language
> features of python. Often python doesn't require a specific type, only
> that the type implement certain methods.
>
> Given a class that implements __add__ why should sum() not be
On Thu, Feb 23, 2012 at 1:19 PM, Buck Golemon wrote:
> I feel like the design of sum() is inconsistent with other language
> features of python. Often python doesn't require a specific type, only
> that the type implement certain methods.
>
> Given a class that implements __add__ why should sum()
On Feb 23, 1:32 pm, Chris Rebert wrote:
> On Thu, Feb 23, 2012 at 1:19 PM, Buck Golemon wrote:
> > I feel like the design of sum() is inconsistent with other language
> > features of python. Often python doesn't require a specific type, only
> > that the type implement certain methods.
>
> > Give
On 23 February 2012 21:23, Buck Golemon wrote:
> def sum(values,
> base=0):
> values =
> iter(values)
>
> try:
> result = values.next()
> except StopIteration:
> return base
>
> for value in values:
> result += value
> return result
This is defi
Chris Rebert, 23.02.2012 22:32:
> On Thu, Feb 23, 2012 at 1:19 PM, Buck Golemon wrote:
>> I feel like the design of sum() is inconsistent with other language
>> features of python. Often python doesn't require a specific type, only
>> that the type implement certain methods.
>>
>> Given a class th
On Fri, Feb 24, 2012 at 8:41 AM, Arnaud Delobelle wrote:
> _sentinel = object()
>
> def sum(iterable, start=_sentinel):
> if start is _sentinel:
>
> del _sentinel
Somewhat off-topic: Doesn't the if statement there do a lookup for a
global, which would mean that 'del _sentinel' will cause it to
On Thu, Feb 23, 2012 at 2:38 PM, Buck Golemon wrote:
> My proposal is still *slightly* superior in two ways:
>
> 1) It reduces the number of __add__ operations by one
> 2) The second argument isn't strictly necessary, if you don't mind
> that the 'null sum' will produce zero.
It produces the wron
On 23 February 2012 21:53, Chris Angelico wrote:
> On Fri, Feb 24, 2012 at 8:41 AM, Arnaud Delobelle wrote:
>> _sentinel = object()
>>
>> def sum(iterable, start=_sentinel):
>> if start is _sentinel:
>>
>> del _sentinel
>
> Somewhat off-topic: Doesn't the if statement there do a lookup for a
>
On Thu, Feb 23, 2012 at 2:53 PM, Chris Angelico wrote:
> On Fri, Feb 24, 2012 at 8:41 AM, Arnaud Delobelle wrote:
>> _sentinel = object()
>>
>> def sum(iterable, start=_sentinel):
>> if start is _sentinel:
>>
>> del _sentinel
>
> Somewhat off-topic: Doesn't the if statement there do a lookup f
On Fri, Feb 24, 2012 at 8:59 AM, Arnaud Delobelle wrote:
> def sum(iterable, start=_sentinel, _sentinel=_sentinel):
Is this a reason for Python to introduce a new syntax, such as:
def foo(blah, optional=del):
if optional is del: print("No argument was provided")
Basically, 'del' is treated
On 23 February 2012 22:04, Chris Angelico wrote:
> On Fri, Feb 24, 2012 at 8:59 AM, Arnaud Delobelle wrote:
>> def sum(iterable, start=_sentinel, _sentinel=_sentinel):
>
> Is this a reason for Python to introduce a new syntax, such as:
>
> def foo(blah, optional=del):
> if optional is del: pri
On Fri, Feb 24, 2012 at 9:09 AM, Arnaud Delobelle wrote:
> On 23 February 2012 22:04, Chris Angelico wrote:
>> On Fri, Feb 24, 2012 at 8:59 AM, Arnaud Delobelle wrote:
>>> def sum(iterable, start=_sentinel, _sentinel=_sentinel):
>>
>> Is this a reason for Python to introduce a new syntax, such a
Hi I am new to python language. On my first day, somebody told me that
if any python script file is opened with any editor except python
editor, the file is corrupted. Some spacing or indentation is changed
and script stops working. I was opening the script file in Windows
using Notepad++ but I did
2012/2/23 Manish Sharma
> Hi I am new to python language. On my first day, somebody told me that
> if any python script file is opened with any editor except python
> editor, the file is corrupted. Some spacing or indentation is changed
> and script stops working. I was opening the script file in
They are telling you not to switch between editors that use tabs as tabs and
ones that use spaces as tabs. Python gets all wonky. No big, use one editor or
have your preferred editor highlight your non-preferred whitespace.
FWIW, I use spaces.
--
http://mail.python.org/mailman/listinfo/python-
On Thu, Feb 23, 2012 at 2:22 PM, Amirouche Boubekki <
amirouche.boube...@gmail.com> wrote:
>
>
> 2012/2/23 Manish Sharma
>
>> Hi I am new to python language. On my first day, somebody told me that
>> if any python script file is opened with any editor except python
>> editor, the file is corrupte
On 02/23/2012 05:13 PM, Manish Sharma wrote:
Hi I am new to python language. On my first day, somebody told me that
if any python script file is opened with any editor except python
editor, the file is corrupted. Some spacing or indentation is changed
and script stops working. I was opening the s
On Fri, 24 Feb 2012 08:53:49 +1100, Chris Angelico wrote:
> On Fri, Feb 24, 2012 at 8:41 AM, Arnaud Delobelle
> wrote:
>> _sentinel = object()
>>
>> def sum(iterable, start=_sentinel):
>> if start is _sentinel:
>>
>> del _sentinel
>
> Somewhat off-topic: Doesn't the if statement there do a lo
On Fri, Feb 24, 2012 at 10:33 AM, Steven D'Aprano
wrote:
> Yes, deleting _sentinel will cause the custom sum to fail, and yes, you
> have missed something.
>
> If the caller wants to mess with your library and break it, they have
> many, many ways to do so apart from deleting your private variable
On Thu, 23 Feb 2012 07:09:35 -0800, jmfauth wrote:
> On 23 fév, 15:06, Steven D'Aprano +comp.lang.pyt...@pearwood.info> wrote:
>> Following instructions here:
>>
>> http://docs.python.org/py3k/distutils/builtdist.html#creating-
windows...
>>
>> I am trying to create a Windows installer for a pure
My current implementation works fine below a few hundred threads. But each
thread takes up a lot of memory so does not scale well.
I have been looking at Erlang for that reason, but found it is missing useful
libraries in other areas.
--
http://mail.python.org/mailman/listinfo/python-list
On Fri, 24 Feb 2012 00:11:11 +, Steven D'Aprano wrote:
> On Thu, 23 Feb 2012 07:09:35 -0800, jmfauth wrote:
>
>> On 23 fév, 15:06, Steven D'Aprano > +comp.lang.pyt...@pearwood.info> wrote:
>>> Following instructions here:
>>>
>>> http://docs.python.org/py3k/distutils/builtdist.html#creating-
This week I was slightly surprised by a behaviour that I've not
considered before. I've long used
for i, x in enumerate(seq):
# do stuff
as a standard looping-with-index construct. In Python for loops don't
create a scope, so the loop variables are available afterward. I've
sometimes used this
On Thu, 23 Feb 2012 16:30:09 -0800, Alex Willmer wrote:
> This week I was slightly surprised by a behaviour that I've not
> considered before. I've long used
>
> for i, x in enumerate(seq):
># do stuff
>
> as a standard looping-with-index construct. In Python for loops don't
> create a scope
that example is excellent - best use of asynchat I have seen so far.
I read through the python-dev archives and found the fundamental problem is no
one maintains asnycore / asynchat.
--
http://mail.python.org/mailman/listinfo/python-list
Alex Willmer writes:
> i = 0
> for x in seq:
> # do stuff
> i += 1
> print 'Processed %i records' % i
>
> Just thought it worth mentioning, curious to hear other options/
> improvements/corrections.
Stephen gave an alternate patch, but you are right, it is a pitfall that
can be easy to mi
Wasn't supposed to be private, just something went funky with gmail
when i sent it out, oddly enough
On Thu, Feb 23, 2012 at 8:32 PM, Dave Angel wrote:
> On 02/23/2012 07:15 PM, Joshua Miller wrote:
>>
>> When he/she said "python editor" i'm sure they meant IDLE which in
>> some cases is the wors
On Thursday 23 Feb 2012 5:10:25 PM Plumo wrote:
> I read through the python-dev archives and found the fundamental problem is
> no one maintains asnycore / asynchat.
By all means, scratch your own itch. :)
--
Fayaz Yusuf Khan
Cloud developer and architect
Dexetra SS, Bangalore, India
fayaz.yusuf.
On 2/23/2012 4:43 PM, Dave Angel wrote:
> First thing I'd do is to disable tab logic in the editor. When you
> press the tab key, there's no excuse for an editor to actually put a tab
> in the file. It should adjust the column by adding the appropriate
> number of spaces.
Unless, of course, yo
Steven D'Aprano wrote:
On Thu, 23 Feb 2012 16:30:09 -0800, Alex Willmer wrote:
This week I was slightly surprised by a behaviour that I've not
considered before. I've long used
for i, x in enumerate(seq):
# do stuff
as a standard looping-with-index construct. In Python for loops don't
crea
c = [1, 2, 3, 4, 5]
class TEST():
c = [5, 2, 3, 4, 5]
def add( self ):
c[0] = 15
a = TEST()
a.add()
print( c, a.c, TEST.c )
result :
[15, 2, 3, 4, 5] [5, 2, 3, 4, 5] [5, 2, 3, 4, 5]
why a.add() do not update c in Class TEST? but update c in main file
--
http://mail.python.or
On Wed, 22 Feb 2012 18:42:11 +0100, Jérôme wrote:
>>> Has anyone had success generating exe's from within Linux?
>>
>> That doesn't seem to have anything to do with Python,
>> but you might want to google for cross-compiling.
>
> I think his question is totally python related.
>
> As I understa
On Thu, Feb 23, 2012 at 9:55 PM, xixiliguo wrote:
> c = [1, 2, 3, 4, 5]
> class TEST():
> c = [5, 2, 3, 4, 5]
That line creates a class (i.e. "static") variable, which is unlikely
to be what you want. Instance variables are normally created in the
body of an __init__() method.
> def add( s
On 24/02/2012 03:49, Ethan Furman wrote:
Steven D'Aprano wrote:
On Thu, 23 Feb 2012 16:30:09 -0800, Alex Willmer wrote:
This week I was slightly surprised by a behaviour that I've not
considered before. I've long used
for i, x in enumerate(seq):
# do stuff
as a standard looping-with-index co
Hi All,
Thanks a ton for your replies!
Still my question is what if I open the file and dont make any changes to
it and close it again? Can it be possible just by doing these steps add
indentation to lines? I am not changing the file prefrences to open it
always with notepad++. Opening it once on
On 2/24/2012 1:11 AM, Manish Sharma wrote:
> Still my question is what if I open the file and dont make any changes
> to it and close it again? Can it be possible just by doing these steps
> add indentation to lines? I am not changing the file prefrences to open
> it always with notepad++. Opening
On Thu, Feb 23, 2012 at 2:34 PM, HoneyMonster wrote:
> On Thu, 23 Feb 2012 14:24:23 -0500, Jerry Hill wrote:
>> It's not two files, it's a hardlink. You can confirm by running ls -li
>> python* and comparing the inode numbers.
>
> You are spot on. Thank you, and sorry for my stupidity.
I don't t
Is Federal Reserve a Private Property or Public Property ?
Exhilerating video by Honorable Alex Jones
http://www.youtube.com/watch?v=4UqcY8lGUUE&feature=g-vrec&context=G27...
gnu.emacs.help,soc.culture.jewish,sci.electronics.design,comp.lang.scheme,comp.lang.python
--
http://mail.pytho
Am 23.02.2012 20:54 schrieb Jerry Hill:
If I recall
correctly, for directories, that's the number of entries in the
directory.
No. It is the number of subdirectories (it counts their ".." entries)
plus 2 (the parent directory and the own "." entry).
Even with that, it's hard to tell what
76 matches
Mail list logo