On Mon, 26 Jul 2010 00:36:47 -0400, Edward Diener wrote:
> On 7/25/2010 10:42 PM, David Robinow wrote:
[...]
>> Edward, I'm having a really hard time understanding your problem. Could
>> you give an example of some real code that is causing you difficulty?
>
> I start a Python script for version
Hi,
I am developing an app using wxPython.
The Undo-Redo implementation is based on storing pre & post state of
an attribute.
You store the instance before changing the value and store the
instance after changing the values.
While undoing or redoing, you copy/replace the current state with
stored o
On 7/25/2010 10:42 PM, David Robinow wrote:
On Sun, Jul 25, 2010 at 8:40 PM, Edward Diener
wrote:
On 7/25/2010 5:57 PM, Thomas Jollans wrote:
So if a standard library module ( or distributed library ) executes a call
internally to 'python xxx yyy' or executes a call internally to
'someScript.p
On Sun, 25 Jul 2010 14:47:11 +, Steven D'Aprano wrote:
>>> But in the
>>> meanwhile, once you get an error, you know what it is. You can
>>> intentionally feed code bad data and see what you get. And then maybe
>>> add a test to make sure your code traps such errors.
>>
>> That doesn't really
On Sun, Jul 25, 2010 at 9:02 PM, tazimk wrote:
> Hi,
>
> I am using python's multiprocessing module to spawn new process
>
> as follows :
>
> import multiprocessing
> import os
> d = multiprocessing.Process(target=os.system,args=('iostat 2 >
> a.txt',))
> d.start()
>
> I want to obtain pid of iost
Hi,
I am using python's multiprocessing module to spawn new process
as follows :
import multiprocessing
import os
d = multiprocessing.Process(target=os.system,args=('iostat 2 >
a.txt',))
d.start()
I want to obtain pid of iostat command or the command executed using
multiprocessing module
Whe
Everything you ever wanted to know about super is collected here:
http://micheles.googlecode.com/hg/artima/python/super.pdf
M.S.
--
http://mail.python.org/mailman/listinfo/python-list
Python-list is comp.lang.python turned into mailing list form. gmane
is python-list turned back into a newsgroup. The reason it gets less
spam is because it's behind the mailing list's spam filters. Both the
mailing list and gmane should see the same amount of spam. which is
way less than the origi
On 7/25/2010 8:41 PM, Steven D'Aprano wrote:
On Sun, 25 Jul 2010 15:19:53 -0400, Edward Diener wrote:
On 7/25/2010 10:03 AM, Thomas Jollans wrote:
On 07/25/2010 02:46 PM, Edward Diener wrote:
The problem with this is that you forget that a script can invoke
Python internally. So whether one u
On Sun, Jul 25, 2010 at 8:40 PM, Edward Diener
wrote:
> On 7/25/2010 5:57 PM, Thomas Jollans wrote:
> So if a standard library module ( or distributed library ) executes a call
> internally to 'python xxx yyy' or executes a call internally to
> 'someScript.py yyy', you're fine with multiple co-exi
"Günther Dietrich" writes:
> pyt...@bdurham.com wrote:
>
> >I have some very simple use cases[1] for adding some version control
> >capabilities to a product I'm working on.
[…]
> >I'm looking for recommendations on possible solutions:
> >
> >1. Use an existing version control utility.
[…]
> Us
On Sun, 25 Jul 2010 15:19:53 -0400, Edward Diener wrote:
> On 7/25/2010 10:03 AM, Thomas Jollans wrote:
>> On 07/25/2010 02:46 PM, Edward Diener wrote:
>>> The problem with this is that you forget that a script can invoke
>>> Python internally. So whether one uses the console or file association
>
On 7/25/2010 5:57 PM, Thomas Jollans wrote:
On 07/25/2010 11:10 PM, Edward Diener wrote:
On 7/25/2010 3:39 PM, Christian Heimes wrote:
Am 25.07.2010 21:32, schrieb Thomas Jollans:
If a script uses sys.executable instead of "python", there is no
problem, at all.
It's true that sys.executable
On Sun, Jul 25, 2010 at 5:08 PM, Westly Ward wrote:
> x = {"type":"folder", "name":"sonicbot", "data":[{"type":"folder",
> "name":"SonicMail", "data":[{"type":"file", "name":"bbcode.py",
> "compressed":False, "contents":"blahblahfilecontents"}]}]}
> print x
> def setindict(dictionary, keys, value)
Raymond Hettinger wrote:
Every class
in the MRO implementing the target method *must* call super() to give
the next class in the MRO a chance to run.
EXCEPT for the last one, which must NOT call super!
The posted example happens to work because object has
a default __init__ method that does no
x = {"type":"folder", "name":"sonicbot", "data":[{"type":"folder",
"name":"SonicMail", "data":[{"type":"file", "name":"bbcode.py",
"compressed":False, "contents":"blahblahfilecontents"}]}]}
print x
def setindict(dictionary, keys, value) :
if len(keys) == 1 :
if keys[0].isdigit() and int
On Mon, Jul 26, 2010 at 3:07 AM, Zooko O'Whielacronx wrote:
>
> I would suggest that people try to build their native extension
> modules with mingw, and if it doesn't work report a bug (to mingw
> project and to the Python project) so that we can track more precisely
> what the issues are.
To b
On 07/25/2010 11:10 PM, Edward Diener wrote:
> On 7/25/2010 3:39 PM, Christian Heimes wrote:
>> Am 25.07.2010 21:32, schrieb Thomas Jollans:
>>> If a script uses sys.executable instead of "python", there is no
>>> problem, at all.
>>
>> It's true that sys.executable is the best way if you have to s
On 7/25/2010 4:26 PM, News123 wrote:
On 07/25/2010 10:18 PM, Thomas Jollans wrote:
On 07/25/2010 10:04 PM, News123 wrote:
sOn 07/25/2010 09:39 PM, Christian Heimes wrote:
Am 25.07.2010 21:32, schrieb Thomas Jollans:
If a script uses sys.executable instead of "python", there is no
problem, at
On 7/25/2010 4:22 PM, News123 wrote:
On 07/25/2010 09:33 PM, Edward Diener wrote:
On 7/25/2010 10:31 AM, News123 wrote:
On 07/25/2010 02:46 PM, Edward Diener wrote:
On 7/25/2010 6:07 AM, Gelonida wrote:
How does a 'pystarter' program know where the file's location is which
is being invoked
On 7/25/2010 3:39 PM, Christian Heimes wrote:
Am 25.07.2010 21:32, schrieb Thomas Jollans:
If a script uses sys.executable instead of "python", there is no
problem, at all.
It's true that sys.executable is the best way if you have to start a new
Python interpreter. However sys.executable may n
On 7/25/2010 3:32 PM, Thomas Jollans wrote:
On 07/25/2010 09:19 PM, Edward Diener wrote:
On 7/25/2010 10:03 AM, Thomas Jollans wrote:
On 07/25/2010 02:46 PM, Edward Diener wrote:
The problem with this is that you forget that a script can invoke Python
internally. So whether one uses the consol
News123 wrote:
On 07/25/2010 09:33 PM, Edward Diener wrote:
On 7/25/2010 10:31 AM, News123 wrote:
On 07/25/2010 02:46 PM, Edward Diener wrote:
On 7/25/2010 6:07 AM, Gelonida wrote:
How does a 'pystarter' program know where the file's location is which
is being invoked ?
the file's locatio
On 07/25/2010 10:18 PM, Thomas Jollans wrote:
> On 07/25/2010 10:04 PM, News123 wrote:
>> sOn 07/25/2010 09:39 PM, Christian Heimes wrote:
>>> Am 25.07.2010 21:32, schrieb Thomas Jollans:
If a script uses sys.executable instead of "python", there is no
problem, at all.
>>
>>
>> sys.execut
On 07/25/2010 09:33 PM, Edward Diener wrote:
> On 7/25/2010 10:31 AM, News123 wrote:
>> On 07/25/2010 02:46 PM, Edward Diener wrote:
>>> On 7/25/2010 6:07 AM, Gelonida wrote:
>
> How does a 'pystarter' program know where the file's location is which
> is being invoked ?
the file's location would
On 07/25/2010 10:04 PM, News123 wrote:
> sOn 07/25/2010 09:39 PM, Christian Heimes wrote:
>> Am 25.07.2010 21:32, schrieb Thomas Jollans:
>>> If a script uses sys.executable instead of "python", there is no
>>> problem, at all.
>
>
> sys.executable will not work with scripts converted with py2e
sOn 07/25/2010 09:39 PM, Christian Heimes wrote:
> Am 25.07.2010 21:32, schrieb Thomas Jollans:
>> If a script uses sys.executable instead of "python", there is no
>> problem, at all.
sys.executable will not work with scripts converted with py2exe,
as sys.executable will not be the executable o
On 07/25/2010 09:39 PM, Christian Heimes wrote:
> Am 25.07.2010 21:32, schrieb Thomas Jollans:
>> If a script uses sys.executable instead of "python", there is no
>> problem, at all.
>
> It's true that sys.executable is the best way if you have to start a new
> Python interpreter. However sys.exec
Am 25.07.2010 21:32, schrieb Thomas Jollans:
> If a script uses sys.executable instead of "python", there is no
> problem, at all.
It's true that sys.executable is the best way if you have to start a new
Python interpreter. However sys.executable may not be set for NT
services. So there may be a p
On 7/25/2010 10:31 AM, News123 wrote:
On 07/25/2010 02:46 PM, Edward Diener wrote:
On 7/25/2010 6:07 AM, Gelonida wrote:
There the windows solution could be something like a small 'pystarter'
program, which would decide depending on the file's location / the
file's first line which python sho
On 07/25/2010 09:19 PM, Edward Diener wrote:
> On 7/25/2010 10:03 AM, Thomas Jollans wrote:
>> On 07/25/2010 02:46 PM, Edward Diener wrote:
>>> The problem with this is that you forget that a script can invoke Python
>>> internally. So whether one uses the console or file association method
>>> of
On 07/25/2010 09:12 PM, Edward Diener wrote:
> On 7/25/2010 1:51 PM, Joel Goldstick wrote:
>> There is this:
>> http://pypi.python.org/pypi/virtualenv
>
> It appears to be only for Linux.
I don't know where you get that impression from. I don't know how well
it works on which platforms, but the f
On 7/25/2010 10:03 AM, Thomas Jollans wrote:
On 07/25/2010 02:46 PM, Edward Diener wrote:
The problem with this is that you forget that a script can invoke Python
internally. So whether one uses the console or file association method
of invoking Python externally, any already written script can
On 7/25/2010 1:51 PM, Joel Goldstick wrote:
Edward Diener wrote:
Are there any documents about multiple versionsof Python coexisting in
the same OS ( Windows in my case ) and what pitfalls to look out for ?
I have already run into a number of them. I installed Python 2.7 and
3.1.2 into completel
pyt...@bdurham.com wrote:
>I have some very simple use cases[1] for adding some version control
>capabilities to a product I'm working on. My product uses simple, text
>(UTF-8) based scripts that are independent of one another. I would like
>to "version control" these scripts on behalf of my users
On Wed, Jul 7, 2010 at 3:32 AM, Jonathan Hartley wrote:
>
> I presume this problem would go away if future versions of Python
> itself were compiled on Windows with something like MinGW gcc.
You might want to track issue3871. Roumen Petrov has done a lot of
work to make CPython compilable with mi
Edward Diener wrote:
Are there any documents about multiple versionsof Python coexisting in
the same OS ( Windows in my case ) and what pitfalls to look out for ? I
have already run into a number of them. I installed Python 2.7 and 3.1.2
into completely folders, but immediately ran into serious
[targetsmart]
> > I am trying to compare two nested dictionaries, I want to know what is
> > the exact difference between them. I tried this solution
[Steven D'Aprano]
> If you want to know the difference between two dictionaries, you have to
> consider:
>
> (1) Keys that are in the first dict, b
On Jul 24, 3:56 am, Lacrima wrote:
> Thank you for your answer.
You're welcome.
> Some things are still not clear. Your example works great. But if I
> remove "super(SuperClass1, self).__init__(**kwds)" from SuperClass1's
> __init__, the example stops working. That is when I instantiate
> SubCla
>
> You have to create your dict somewhere else. You can either set it from
> outside:
>
> class Enum(RootFragment):
> ...
>
> Enum._jpaTypes = { ... }
>
THANKS for the quick help.
Karsten
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
On 07/25/2010 06:21 PM, Steven D'Aprano wrote:
> On Sun, 25 Jul 2010 08:03:06 -0700, targetsmart wrote:
>
>> Hi,
>> I am trying to compare two nested dictionaries, I want to know what is
>> the exact difference between them. I tried this solution
>>
>> ...
>> s1 = set(result1)
>>
On Sun, 25 Jul 2010 08:03:06 -0700, targetsmart wrote:
> Hi,
> I am trying to compare two nested dictionaries, I want to know what is
> the exact difference between them. I tried this solution
>
> ...
> s1 = set(result1)
> s2 = set(result2)
> print s1 - s2
>
> but it does
On 07/25/2010 05:41 PM, Karsten Wutzke wrote:
> What's wrong with:
>
> class Enum(RootFragment):
> __jpaTypes = {
> # complete!
> 'CascadeType': Enum("javax.persistence.CascadeType"),
> 'DiscriminatorType':
> Enum("javax.persistence.DiscriminatorType"),
> 'EnumT
What's wrong with:
class Enum(RootFragment):
__jpaTypes = {
# complete!
'CascadeType': Enum("javax.persistence.CascadeType"),
'DiscriminatorType':
Enum("javax.persistence.DiscriminatorType"),
'EnumType': Enum("javax.persistence.EnumType"),
'FetchType': E
Hi,
I am trying to compare two nested dictionaries, I want to know what is
the exact difference between them. I tried this solution
...
s1 = set(result1)
s2 = set(result2)
print s1 - s2
but it doesn't seem show any difference, but
assert result1 == result2
fails
could so
On Sun, 25 Jul 2010 13:52:33 +0100, Nobody wrote:
> On Fri, 23 Jul 2010 18:27:50 -0400, Terry Reedy wrote:
>
>> But in the
>> meanwhile, once you get an error, you know what it is. You can
>> intentionally feed code bad data and see what you get. And then maybe
>> add a test to make sure your cod
On 07/25/2010 02:46 PM, Edward Diener wrote:
> On 7/25/2010 6:07 AM, Gelonida wrote:
>> Hi Edward,
>>
>> There the windows solution could be something like a small 'pystarter'
>> program, which would decide depending on the file's location / the
>> file's first line which python should be started.
On 07/25/2010 02:46 PM, Edward Diener wrote:
> On 7/25/2010 6:07 AM, Gelonida wrote:
>> There the windows solution could be something like a small 'pystarter'
>> program, which would decide depending on the file's location / the
>> file's first line which python should be started.
>
> This does n
On 07/25/2010 02:46 PM, Edward Diener wrote:
> The problem with this is that you forget that a script can invoke Python
> internally. So whether one uses the console or file association method
> of invoking Python externally, any already written script can use either
> internally.
Maybe it's just
On Fri, 23 Jul 2010 18:27:50 -0400, Terry Reedy wrote:
> But in the
> meanwhile, once you get an error, you know what it is. You can
> intentionally feed code bad data and see what you get. And then maybe
> add a test to make sure your code traps such errors.
That doesn't really help with exce
On 25-Jul-2010, at 5:52 PM, Roy Smith wrote:
> In article <4c4bd0b1$0$1624$742ec...@news.sonic.net>,
> John Nagle wrote:
>
>>1. When writing to a TCP socket, write everything you have to write
>>with one "send" or "write" operation if at all possible.
>>Don't write a little
On 7/25/2010 2:20 AM, Steven D'Aprano wrote:
On Sat, 24 Jul 2010 22:03:48 -0700, Chris Rebert wrote:
Are the .py and .pyc extensions the only ones which are associated with
Python or are there others, for a normal Python installation in Windows
?
There's also .pyw
Also .pyo
.py = Python so
pyt...@bdurham.com writes:
> 1. Use an existing version control utility. There are lots of options
> here(!), any recommendations on a light weight, open source one that
> xcopy installs under Windows with lots of command line options?
Personally, I like RCS. It seems fulfil your requirements. Yo
On 7/25/2010 6:07 AM, Gelonida wrote:
Hi Edward,
On 07/25/2010 04:40 AM, Edward Diener wrote:
I found the solutions too exotic for actual use, and completely
ineffectual for the cases I originally cited. The people in that thread
seem to have completely forgotten that Python can be invoked ext
In article <4c4bd0b1$0$1624$742ec...@news.sonic.net>,
John Nagle wrote:
> 1. When writing to a TCP socket, write everything you have to write
> with one "send" or "write" operation if at all possible.
> Don't write a little at a time. That results in sending small
>
Hi Edward,
On 07/25/2010 04:40 AM, Edward Diener wrote:
> I found the solutions too exotic for actual use, and completely
> ineffectual for the cases I originally cited. The people in that thread
> seem to have completely forgotten that Python can be invoked externally
> and internally both throu
In message
<2cb0c88b-58ea-4704-8578-2ebd766f1...@t10g2000yqg.googlegroups.com>, Peo
wrote:
> My current plan is to call the library something like 'foo1' and
> import it into scripts like 'import foo1 as foo'. Releases that change the
> API would be installed as 'foo2', 'foo3' and so on. This wo
Terry Reedy wrote:
>As other have said, mostly, but I would change the following...
Thanks for all those who replied. I know these are not all the features but
some of them and again this is not a comparison but a little taste of what
python offers today, and the replies were very informative. B
Hi Jia,
On Sun, Jul 25, 2010 at 12:01 PM, Jia Hu wrote:
> Hello:
>
> I tried to install numpy 1.4.1 from source under ubuntu following
> instruction at http://docs.scipy.org/doc/numpy/user/install.html
> I type "" python setup.py build –help-fcompiler "" and it says gnu95 is
> found. Then I run
59 matches
Mail list logo