Hi,
I was reading through the Tkinter tutorial at
http://www.pythonware.com/library/tkinter/introduction/index.htm ...and
it mentions that by doing,
from Tkinter import *
you have access to the constants in Tkconstants, since Tkinter imports
it automatically.
However, in the shell if I do..
f
You can always unpack a tuple that way, like in:
.>>> import sys
.>>> for (index, (key, value)) in enumerate(sys.modules.iteritems()):
pass
--
http://mail.python.org/mailman/listinfo/python-list
Peter Moscatt wrote:
Is it possible to write code and allow a function to be called within
another like I have shown below ?
Pete
def populatelist():
f=open(_globals.appath + "dxcluster.svr","r")
while true:
text = f.readline()
if text =="":
I was messing about with formatting and realized that the right kind of
object could quite easily tell me exactly what accesses are made to the
mapping in a string % mapping operation. This is a fairly well-known
technique, modified to tell me what keys would need to be present in any
mapping u
AdSR wrote:
Fellow Pythonistas,
Please check out
http://spyced.blogspot.com/2005/04/how-well-do-you-know-python-part-3.html
if you haven't done so yet. It appears that you can specify a function
explicitly to take n-tuples as arguments. It actually works, checked
this myself. If you read the refere
scott wrote:
> MacOS.Error: (-1713, 'no user interaction is allowed')
Try pythonw.
Martin
--
http://mail.python.org/mailman/listinfo/python-list
"AdSR" <[EMAIL PROTECTED]> wrote:
Small wonder since it looks like one of those language features
that make committing atrocities an order of magnitude easier.
eh?
def f((a, b)):
...
is short for
def f(tmp):
a, b = tmp
...
if you think this is an "atrocity", maybe program
Hello,
I'm not yet a python programmer but a python user. I faced a problem
with tiny fonts in a wxPython app on a GNU/Debian system. Under Gentoo
Linux the fonts are displayed in a normal readable size. Only on that
Debian system fonts in the whole app are rather tiny. I spend quite a
long time g
codecraig wrote:
from Tkinter import *
you have access to the constants in Tkconstants, since Tkinter imports
it automatically.
Yes
However, in the shell if I do..
from Tkinter import *
print Tkinter.HORIZONTAL
I get an error..NameError: Tkinter is not defined
Sure, you ask for Tkinter.HORIZONTAL.
Hi Jeremy,
I'm the matplotlib author -- I'm writing under a different email
address since my email server seems to be dying...
I'll start by saying that I for one won't criticize you for rolling you
own plotting package rather than join forces with an existing project.
I've been accused of the sa
i have rewrote the Python's re module documentation.
See it here for table of content page:
http://xahlee.org/perl-python/python_re-write/lib/module-re.html
The doc is broken into 4 sections:
* regex functions (node111.html)
* regex OOP (re-objects.html)
* matched objects (match-objects.html)
* re
Michael Spencer wrote:
See also the source of inspect.getargs for just how much this complicates the
argument-passing logic!
it doesn't complicate the argument-passing in any way at all -- it
complicates
the reverse engineering code a bit, though, since it has to convert the bytecode
for
def f
Hi,
When I do something like.
s = Scale(master)
s.bind("", callback)
def callback(self, event):
print event.type
I see "7" printed out. Where are these constants defined for various
event types? Basically i want to do something like...
def callback(self, event):
if event.type == ENT
Dan <[EMAIL PROTECTED]> wrote in
news:[EMAIL PROTECTED]:
> My question is, how mature/stable is mod_python? Is it suitable for a
> production environment? The documentation is a bit lacking, and I've
I use mod_python for all my web stuff, including several live production
sites - no problems
Reinhold Birkenfeld wrote:
> >y = (f(11, 22, x=1, y='y for f') *
> > g(*args_from_somewhere,
> > x='x for g', y='y for g',
> > foo=lambda: return 'foo for g'))
> >
> >would be my current way to express this. But still, the less lines,
> >the less confusing it is.
And Ron Adam repli
nevermind, i should access it by
HORIZONTAL
not
Tkinter.HORIZONTAL
since I imported everything from Tkinter already. Thanks anyway
--
http://mail.python.org/mailman/listinfo/python-list
> if you think this is an "atrocity", maybe programming isn't for you.
My resume might suggest otherwise but I guess that's not the main topic
here. Maybe I got carried away -- this one took me completely by
surprise.
Anyway, this gets interesting:
def z(((a, b), (c, d)), (e, f)):
pass
alth
codecraig wrote:
Hi,
When I do something like.
s = Scale(master)
s.bind("", callback)
def callback(self, event):
print event.type
I see "7" printed out. Where are these constants defined for various
event types? Basically i want to do something like...
7 must be for KeyPressed.
That's the t
On Mon, 18 Apr 2005 09:02:44 -0600,
Ivan Van Laningham <[EMAIL PROTECTED]> wrote:
> ... Shows how much you need another set of eyeballs to debug your
> brain;-)
+1 QOTW
> ... And my wife never sees anything the way I do;-)
There's probably a rude joke in there somewhere about your wife's eyes
d
Thanks for your reply, I have used some of your ideas in my Code.
--
http://mail.python.org/mailman/listinfo/python-list
Thanks for your reply, I have used some of your ideas in my Code.
--
http://mail.python.org/mailman/listinfo/python-list
Thanks Guys,
I didn't think it was calling the function so I will put some test code and
print something to the screen just to ensure it's entering the function.
Thanks for all ya help.
Pete
Peter Moscatt wrote:
>
> Is it possible to write code and allow a function to be called within
> an
I am looking for a way in Python to update Windows File Summary
Metadata. By that I mean the data (Title, Subject, Keywords, Comments)
found when you right click a windows file, select properties and then
summary. Can anyone point me in the right direction?
--
http://mail.python.org/mailman/listi
Hi,
I'm trying to wrap a C++ class hierarchy with Python types and I'd like to
maintain the hierarchy in the types. I'm fairly sure this is possible,
isn't it?
Are there any documents explaining how to do this, the standard Python
manual doesn't go into enough detail about creating types for this
Sven,
It may be the default gtk font settings. This can be changed in the
.gtkrc file.
-jjr
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, 18 Apr 2005 16:16:00 +0100, Will McGugan
<[EMAIL PROTECTED]> wrote:
>Hi,
>
>I'm curious about the behaviour of the str.split() when applied to empty
>strings.
>
>"".split() returns an empty list, however..
>
>"".split("*") returns a list containing one empty string.
>
>I would have expect
> PyType_Ready but in Python the base class isn't recognised. Is there
> anything obvious I'm missing?
Maybe - I'd go for one of the several available python wrapper generators. I
personally had good experiences with SIP. But you might also try boost
python or SWIG.
The python C-API is great - f
On Mon, 18 Apr 2005 14:06:08 -0700, "Robert Brewer"
<[EMAIL PROTECTED]> wrote:
>Reinhold Birkenfeld wrote:
>> >y = (f(11, 22, x=1, y='y for f') *
>> > g(*args_from_somewhere,
>> > x='x for g', y='y for g',
>> > foo=lambda: return 'foo for g'))
>> >
>> >would be my current way to ex
AdSR wrote:
> Fellow Pythonistas,
>
> Please check out
>
> http://spyced.blogspot.com/2005/04/how-well-do-you-know-python-part-3.html
>
> if you haven't done so yet. It appears that you can specify a function
> explicitly to take n-tuples as arguments. It actually works, checked
> this myself.
QOTW: "Darn. I finally say something that gets into Quote of the Week,
and it's attributed to someone else!" -- Greg Ewing (we think)
http://groups-beta.google.com/group/comp.lang.python/msg/15b836a557afccb2
"If there were something wrong with the API, Guido would have long since
fired up the
> Yes, but usually not so much in function arguments but more in
> list-comprehensions or other places where unpacking was useful. I
love the
> feature - I just don't have nested enough data to use it more :)
I use tuple unpacking in its typical uses, it's one of the first
language features I lear
[Diez B. Roggisch]
> AdSR wrote:
> > It appears that you can specify a function explicitly to take
> > n-tuples as arguments. [...] Has anyone actually used it in real
> > code?
I do not use it often in practice, but sometimes, yes. If the feature
was not there, it would be easy to do an explici
Folks
I'm getting a very strange error when I'm using the SocketServer. Has
anybody got any ideas?
Nigel
File
"/scratch1/nigel/c6/phenix-1.08a/build/intel-linux/python/lib/python2.4/SocketServer.py",
line 468, in process_request_thread
File
"/scratch1/nigel/c6/phenix-1.08a/build/intel-linux
On 18 Apr 2005 13:05:57 -0700, "AdSR" <[EMAIL PROTECTED]> wrote:
>Fellow Pythonistas,
>
>Please check out
>
>http://spyced.blogspot.com/2005/04/how-well-do-you-know-python-part-3.html
>
>if you haven't done so yet. It appears that you can specify a function
>explicitly to take n-tuples as argument
Nick Craig-Wood wrote:
> [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > Nick Craig-Wood wrote:
> > > [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > > > I'm using GMPY (see code).
> > > [snip]
> > >
> > > If you are using gmpy you might as well do it like this.
> > >
> > > gmpy.pi() uses
Steve Holden wrote:
I've been wondering whether it's possible to perform a similar analysis
on non-mapping-type format strings, so as to know how long a tuple to
provide, or whether I'd be forced to lexical analysis of the form string.
regards
Steve
I do not know if it is possible to do that.
B
AdSR wrote:
>> Yes, but usually not so much in function arguments but more in
>> list-comprehensions or other places where unpacking was useful. I
> love the
>> feature - I just don't have nested enough data to use it more :)
>
> I use tuple unpacking in its typical uses, it's one of the first
>
On 4/18/05, Andrew Wilkinson <[EMAIL PROTECTED]> wrote:
> I'm trying to wrap a C++ class hierarchy with Python types and I'd like to
> maintain the hierarchy in the types. I'm fairly sure this is possible,
> isn't it?
Yes.
> Are there any documents explaining how to do this, the standard Python
>
[Denrael wrote]
> I am looking for a way in Python to update Windows File Summary
> Metadata. By that I mean the data (Title, Subject, Keywords, Comments)
> found when you right click a windows file, select properties and then
> summary. Can anyone point me in the right direction?
I'm not sure if
On Mon, Apr 18, 2005 at 01:40:43PM -0700, Xah Lee wrote:
> i have rewrote the Python's re module documentation.
> See it here for table of content page:
> http://xahlee.org/perl-python/python_re-write/lib/module-re.html
For those who have long ago consigned Mr. Lee to a killfile, it looks
like he'
[Will McGugan]
> >I'm curious about the behaviour of the str.split() when applied to empty
> >strings.
> >
> >"".split() returns an empty list, however..
> >
> >"".split("*") returns a list containing one empty string.
[John Machin]
> You are missing a perusal of the documentation. Had you done so
It looks like the automatic build of the 'fpectl' module was broken
somewhere along the line, perhaps when the transition from Modules/Setup
to setup.py took place.
Once I made the change below and rebuilt, I got the fpectl module.
Furthermore, it appeared to "do something" on my Linux/x86 system:
[Klaus Alexander Seistrup]
> >>> d1 = {1:'a', 2:'b', 3:'c', 4:'d', 5:'e'}
> >>> s1 = set(d1)
> >>> s1
> set([1, 2, 3, 4, 5])
> >>> s2 = set([1, 3, 5])
> >>> s1-s2
> set([2, 4])
> >>> for k in s1-s2:
> ... del d1[k]
> ...
FWIW, if s2 is not already a set object, it need not be transformed befor
The "type" field is related to the definition of different events in
X11. In Xlib, the event structure is a "C" union with the first
(common) field giving the type of the event so that the event-dependant
fields can be accessed through the proper union member.
Generally, you won't use this field
Pywin32 has functions to read and write these properties.
Take a look at testStorage.py in the \win32\test directory for
an example of how to use them.
Roger
"Denrael" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>I am looking for a way in Python to update Windows File
I'm trying to install FontTools ("a library for manipulating fonts,
written in Python") on a Win XP box, and I'm given a bit of pause that
this process seems to require downloading some MS .NET framework
packages -- at least, this is what the "setup.py" script has told when
I've tried to run it:
"
Maarten Sneep <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>...
> On Mac OS X the shared library functionality is obtained through
> frameworks. It may detect this by default, but I'm not sure about
Not good. I don't want frameworks. I must embedd python into my
application.
Sett
Lothar Scholz wrote:
Maarten Sneep <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>...
On Mac OS X the shared library functionality is obtained through
frameworks. It may detect this by default, but I'm not sure about
Not good. I don't want frameworks. I must embedd python into my
Martin v. Löwis wrote:
Try pythonw.
Thanks, that was it.
One more question, when I use the EasyDialogs module to, for example,
display a message in a dialog box, the dialog box doesn't appear directly.
I need to switch to 'python' by clicking on it on the dock or
alt-tabbing to 'python' in order
> Diez B Roggisch <[EMAIL PROTECTED]> writes:
>> PyType_Ready but in Python the base class isn't recognised. Is
>> there anything obvious I'm missing?
> Maybe - I'd go for one of the several available python wrapper
> generators. I personally had good experiences with SIP. But
In article <[EMAIL PROTECTED]>,
Chris Smith <[EMAIL PROTECTED]> wrote:
> > Diez B Roggisch <[EMAIL PROTECTED]> writes:
>
> >> PyType_Ready but in Python the base class isn't recognised. Is
> >> there anything obvious I'm missing?
>
> > Maybe - I'd go for one of the several avail
Roy> I've been playing around with ctypes
Roy> (http://starship.python.net/crew/theller/ctypes/) recently. So
Roy> far, it looks pretty cool.
Wrapping C++ libraries?
Skip
--
http://mail.python.org/mailman/listinfo/python-list
posted on: comp.lang.python
emailed to: [EMAIL PROTECTED]
I have a suggestion/request that will, I think, improve the Python
documentation.
Currently, the Python documentation in HTML format is stored at URLs
that change with each new release of Python. That is, for example, the
documentation fo
steve> I propose that an additional a URL be set up for the Python HTML
steve> documentation. This URL will always contain the current version
steve> of the documentation. Suppose we call it "current". Then (while
steve> 2.4 is still the current version) the documentation for th
[Steve]
> I have a suggestion/request that will, I think, improve the Python
> documentation.
>
> Currently, the Python documentation in HTML format is stored at URLs
> that change with each new release of Python. That is, for example, the
> documentation for the os module is at
> http://python.or
Skip Montanaro wrote:
steve> I propose that an additional a URL be set up for the Python HTML
steve> documentation. This URL will always contain the current version
steve> of the documentation. Suppose we call it "current". Then (while
steve> 2.4 is still the current version) the
On 17 Apr 2005 21:48:47 -0700, "Kay Schluehr" <[EMAIL PROTECTED]> wrote:
>> >
>> I like this. But how would you put "where args:" and "where kw:" if
>you needed both?
>> also, is it looking back to see the '*' or '**' to do (::x=1).values
>vs. (::x=1)
>> and how about (::x=1).keys() or (::x=1).ite
We have where syntax in combination with suite expression syntax (bear with me,
I think a good synergy will emerge ;-)
http://groups.google.co.uk/groups?selm=mailman.403.1105274631.22381.python-list%40python.org
http://groups.google.co.uk/groups?selm=3480qqF46jprlU1%40individual.net
are the key
Kent Johnson said unto the world upon 2005-04-18 08:20:
The puzzle for me was that if I enter my module name in the "Search
for" box, it shows up in the list of results, as expected. But whether
the results list entry for my module incorporates the description form
my module's docstring or inst
Skip> But appears to be firefox-specific.
Michael> Works for me with both Firefox and IE6 under WinXP
The wikalong.org thing is firefox-specific. You trimmed too much from my
reply.
Skip
--
http://mail.python.org/mailman/listinfo/python-list
Ron_Adam wrote:
The load and dump would be private to the data class object. Here's a
more complete example.
import pickle
class PickledData(object):
def __init__(self, filename):
self.filename = filename
self.L = None
try:
I apologize for the long email. I hope somebody will have time to read
it and give some suggestions.
I am working on a school project written in Python (using mod_python)
and I need to upload a file to a java servlet. Here are the high-level
instructions given by the servlet authors (the instructi
On Mon, 18 Apr 2005 12:50:24 +0200, Reinhold Birkenfeld <[EMAIL PROTECTED]>
wrote:
>Bengt Richter wrote:
>> On Sun, 17 Apr 2005 15:25:04 +0200, Reinhold Birkenfeld <[EMAIL PROTECTED]>
>> wrote:
>
Note that there is no problem adding other parameters, because ::
is just
a unary ex
On Mon, 18 Apr 2005 14:06:08 -0700, "Robert Brewer" <[EMAIL PROTECTED]> wrote:
>Reinhold Birkenfeld wrote:
>> >y =3D (f(11, 22, x=3D1, y=3D'y for f') *
>> > g(*args_from_somewhere,
>> > x=3D'x for g', y=3D'y for g',
>> > foo=3Dlambda: return 'foo for g'))
>> >
>> >would be my curre
I agree Zope2/Plone are really mature. But I think you missed my point.
It is not neccessary that I may be using all the functionality of Plone
etc. More over zope3 seems to have got a few great features like better
support for building filesystem based products, easier learning curve
etc.
Please
scott wrote:
> Can I get this Pyshell behavior using python from the terminal?
One application is "active" at any point in time, and this application
controls the menu, has its windows displayed, and so on. So when the
Terminal.app is active, Python cannot be.
Now, it may be possible to programma
Jeff Reavis wrote:
> Sven,
> It may be the default gtk font settings. This can be changed in the
> .gtkrc file.
>
> -jjr
>
I'm not sure but the gnome font in general looks okay? Could be
something about proportional fonts? Or maybe a Unicode issue? I read
something about that.
Sven
--
http://ma
> Thanks for pointing this out. However I see no atrocity potential
here
> -- what did you have in mind?
Bad choice of words. I meant obfuscated, something like
def z(((a, b), (c, d)), e, f):
pass
but much worse. But it looks like there is nothing unusual about it
after all. Oh, well...
AdS
Dear All,
I am using python 2.3.3 version. If I try to
import MySQLdb. Here I found " the following
error"
importError: No module named MySQLdb.
So what I need to do for this ?. How I need to
install this MySQLdbo.
praba
___
Bengt Richter wrote:
I never liked any of the solutions that demand bracketing the string with
expression brackets,
but I just had an idea ;-)
Or for an even more twisted idea:
from textwrap import dedent
class _Dedent(type):
def __new__(cls, name, bases, dict):
if name == "*": # fo
On Mon, 18 Apr 2005 16:24:39 -0400, Steve Holden <[EMAIL PROTECTED]> wrote:
>I was messing about with formatting and realized that the right kind of
>object could quite easily tell me exactly what accesses are made to the
>mapping in a string % mapping operation. This is a fairly well-known
>te
On Mon, 18 Apr 2005 21:11:52 -0700, Brian Sabbey
<[EMAIL PROTECTED]> wrote:
>Ron_Adam wrote:
>> The load and dump would be private to the data class object. Here's a
>> more complete example.
>>
>> import pickle
>> class PickledData(object):
>> def __init__(self, filename):
>> se
> "Nick" == Nick Craig-Wood <[EMAIL PROTECTED]> writes:
Nick> Not entirely on topic, but does anyone know if there is a
Nick> series 80 python? Or if the series 60 python runs on a
Nick> series 80 phone (eg communicator 9300/9500)?
Nope & nope. It would be easy-ish to get Python
"Steve" <[EMAIL PROTECTED]> wrote:
> I propose that an additional a URL be set up for the Python HTML
> documentation. This URL will always contain the current version of the
> documentation. Suppose we call it "current". Then (while 2.4 is still
> the current version) the documentation for th
101 - 174 of 174 matches
Mail list logo