Steven D'Aprano wrote:
> On Thu, 22 Nov 2012 16:51:27 +0100, Peter Otten wrote:
>
>> Marc Aymerich wrote:
>>
>>> Hi,
>>>
>>> I want to create a method within a class that is able to accept either
>>> a class or an instance.
> [...]
>> Why would you overload a method that way?
>
>
> The use-ca
kgard wrote:
> Greetings:
>
> I am the lone developer of db apps at a company of 350+ employees.
> Everything is done in MS Access 2010 and VBA. I'm frustrated with the
> limitations of this platform and have been considering switching to
> Python. I've been experimenting with the language for a
On 22/11/12 19:44:02, Mike wrote:
> Hello,
> I am noob en python programing, i wrote a perl script for read from csv but
> now i wish print value but the value must be within double quote and I can
> not do this.
>
> For example now the output is:
>
> ma user@domain displayName Name SecondNam
I am trying to set the parameter 'a' below so that it can be used when I call
eval:
>>> def gp_function():
... return 1+a
...
>>> print eval("gp_function()", {'a':123, 'gp_function':gp_function})
Traceback (most recent call last):
File "", line 1, in
File "", line 1, in
File "", lin
On Fri, Nov 23, 2012 at 11:14 PM, wrote:
> Why isn't 'a' defined?
> Shouldn't you be able to define the global variables with a dict passed to
> eval?
> Is there an other way to do this, beside the two obvious: defining 'a' before
> calling gp_function and using a as an argument in gp_function?
On Fri, 23 Nov 2012 09:52:25 +0100, Peter Otten wrote:
> Steven D'Aprano wrote:
>> http://code.activestate.com/recipes/577030/
>
> Am I reading that right that you don't invoke method() as
> MyClass.method()?
No. I give an example and explicitly state:
You can use this class without instan
Hi,
AFAIK, this should work:
import tkinter as Tk
root= Tk.Tk()
root.tk_setPalette(background = 'AntiqueWhite1', foreground = 'blue')
but python-3.3:0e4574595674+ gives
Traceback (most recent call last):
File "Matr_Select.py", line 174, in
root.tk_setPalette(background = 'AntiqueWhite1',
Dear all,
the emails are getting kind of long so to ask you briefly: What do you think of
splitting `type` into two functions `press` and `enter`? Their use cases are:
press(CTRL + 'a')
press(ENTER)
press(ALT + 'f', 's')
enter("Hello World!")
enter("te
Helmut Jarausch wrote:
> Hi,
>
> AFAIK, this should work:
>
> import tkinter as Tk
> root= Tk.Tk()
> root.tk_setPalette(background = 'AntiqueWhite1', foreground = 'blue')
>
> but python-3.3:0e4574595674+ gives
>
> Traceback (most recent call last):
> File "Matr_Select.py", line 174, in
>
who is that...?!!
http://www.youtube.com/watch?v=SIADfS030qg&feature=BFa&list=PLB95C1C59E12FBA96
thank you
--
http://mail.python.org/mailman/listinfo/python-list
Hi again,
Steven's points and the "feeling" for `type` are very good and maybe the
problems I mentioned can be ramified. I therefore opened a new thread to find
out what the general public thinks about overwriting built-in functions such as
`type` here:
https://groups.google.com/forum/?fromgro
I am pleased to announce the first official
release of occmodel (v0.1.0) and the releated
libraries geotools/gltools.
Description
--
occmodel is a small library which gives a high level access
to the OpenCASCADE modelling kernel.
For most users a direct use of the OpenCASCADE modelling
k
Steven D'Aprano wrote:
>
> On Wed, 21 Nov 2012 14:41:24 +1100, Chris Angelico wrote:
>
> > However, this still means that the player will see the exact same level
> > regenerated every time, absolutely fresh. As previously stated in this
> > thread, that's not usually a good thing for encounters,
On Fri, Nov 23, 2012 at 2:42 PM, Michael Herrmann
wrote:
> Dear all,
>
> the emails are getting kind of long so to ask you briefly: What do you think
> of splitting `type` into two functions `press` and `enter`? Their use cases
> are:
> press(CTRL + 'a')
> press(ENTER)
>
In article ,
Michael Herrmann wrote:
> do you think it's bad style to override the built-in function `type`? I'm
> co-developing a GUI automation library called Automa
> (http://www.getautoma.com) and 'type' would be a very fitting name for a
> function that generates artificial key strokes.
Hi,
The empty() returns True even after put() has been called. Why it is
empty when there some items in it? Could anybody help me understand
it? Thanks!
~/linux/test/python/man/library/multiprocessing/Queue/empty$ cat
main.py
#!/usr/bin/env python
import multiprocessing
queue = multiprocessing.
Hi,
I see your concern with having two functions that have to be separately
remembered... I personally would also be fine with type(), however some people
are violently against it. I opened a new thread
(https://groups.google.com/forum/?fromgroups=#!topic/comp.lang.python/GjZ2hAS1Wyk)
to ask j
On 11/23/2012 11:22 AM, Joel Goldstick wrote:
On Fri, Nov 23, 2012 at 11:12 AM, Michael Herrmann
mailto:michael.herrm...@getautoma.com>>
wrote:
Hi,
do you think it's bad style to override the built-in function
`type`? I'm co-developing a GUI automation library called Automa
(
My command either takes two positional arguments (in which case, both
are required):
$ command foo bar
or the name of a config file (in which case, the positional arguments
are forbidden):
$ command --config file
How can I represent this with argparse; add_mutually_exclusive_group()
isn't qu
On 2012-11-23 16:57, Peng Yu wrote:
Hi,
The empty() returns True even after put() has been called. Why it is
empty when there some items in it? Could anybody help me understand
it? Thanks!
~/linux/test/python/man/library/multiprocessing/Queue/empty$ cat
main.py
#!/usr/bin/env python
import mul
On Fri, Nov 23, 2012 at 9:57 AM, Peng Yu wrote:
> Hi,
>
> The empty() returns True even after put() has been called. Why it is
> empty when there some items in it? Could anybody help me understand
> it? Thanks!
>
> ~/linux/test/python/man/library/multiprocessing/Queue/empty$ cat
> main.py
> #!/usr
On 11/23/2012 1:46 PM, Roy Smith wrote:
My command either takes two positional arguments (in which case, both
are required):
$ command foo bar
or the name of a config file (in which case, the positional arguments
are forbidden):
$ command --config file
How can I represent this with argparse;
On 23Nov2012 11:53, Ian Kelly wrote:
| On Fri, Nov 23, 2012 at 9:57 AM, Peng Yu wrote:
| > The empty() returns True even after put() has been called. Why it is
| > empty when there some items in it? Could anybody help me understand
| > it? Thanks!
| >
| > ~/linux/test/python/man/library/multiproc
On 23Nov2012 10:41, Michael Herrmann wrote:
[...]
| I know it's a common beginner's mistake to incautiously override
| built-in functions. However, we put in a lot of research and have come to
| the conclusion that, if Python had not already defined it, `type` would
| be the best name. We are now
On Sat, Nov 24, 2012 at 3:27 AM, Prasad, Ramit
wrote:
> Steven D'Aprano wrote:
>>
>> On Wed, 21 Nov 2012 14:41:24 +1100, Chris Angelico wrote:
>>
>> > However, this still means that the player will see the exact same level
>> > regenerated every time, absolutely fresh. As previously stated in this
On Fri, 23 Nov 2012 05:42:22 -0800, Michael Herrmann wrote:
> Dear all,
>
> the emails are getting kind of long so to ask you briefly: What do you
> think of splitting `type` into two functions `press` and `enter`?
This invites confusion as to the rules of when you can call `press` and
when you
Dave Angel wrote:
>
> On 11/20/2012 06:41 PM, Tom Borkin wrote:
>
> (Please don't top-post. Now we lose all the context)
> > Using shlex, I now have this:
> > #!\Python27\python
> > import os, subprocess
> > path = os.path.join("C:\\", "Program Files", "Apache Group", "Apache2",
> > "htdocs", "c
On 23 November 2012 18:46, Roy Smith wrote:
> My command either takes two positional arguments (in which case, both
> are required):
>
> $ command foo bar
>
> or the name of a config file (in which case, the positional arguments
> are forbidden):
>
> $ command --config file
>
> How can I represen
On Fri, Nov 23, 2012 at 11:46 AM, Roy Smith wrote:
> My command either takes two positional arguments (in which case, both
> are required):
>
> $ command foo bar
>
> or the name of a config file (in which case, the positional arguments
> are forbidden):
>
> $ command --config file
>
> How can I re
29 matches
Mail list logo