On 12/23/06, Kevin Walzer <[EMAIL PROTECTED]> wrote:
I'm trying to set the active item in a Tkinter listbox to my
application's currently-defined default font.
Here's how I get the fonts loaded into the listbox:
self.fonts=list(tkFont.families())
self.fonts.sort()
for item in self.font
At Saturday 23/12/2006 04:21, [EMAIL PROTECTED] wrote:
I noticed the following lines from the connect() method of the
HTTPConnection class within httplib:
for res in socket.getaddrinfo(self.host, self.port, 0,
socket.SOCK_STREAM):
af, so
Doug Holton wrote:
> Don't mind Fredrik's trolling. Your examples are perfectly clear
if you understand how they would work, can you explain the semantics?
> however, a similar call for extending the use of decorators to other
> structures besides functions was rejected:
> http://lambda-the-
Matias Jansson wrote:
> I come from a background of Java and C# where it is common practise to have
> one class per file in the file/project structure. As I have understood it,
> it is more common practice to have many classes in a Python module/file.
> What is the motivation behind it, would it b
Hi,
Is Gdmodule used much at all in the Python community or are there
alternative packages more suitable for the purpose? I seem to find
documentation for Gdmodule (
http://newcenturycomputers.net/projects/gd-ref.html) to require prior
experience with the GD library in another language. Or at lea
The Python docs recommend the use of triple-quoted string literals for
docstrings, e.g.
def Meet(Alice, Bob) :
"""arranges a meeting between Alice and Bob.
Returns a reference to the meeting booking object."""
...
#end Meet
However, these tend to get messed up by i
Hello all -
I have a file which has IP address and subnet number and I use regex to extract
the IP separately from subnet.
pattern used for IP: \d{1,3}(\.\d{1,3}){3}
pattern used for subnet:((\d{1,3})|(\d{1,3}(\.\d{1,3}){1,3}))/(\d{1,2})
so I have list of ip/subnets strewn around like this
1
Xah Lee wrote:
> Of Interest:
to which of comp.lang.perl.misc, comp.lang.python, comp.lang.lisp,
comp.lang.java.programmer, comp.lang.functional ?
--
http://mail.python.org/mailman/listinfo/python-list
Lawrence D'Oliveiro <[EMAIL PROTECTED]> wrote:
> The Python docs recommend the use of triple-quoted string literals for
> docstrings, e.g.
>
> def Meet(Alice, Bob) :
> """arranges a meeting between Alice and Bob.
> Returns a reference to the meeting booking object."""
>
BJörn Lindqvist wrote:
> With regexps you can search for strings matching it. For example,
> given the regexp: "foobar\d\d\d". "foobar123" would match. I want to
> do the reverse, from a regexp generate all strings that could match
> it.
>
> The regexp: "[A-Z]{3}\d{3}" should generate the strings
Hi,
this is to inform you about the availability of eric3 version 3.9.3. This
release fixes a few bugs and enhances compatibility with subversion 1.4.
It is available via
http://sourceforge.net/project/showfiles.php?group_id=119070.
What is eric3?
--
eric3 is an IDE for Python and Ru
what is a usefull IDE for Python on Windows ?
I saw Eric mentioned.. is that WinXP or Linux ?
What does "everybody" use ?
I was considering using old and very stable C-code in a new web
application via Python/Plone/Zope.
--
http://mail.python.org/mailman/listinfo/python-list
Prabhu Gurumurthy schrieb:
> to fix this problem, i used negative lookahead with ip pattern:
> so the ip pattern now changes to:
> \d{1,3}(\.\d{1,3}){3}(?!/\d+)
>
> now the problem is 10.150.100.0 works fine, 10.100.4.64 subnet gets
> matched with ip pattern with the following result:
>
> 10.10
Osiris wrote:
> what is a usefull IDE for Python on Windows ?
>
> I saw Eric mentioned.. is that WinXP or Linux ?
>
> What does "everybody" use ?
http://effbot.org/pyfaq/tutor-whats-the-best-editor-ide-for-python
--
http://mail.python.org/mailman/listinfo/python-list
Duncan Booth:
> Not spuriously included: included by design, but sometimes annoying.
Then it's a design decision I don't understand...
Bye,
bearophile
--
http://mail.python.org/mailman/listinfo/python-list
George Sakkis a écrit :
> John Machin wrote:
>
>
>>Peter Wang wrote:
>>
>>>Bruno Desthuilliers wrote:
>>>
Python is dynamic, and fighting against the language is IMHO a really
bad idea. The only places where theres a real need for this kind of
stuff are when dealing with the "ou
MacDonald a écrit :
> Pyenos wrote:
>
>>[code]
>>class WORK:
>>def getwork(self):
>>def choosetable(self):pass
>>choosetable() #TypeError: choosetable() takes exactly 1
>> #argument (0 given)
>>[/code]
>>
>>Calling choosetable() at the above location gives
btw:
my system is an AMD 1.8 GHz, 512 Mbyte with WinXPSP2.
I saw that a system like Wing would be sluggish ...
--
http://mail.python.org/mailman/listinfo/python-list
Pyenos a écrit :
> [code]
You already got the answer - just a pair of stylistic advices:
> class WORK:
1/ By convention, ALL_UPPER names denote (pseudo) symbolic constants.
The convention for class names is CamelCase.
2/ better to use new-style classes.
=>
class Work(object):
...
--
http:
ok, thnx. Thread closed :-)
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> Duncan Booth:
>> Not spuriously included: included by design, but sometimes annoying.
>
> Then it's a design decision I don't understand...
>
I think the decision is that the doc string should reflect exactly what you
entered in the string. i.e. the system shouldn't t
On 22 Dec 2006 19:59:53 -0800, Paul McGuire wrote:
>
> Download pyparsing 1.4.5 at http://pyparsing.sourceforge.net. The
> pyparsing Wiki is at http://pyparsing.wikispaces.com
>
When I click on the sourceforge link above, I get redirected to the wiki.
However, http://sourceforge.net/projects/
Hi,
I need an elliptic curve library that can be used by python. I googled
but couldn't find a one. I'll appreciate, if you could show me.
Mike
--
http://mail.python.org/mailman/listinfo/python-list
Peter Wang wrote:
> Michele Simionato wrote:
> > The subject says it all, I would like a script to act differently when
> > called as
> > $ python script.py and when called as $ python -i script.py. I looked
> > at the sys module
> > but I don't see a way to retrieve the command line flags, where
Mike Tammerman wrote:
> Hi,
>
> I need an elliptic curve library that can be used by python. I googled
> but couldn't find a one. I'll appreciate, if you could show me.
>
> Mike
What is the library you need supposed to do?
Vasudev Ram
Dancing Bison Enterprises
www.dancingbison.com
--
http://ma
vasudevram wrote:
> Peter Wang wrote:
> > Michele Simionato wrote:
> > > The subject says it all, I would like a script to act differently when
> > > called as
> > > $ python script.py and when called as $ python -i script.py. I looked
> > > at the sys module
> > > but I don't see a way to retrie
On Dec 23, 9:07 am, Richard Townsend <[EMAIL PROTECTED]> wrote:
> On 22 Dec 2006 19:59:53 -0800, Paul McGuire wrote:
>
>
>
> > Download pyparsing 1.4.5 athttp://pyparsing.sourceforge.net. The
> > pyparsing Wiki is athttp://pyparsing.wikispaces.comWhen I click on the
> > sourceforge link above, I
I will try to implement an ID-Based Cryptography. I also need bilinear
pairing operations.
Mike
vasudevram wrote:
> Mike Tammerman wrote:
> > Hi,
> >
> > I need an elliptic curve library that can be used by python. I googled
> > but couldn't find a one. I'll appreciate, if you could show me.
> >
I've implemented a real basic IRC client class in 100 lines using
asynchat (yes I know about Twisted). The problem I'm having is
arbitrarily starting and stopping multiple instances of this class
after I call loop().
The asyncore docs seem to imply everything's fixed in stone once loop()
is called
Pyenos wrote:
> "code"
> var=1
> class CLASS:
> def METHOD1:
> def METHOD2:
> var+=var
> return var
> METHOD2() #line8
> return var
> METHOD1()
Chris wrote:
> I've implemented a real basic IRC client class in 100 lines using
> asynchat (yes I know about Twisted). The problem I'm having is
> arbitrarily starting and stopping multiple instances of this class
> after I call loop().
>
> The asyncore docs seem to imply everything's fixed in s
Bjoern Schliessmann wrote:
> Rajarshi wrote:
>
> > Does anybody know how I can remove the header portion of the
> > compressed bytes, such that I only have the compressed data
> > remaining? (Obviously I do not intend to perform the
> > decompression!)
>
> Just curious: What's your goal? :) A home
[EMAIL PROTECTED] wrote:
> Actually I was implementing the use of the normalized compression
> distance to evaluate molecular similarity as described in an
> article in J.Chem.Inf.Model (http://dx.doi.org/10.1021/ci600384z,
> subscriber access only, unfortunately).
Interesting. Thanks for the rep
in addition to the effbot link,
search the group
http://tinyurl.com/yyuxco
--
http://mail.python.org/mailman/listinfo/python-list
Xah Lee wrote:
> Introduction to 3D Graphics Programing
> http://xahlee.org/3d/index.html
You will probably find it more rewarding to use a more modern graphics
system, such as OpenGL or DirectX, with a suitable programming language
rather than Mathematica's. I would recommend any of OCaml, F#, Ha
Mike Tammerman wrote:
> I need an elliptic curve library that can be used by python. I googled
> but couldn't find a one. I'll appreciate, if you could show me.
>
You could look at http://sage.scipy.org/sage/
http://sage.scipy.org/sage/features.html
Jaap
--
http://mail.python.org/mailman/listi
Frederic Rentsch wrote:
> Following a call to dedent () it shouldn't be hard to translate leading
> groups of so many spaces back to tabs.
Sure, but the point is more that I don't think it's valid to change to
tabs in the first place.
E.g.:
input = ' ' + '\t' + 'hello\n' +
'\t' + 'wo
Boris Borcic wrote:
> Xah Lee wrote:
>> Of Interest:
>
> to which of comp.lang.perl.misc, comp.lang.python, comp.lang.lisp,
> comp.lang.java.programmer, comp.lang.functional ?
You must be new. Otherwise you would be familiar with this troll already.
jue
--
http://mail.python.org/mailman/listi
Lars Rune Nøstdal wrote:
> On Fri, 08 Dec 2006 03:07:09 -0800, Mark Tarver wrote:
>
> > How do you compare Python to Lisp? What specific advantages do you
> > think that one has over the other?
> >
> > Note I'm not a Python person and I have no axes to grind here. This is
> > just a question for
Gerry wrote:
> I'd like some cell to be a Blue "ABCDE".
>
> Here's come code thatv tries various values for pattern_for_colour and
> font.colour_index, to no avail.
>
> Can anyone suggest the right way to set colours?
>
> Thanks!
>
> Gerry
>
> ==
>
> from pyExcelerator import *
All of you are nazis!
--
http://mail.python.org/mailman/listinfo/python-list
defcon8 wrote:
> All of you are nazis!
Hmmm... that might work. :-)
Fuzzyman
http://www.voidspace.org.uk/python/articles.shtml
--
http://mail.python.org/mailman/listinfo/python-list
Is it possible for an object, in its __init__ method, to find out if it
is being assigned to a variable, and if so, what that variable's name
is? I can think of some potentially ugly ways of finding out using
sys._getframe, but if possible I'd prefer something less exotic.
(Basically I have a class
Fredrik Lundh wrote:
> Nick Craig-Wood wrote:
>
>> A regular expression matcher uses a state machine to match strings.
>
> unless it's the kind of regular expression matcher that doesn't use a
> state machine, like the one in Python.
>
>
>
How is the matching engine implemented then?
I thou
Delaney, Timothy (Tim) wrote:
> Hendrik van Rooyen wrote:
>
>> naaah - you don't have to worry - for real control He uses assembler.
>> with jump statements.
>> so the loops are closed.
>>
>> Unfortunately its not open source. Yet.
>
> People are working hard on reverse-engineering it though. I
On 23 Dec 2006 14:38:19 -0800, Adam Atlas <[EMAIL PROTECTED]> wrote:
> Is it possible for an object, in its __init__ method, to find out if it
> is being assigned to a variable, and if so, what that variable's name
> is? I can think of some potentially ugly ways of finding out using
> sys._getframe
Thomas Ploch wrote:
> Fredrik Lundh wrote:
> > Nick Craig-Wood wrote:
> >
> >> A regular expression matcher uses a state machine to match strings.
> >
> > unless it's the kind of regular expression matcher that doesn't use a
> > state machine, like the one in Python.
> >
> >
> >
>
> How is the ma
On Dec 23, 5:58 pm, "BJörn Lindqvist" <[EMAIL PROTECTED]> wrote:
> On 23 Dec 2006 14:38:19 -0800, Adam Atlas <[EMAIL PROTECTED]> wrote:
>
> > Is it possible for an object, in its __init__ method, to find out if it
> > is being assigned to a variable, and if so, what that variable's name
> > is? I c
On Sat, 23 Dec 2006 14:38:19 -0800, Adam Atlas wrote:
> Is it possible for an object, in its __init__ method, to find out if it
> is being assigned to a variable, and if so, what that variable's name
> is?
What should the variable name be set to if you do one of the following?
john = eric = gr
[EMAIL PROTECTED] wrote:
> Hi,
>
> I have written a small prototype Python extension for a C-library.
>
> I have the methods all sorted out and it is working fine.
>
> In the C-library, they are various constants of types like string,
> integer, float and matrix. I'd like to expose them as RE
On 12/23/06, Hendrik van Rooyen <[EMAIL PROTECTED]> wrote:
> have you looked at putting the data into a persistent dict?
>
> - Hendrik
>
What is that exactly?
-Greg
--
http://mail.python.org/mailman/listinfo/python-list
Hi Guys,
I just started learning Python a couple of days ago and to put some of
what I learnt into practice. As such I thought I might try and write a
simple program (based on examples I had seen) that would allow me to
log into a Cisco router, enter configuration mode, change an interface
descrip
Reminder: anything crossposted across this many newsgroups, especially
asking an inherently bogus question, is probably just trolling.
If it's equally on topic everywhere, that means it's on topic nowhere.
--
() ASCII Ribbon Campaign | Joe Kesselman
/\ Stamp out HTML e-mail! | System architext
Adam Atlas wrote:
> Is it possible for an object, in its __init__ method, to find out if it
> is being assigned to a variable, and if so, what that variable's name
> is? I can think of some potentially ugly ways of finding out using
> sys._getframe, but if possible I'd prefer something less exotic.
Hi.
Essence of problem in the following:
Here is lines in utf8 of this form "BZ?ツーリTV%ツキDVD"
Is it possible to split them into the fragments that contain only latin
printable symbols (aplhabet + "?#" etc)
and fragments with the hieroglyphs, so it could be like this
['BZ?', '\xe3\x83\x84\xe3\x83\xbc
Thanks, Steven and Steven.
@Bethard:
Isn't it a bit convoluted to use metaclasses?
someinstance.__class__.__name__ does the same thing.
@D'Aprano:
Thanks for the advice to rethink my data model. I'm doing so right now,
and I've already come up with a way that makes more sense. :)
--
http://mail
1. first of all, what is the English jargon (Optimize? But I think
this is not a very good keyword :( )for this problem? So I can use it
to search on the internet
2. is there any free/open lib for this?
3. I know for some questions(case 1, case 2, and sudoku), we can use
bundles of "FOR...NEXT" loo
On Sat, 23 Dec 2006 19:28:48 -0800, Belize wrote:
> Hi.
> Essence of problem in the following:
> Here is lines in utf8 of this form "BZ???TV%??DVD"
> Is it possible to split them into the fragments that contain only latin
> printable symbols (aplhabet + "?#" etc)
Of course it is possible, but the
oyster wrote:
[snip]
> I have written the case 1 in python, it needs 90 seconds on my pc, and
> the same approach in www.freebasic.net takes less than 1 seconds
> [code for python]
> import sets
> import time
> try:
> import psyco
> psyco.full()
> except:
> pass
>
> d0, d1=1, 2
>
> st=time.t
Adam Atlas wrote:
> Isn't it a bit convoluted to use metaclasses?
Yep. It's a well known fact that putting "convoluted" and "metaclasses"
in the same sentence is repetitively redundant. ;-)
> someinstance.__class__.__name__ does the same thing.
No, not really::
>>> class C(object):
.
"Thomas Ploch" <[EMAIL PROTECTED]> wrote:
> Delaney, Timothy (Tim) wrote:
> > Hendrik van Rooyen wrote:
> >
> >> naaah - you don't have to worry - for real control He uses assembler.
> >> with jump statements.
> >> so the loops are closed.
> >>
> >> Unfortunately its not open source. Yet.
> >
"Gregory Piñero" <[EMAIL PROTECTED]> wrote:
> On 12/23/06, Hendrik van Rooyen <[EMAIL PROTECTED]> wrote:
> > have you looked at putting the data into a persistent dict?
> >
> > - Hendrik
> >
> What is that exactly?
>
> -Greg
from the docs:
3.17 shelve -- Python object persistence
A ``shelf'' i
On 12/24/06, Hendrik van Rooyen <[EMAIL PROTECTED]> wrote:
> "Gregory Piñero" <[EMAIL PROTECTED]> wrote:
...
> open( filename[,flag='c'[,protocol=None[,writeback=False[,binary=None)
>
> Open a persistent dictionary. The filename specified is the base filename for
> the underlying database. As a
63 matches
Mail list logo