"WX" wrote:
> The character set I am using is the Hindi/Devanagari character set at
> unicode range U+901.)
>
> (#1) If I paste some unicode stuff from the clipboard into IDLE, it accepts
> it, but it can't
> execute a PRINT command like this:
>
> >>> print u"?? ??"
> Unsupported charact
Hi!
XP unicode view depend, also, of the uniscribe motor version. The last
version come with SP-2.
Other element : is the font "Arial Unicode MS" installed ?
@-salutations
--
Michel Claveau
--
http://mail.python.org/mailman/listinfo/python-list
"Philippe C. Martin" <[EMAIL PROTECTED]> wrote:
>
>For a few months now, I have been used .pyc script under XP without
>getting the "DOS" box.
You don't usually click on .pyc scripts. You click on .py and .pyw
scripts. .pyw files will not bring up a DOS box.
If you really want .pyc files to run
"Heather Stovold" <[EMAIL PROTECTED]> wrote:
>
>I need to make a GUI interface. Some of the screens need to be dynamically
>created, with the screen information in a database. Included in the database
>will be pictures (.gif or .jpg) that need to be displayed. A second
>database would hold the us
Is it possible?
I tried...
I = "John"
print \
"""
I used to love pizza"""
Error occurs!!!
But, I don't know how to fix... HELP
thx 4 reading.
--
http://mail.python.org/mailman/listinfo/python-list
Simon John <[EMAIL PROTECTED]> wrote:
> [snip]
> > Ha anyone tried cross compiling python with mingw? At work we compile
> > our software for lots of platforms (including windows) on a linux
> > build host. The windows builds are done with a mingw cross compiler.
> > It would be interesting if w
It's OK for me
@-salutations
--
Michel Claveau
--
http://mail.python.org/mailman/listinfo/python-list
Peter Hansen <[EMAIL PROTECTED]> wrote:
> Only for hard drive manufacturers, perhaps.
>
> For the rest of the computer world, unless I've missed
> a changing of the guard or something, "kilo" is 1024
> and "mega" is 1024*1024 and so forth...
Yes. Unless you work in the telcoms industry, wher
administrata wrote:
Is it possible?
I tried...
I = "John"
print \
"""
I used to love pizza"""
Error occurs!!!
No error occurs; it prints "I used to love pizza", as would be expected.
Oh: from the subject line, I'm guessing that you want it to say "John
used to love pizza" instead? In that case,
> If this is "goodbye" I can't say I'm sorry.
Don't feed the trolls - as tempting as it is
--
Regards,
Diez B. Roggisch
--
http://mail.python.org/mailman/listinfo/python-list
On Feb 13, 2005, at 11:44, Diez B. Roggisch wrote:
If this is "goodbye" I can't say I'm sorry.
Don't feed the trolls - as tempting as it is
8^)
Cheers
--
PA, Onnay Equitursay
http://alt.textdrive.com/
--
http://mail.python.org/mailman/listinfo/python-list
ted:
> How does the speed of the Scons build tool compare with Ant?
> Right now with out Ant builds take around an hour. Hoping to
> speed that up.
Scons emphasises accuracy over speed and is normally a little slower than
other build tools although still fast enough for most purposes. One c
On Feb 13, 2005, at 12:20, Neil Hodgson wrote:
http://www.scons.org/cgi-bin/wiki/GoFastButton
Out of curiosity, why does scons uses MD5 by default? Is that not, er,
somewhat heavy handed for most practical purpose?
Would not some sort of lightweight CRC be "good enough" to start with?
http://samb
Raymond Hettinger wrote:
It is not quite correct to say that this is what all immutables do:
.>>>x = 500
.>>>y = 600 - 100
.>>>x is y
False
That is an implementation detail, not guaranteed by the language (i.e. not
necessarily true in future versions, in Jython, or other implementations). It
is j
This message was not delivered due to the following reason:
Your message was not delivered because the destination computer was
unreachable within the allowed queue period. The amount of time
a message is queued before it is returned depends on local configura-
tion parameters.
Most likely there
administrata wrote:
> Is it possible?
>
> I tried...
>
>
> I = "John"
> print \
> """
> I used to love pizza"""
>
>
> Error occurs!!!
>
> But, I don't know how to fix... HELP
>
> thx 4 reading.
Point 0: It helps if you post a copy of what the actual screen display
looked like, instead of just sayi
Nick Craig-Wood wrote:
> Peter Hansen <[EMAIL PROTECTED]> wrote:
> > Only for hard drive manufacturers, perhaps.
> >
> > For the rest of the computer world, unless I've missed
> > a changing of the guard or something, "kilo" is 1024
> > and "mega" is 1024*1024 and so forth...
>
> Yes. Unless y
WX wrote:
> (#2) Hindi is not displayed correctly on the screen when the
> "Suplemental language support" parts for Windows XP are not installed,
> in particular in the Regional and Languages Options panel in the
> Control Panel, you have to check "Install files for complex script and
> right-to-l
WX wrote:
> (#2) Hindi is not displayed correctly on the screen when the
> "Suplemental language support" parts for Windows XP are not installed,
> in particular in the Regional and Languages Options panel in the
> Control Panel, you have to check "Install files for complex script and
> right-to-l
Hi,
I have a problem
with the socket recv() function while using it on win-2000, the problem accrue
while receiving data from socket in a constant format (e.g. 1Byte then 4Bytes
and then number of bytes according to the previous 4Bytes number), this
receiving action "fail" after a bout ~12
Hi,
I feel that you have a consideration if Python is suitable from the
perspective that you hadn't programmed for a long time. Assuming that
you had been convinced that Python is a suitable language in terms of
functionalities you need, please allow me to ensure that Python is
simple enough to
You know, it's really not necessary for you to put "[NooB]" in the subject
of your posts. This is a fairly friendly group and they will answer even
newbie questions amicably. But if you want an even kinder, gentler place to
ask questions as a newbie (not a noob), I suggest the Tutor mailing list:
h
Roel Schroeven wrote:
Peter Hansen wrote:
Scott David Daniels wrote:
Kind of fun exercise (no good for British English).
def units(value, units='bytes'):
magnitude = abs(value)
if magnitude >= 1000:
for prefix in ['kilo mega giga tera peta '
Pierre Hanser wrote:
Peter Hansen wrote:
Scott David Daniels wrote:
Kind of fun exercise (no good for British English).
def units(value, units='bytes'):
magnitude = abs(value)
if magnitude >= 1000:
for prefix in ['kilo mega giga tera peta '
In article <[EMAIL PROTECTED]>,
Tim Roberts <[EMAIL PROTECTED]> wrote:
>"Heather Stovold" <[EMAIL PROTECTED]> wrote:
>>
>>I need to make a GUI interface. Some of the screens need to be dynamically
>>created, with the screen information in a database. Included in the database
>>will be pictures (.
Michael Hoffman wrote:
This is a fairly friendly group and they will answer even
newbie questions amicably.
Albeit with the occasional pointed comment about not at least skimming the
tutorial when it covers the question asked ;)
Cheers,
Nick.
--
Nick Coghlan | [EMAIL PROTECTED] | Brisban
Mike Meyer wrote:
>>> Secondly, how do I clear screen (cls) from text and other content ?
>>
>> That depends on
>>
>> A: What type of display device you're using
>> B: What type of interface is being rendered on that display (command
>> line, GUI, IDE, etc)
>> C: Perhaps what operating system you
[Scott David Daniels]
Kind of fun exercise (no good for British English).
def units(value, units='bytes'):
magnitude = abs(value)
if magnitude >= 1000:
for prefix in ['kilo mega giga tera peta '
'exa zetta yotta').split():
m
Peter Hansen wrote:
Roel Schroeven wrote:
Peter Hansen wrote:
Scott David Daniels wrote:
Kind of fun exercise (no good for British English).
def units(value, units='bytes'):
magnitude = abs(value)
if magnitude >= 1000:
for prefix in ['kilo mega giga tera peta '
[EMAIL PROTECTED] writes:
> >If you're generating lots of graphs programatically, eg. on a web
> >server, grace is not what you want. Yes, it has a command language,
> >but IIRC it depends on X11, and windows even pop up as it runs in
> >batch mode. Bleh.
>
> I don't understand what you're talk
Heather Stovold wrote:
> I am a "retired" programmer, that started in the DOS world. (Well, I
guess
> I started pre-DOS...). I learned C++ (for DOS), and Pascal (for DOS)
when I
> was in school - and programmed for several years in Basic. (Ok - it
wasn't
> my choice - but it was what I was hire
On Sun, 13 Feb 2005 12:08:26 +1000, Nick Coghlan wrote:
> Try this:
>
> print "Hit a key!"
> cekaj()
> print "Nap time!"
> time.sleep(15)
> print "Hit another key!"
> cekaj()
>
> with the two different implementations, and see what happens if you hit a key
> when the 'Nap Time!' prompt appears.
Hi Neil, ted, et al.--
> > How does the speed of the Scons build tool compare with Ant?
> > Right now with out Ant builds take around an hour. Hoping to
> > speed that up.
>
> Scons emphasises accuracy over speed and is normally a little
> slower than other build tools although still fast enough f
Hi Peter--
> > How does the speed of the Scons build tool compare with
> > Ant? Right now with out Ant builds take around an hour. Hoping
> > to speed that up.
>
> Don't tools like Scons, Ant, and for that matter "make" just
> execute other programs? So that 99% of the time is consumed
> external
Hi!
This somewhat puzzles me:
Python 2.4 (#1, Feb 3 2005, 16:47:05)
[GCC 3.3.4 (pre 3.3.5 20040809)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
.>>> class test(object):
... def __init__(self):
... self.__call__ = self.__call1
... def __call1(self):
...
I'm glad to announce the new version of Python's own powerful
remote method invocation technology -- Pyro 3.5 (beta)!
You can get it via http://pyro.sourceforge.net, then go
to the SF project homepage download area.
It has many new features and improvements over Pyro 3.4,
which was released almost
I tried this:
>>>class test(object):
... def __call1(self):
... print 1
... __call__ = __call1
...
>>>t = test()
>>>t()
1
>>>
Is that what you were looking for?
--
Alan McIntyre
ESRG LLC
http://www.esrgtech.com
Stefan Behnel wrote:
Hi!
This somewhat puzzles me:
Python 2.4 (#1, F
You sir are a troll for sure. QBasic?! When was the last time you did
any programming, 1989? Gave me a laugh though.
Lars
--
http://mail.python.org/mailman/listinfo/python-list
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
> "Sridhar" == Sridhar <[EMAIL PROTECTED]> writes:
Sridhar> I am doing my undergrade CS course. I am in the final year,
Sridhar> and would like to do my project involving Python. Our
Sridhar> instructors require the project to have novel ideas.
Stefan Behnel wrote:
Is there a way to change __call__ after class creation?
__call__, like __getitem__, and __getattr__ is called on the
class object, not the instance object. So, no, not as far as I
am aware, without using metaclass trickery. The simplest option
IMO is to use another level of ind
Alan McIntyre wrote:
>>>class test(object):
...def __call1(self):
...print 1
...__call__ = __call1
Is that what you were looking for?
That still only allows him to have one call function per class.
--
Michael Hoffman
--
http://mail.python.org/mailman/listinfo/python-list
i'm currently using python 2.3(enthought edition) on win 2000/xp.
i'm using boa constructor on the GUI part and matplotlib 0.71 on
plotting the graph.
i am using an MDIParentFrame. one of the child frame (MDIChildFrame1)
will be used for
the table part. then another child frame (MDIChildFrame2) wi
Le vendredi 11 Février 2005 18:00, den a écrit :
> import msvcrt
> msvcrt.getch()
I frequently had the problem to have something similar but *portable*.
Something as short and simple.
Someone have an idea ?
Thank you
Francis Girard
--
http://mail.python.org/mailman/listinfo/python-list
At least I thought this was funny and cool! -Erik
--
http://mail.python.org/mailman/listinfo/python-list
gargonx wrote:
This works much better, aside from the fact that it does'nt work for
the std dictionary. the letters used from here stay the same. that
dictionary looks like this:
std = {
"A":"Z",
"Z":"A",
"B":"Y",
"Y":"B",
"C":"X",
"X":"C",
"E":"V",
"V":"E",
"H":
Then may I suggest the keeping-it-simple approach:
def myGetch():
raw_input("Press Enter to continue")
(sorry about the dots, I'm using google groups)
Lars
--
http://mail.python.org/mailman/listinfo/python-list
Michael Hoffman schrieb:
__call__, like __getitem__, and __getattr__ is called on the
class object, not the instance object. So, no, not as far as I
am aware, without using metaclass trickery. The simplest option
IMO is to use another level of indirection as you suggest.
Thanks for the quick answer
Stefan Behnel wrote:
Is there a way to change __call__ after class creation?
Check out this thread on the topic:
http://mail.python.org/pipermail/python-list/2004-January/203142.html
Basically, the answer is no -- at least not on a per-instance basis.
You can try something like:
py> class Test(ob
[EMAIL PROTECTED] wrote:
> Hiya,
>
> The title says it all really, but im a newbie to python sort of. I
can
> read in files and write files no probs.
>
> But what I want to do is read in a couple of files and output them to
> one single file, but then be able to take this one single file and
> recr
Le vendredi 11 FÃvrier 2005 21:45, Curt a ÃcritÂ:
> On 2005-02-10, Francis Girard <[EMAIL PROTECTED]> wrote:
> > I think I've been enthouasistic too fast. While reading the article I
> > grew more and more uncomfortable with sayings like :
>
>
>
> Yes, you may have grown uncomfortable because what
Le vendredi 11 Février 2005 20:11, Steven Bethard a écrit :
> Is there a good way to determine if an object is a numeric type?
> Generally, I avoid type-checks in favor of try/except blocks, but I'm
> not sure what to do in this case:
>
> def f(i):
> ...
> if x < i:
>
Hi,
Since this is (sort of) my second request it must not be an easy solution.
Are there others using Python to connect MsSQL? At the moment I'd accept
even a windows solution - although, I'm looking for a Linux solution.
John
--
http://mail.python.org/mailman/listinfo/python-list
" Since this is (sort of) my second request it must not be an easy
solution.
Are there others using Python to connect MsSQL? "
http://sourceforge.net/projects/mysql-python
--
http://mail.python.org/mailman/listinfo/python-list
On Sun, 13 Feb 2005 18:48:03 +0100, Francis Girard >
>My deepest apologies,
>
>Francis Girard
Sorry if I helped get you into this, Francis.
I have read and seen enough of Kay and his visions to find him as a
bug where *my* moon don't shine. When the appropriate opportunity
comes, I find it hard n
[John Fabiani]
I'm hoping someone on the list has connected to sybase/MsSQL with something
that works with DBAPI 2.0 from a linux box (SUSE 9.2) because I can't seem
to get it done. I found Object Craft's python code that uses FreeTDS. But
I can't get it compiled. The code is looking for "sybdb.
[John Fabiani]
> Since this is (sort of) my second request it must not be an easy
> solution. Are there others using Python to connect MsSQL?
[jdonnell]
http://sourceforge.net/projects/mysql-python
Note that "MsSQL" != "MySQL".
--
alan kennedy
--
Hello,
I would like to recurse through a directory and make files (which match
a specific criteria) read only. From searching the Internet, I found
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/303343
which shows how to change file attributes to read only using the
win32api m
I'm a newcomer to python:
[EVALUATION] - E01: The Java Failure - May Python Helps?
http://groups-beta.google.com/group/comp.lang.python/msg/75f0c5c35374f553
-
I've download (as suggested) the python 2.4 installer for windows.
Now I have problems to compile python extension that some packages
depen
"Junkmail" <[EMAIL PROTECTED]> writes on 10 Feb 2005 18:26:52 -0800:
> I've been playing with Zope for about a year and took the plunge last
> week into making a product.
You should send Zope related questions to the Zope mailing list.
You will need to subcribe. You can do this at "http://www.zope
Hi,
I wrote simple dummy examples to teach to myself iterators and generators.
I think that the iteration protocol brings a very neat confusion between the
iterator and what it iterates upon (i.e. the iteratable). This is outlined in
"example 3" in my dummy examples.
What are your feelings abo
John Fabiani wrote:
> Hi,
> Since this is (sort of) my second request it must not be an easy solution.
> Are there others using Python to connect MsSQL? At the moment I'd accept
> even a windows solution - although, I'm looking for a Linux solution.
Use unix-odbc and a mssql driver for unxi-odb
Le dimanche 13 Février 2005 19:05, Arthur a écrit :
> On Sun, 13 Feb 2005 18:48:03 +0100, Francis Girard >
>
> >My deepest apologies,
> >
> >Francis Girard
>
> Sorry if I helped get you into this, Francis.
>
No, no, don't worry. I really expressed my own opinions and feelings. At the
same time, I
Stefan Behnel wrote:
Hi!
This somewhat puzzles me:
Python 2.4 (#1, Feb 3 2005, 16:47:05)
[GCC 3.3.4 (pre 3.3.5 20040809)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
.>>> class test(object):
... def __init__(self):
... self.__call__ = self.__call1
... d
John Fabiani wrote:
Hi,
Since this is (sort of) my second request it must not be an easy solution.
Are there others using Python to connect MsSQL? At the moment I'd accept
even a windows solution - although, I'm looking for a Linux solution.
On Windows, you can use http://sourceforge.net/projects
Serge Orlov wrote:
Emphasis is mine. So how many libc implementations with
non-unicode wide-character codes do we have in 2005?
Solaris has supported 2-byte wchar_t implementations for many
years, and so I believe did HP-UX and AIX.
ISO C99 defines a constant __STDC_ISO_10646__ which an
implementat
yes the items in std are always single to single, and ext single to
double. basicly the ext are refernce to the std itmes. the second
character in ext is a number depending on how far it is from the item
in std. this is just a simple encoding program.
--
http://mail.python.org/mailman/listinfo/py
Peter Hansen wrote:
For the rest of the computer world, unless I've missed
a changing of the guard or something, "kilo" is 1024
and "mega" is 1024*1024 and so forth...
In case this isn't clear yet: you have missed a changing
of the guard or something. "kibi" is 1024, "mebi" is
1024*1024 and so fort
Dan Bishop schreef:
Nick Craig-Wood wrote:
Peter Hansen <[EMAIL PROTECTED]> wrote:
Only for hard drive manufacturers, perhaps.
For the rest of the computer world, unless I've missed
a changing of the guard or something, "kilo" is 1024
and "mega" is 1024*1024 and so forth...
Yes. Unless you work in
gargonx wrote:
yes the items in std are always single to single, and ext single to
double. basicly the ext are refernce to the std itmes. the second
character in ext is a number depending on how far it is from the item
in std. this is just a simple encoding program.
If your keys are always single c
For the record, re
http://mail.python.org/pipermail/python-list/2004-December/257422.html
and
http://www.gossamer-threads.com/lists/python/python/380607
cheers,
--titus
- Forwarded message from John J Lee <[EMAIL PROTECTED]> -
X-Original-To: [EMAIL PROTECTED]
From: John J Lee <[EMAIL
Thanks; I didn't read close enough. :)
--
Alan McIntyre
ESRG LLC
http://www.esrgtech.com
Michael Hoffman wrote:
Alan McIntyre wrote:
>>>class test(object):
...def __call1(self):
...print 1
...__call__ = __call1
Is that what you were looking for?
That still only allows him to have o
I need this a lot: a one line way to do a n-ary and or 'or'.
e.g.,
result = True
for x in L:
if not boolean_function(x):
result = False
or
>>> reduce(operator.__and__, [boolean_function(x) for x in L)
So usually I just write a little function any( L, boolean_function =
identity ) or all(
> So usually I just write a little function any( L, boolean_function =
> identity ) or all( ... ). But I am kind of sick of doing that all the
> time -- does it exist anywhere in the Python libraries? It seems really
> common to me.
Put things into your own module and add it to your python path.
Dan Bishop wrote:
They must have gotten the idea from floppy disks, which also use a
1024000-byte "megabyte".
It's pretty common industry-wide. Memory is measured in binary prefixes
(x 1024), but disk space and bandwidth are measured in decimal prefixes
(x 1000).
--
Erik Max Francis && [EMAIL P
Denis S. Otkidach wrote:
You are right. But isalpha behavior looks strange for me anyway: why
cyrillic character '\u0430' is recognized as alpha one for de_DE locale,
but is not for C?
In glibc, all "real" locales are based on
/usr/share/locale/i18n/locales/i18n, e.g. for de_DE through
LC_CTYPE
co
Well that seems to work like a champion, but my prob then would be; how
do i get the double character values of ext to turn back to the single
character keys. The reversed (decode if you will). Thanks a lot Steve
this has been a great learning!
--
http://mail.python.org/mailman/listinfo/python-li
On Sun, Feb 13, 2005 at 01:25:02PM -0600, Efrat Regev wrote:
> I would like to recurse through a directory and make files (which match
> a specific criteria) read only. From searching the Internet, I found
> http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/303343
> which shows how to
Hi,
I downloaded the latest win32all build 202 and tried to install under
win2000 with Py2.4. Install complains about 'couldn't open py2.4 to run
script pywin32-preinstall.py'. I checked the directories and there was
no sign of this file (preinstall.py) so I presume this is why it bombed.
How d
I warmly recommend downloading Peter Norvig's Python utilities file
(http://aima.cs.berkeley.edu/python/utils.py) and putting it on your
Python path. (E.g., in bash, put a line like
export PYTHONPATH="/path/to/utilities_directory"
in your .bashrc file.) The utils.py file defines many useful
fun
Roose wrote:
I need this a lot: a one line way to do a n-ary and or 'or'.
Looks like there are itertools recipes for those, similar to what
Michael just posted. Taken from here:
http://docs.python.org/lib/itertools-recipes.html
def all(seq, pred=bool):
"Returns True if pred(x) is True for ev
Roose wrote:
I need this a lot: a one line way to do a n-ary and or 'or'.
e.g.,
result = True
for x in L:
if not boolean_function(x):
result = False
or
reduce(operator.__and__, [boolean_function(x) for x in L)
Can you use itertools?
py> def boolfn(x):
... print "boolfn: %r" % x
... re
Brian Beck wrote:
def all(seq, pred=bool):
"Returns True if pred(x) is True for every element in the iterable"
for elem in ifilterfalse(pred, seq):
return False
return True
def any(seq, pred=bool):
"Returns True if pred(x) is True for at least one element in the
iterable"
Roose wrote:
I need this a lot: a one line way to do a n-ary and or 'or'.
Here's a one-liner for the n-ary and:
bool(min(bool(x) for x in L))
py> bool(min(bool(x) for x in [1, 1, 1, 0]))
False
py> bool(min(bool(x) for x in [1, 1, 1, 1]))
True
py> bool(min(bool(x) for x in ['a', '', 'b', 'c']))
Fals
gargonx wrote:
Well that seems to work like a champion, but my prob then would be; how
do i get the double character values of ext to turn back to the single
character keys. The reversed (decode if you will).
It's unclear what you want to do here. If you have say:
ext = dict(aa='A', ab='B', bb='C'
Nick Coghlan <[EMAIL PROTECTED]> writes:
> Peter Hansen wrote:
>> Only for hard drive manufacturers, perhaps.
>> For the rest of the computer world, unless I've missed
>> a changing of the guard or something, "kilo" is 1024
>> and "mega" is 1024*1024 and so forth...
>
> Given that there are perfec
MM wrote:
I downloaded the latest win32all build 202 and tried to install under
win2000 with Py2.4. Install complains about 'couldn't open py2.4 to run
script pywin32-preinstall.py'. I checked the directories and there was
no sign of this file (preinstall.py) so I presume this is why it bombed.
[EMAIL PROTECTED] (Aahz) writes:
> In article <[EMAIL PROTECTED]>, Mike Meyer <[EMAIL PROTECTED]> wrote:
>>
>>Here here. I find that threading typically introduces worse problems
>>than it purports to solve.
> Threads are also good for handling blocking I/O.
Actually, this is one of the cases I
On Sun, 13 Feb 2005 17:57:34 GMT, John Fabiani <[EMAIL PROTECTED]>
wrote:
>Are there others using Python to connect MsSQL?
Hi,
direct your attention to
http://www.object-craft.com.au/projects/mssql/
I once tried it as a little test - it worked.
I would love to use it these days - unfortunately
Brian Beck wrote:
Roose wrote:
I need this a lot: a one line way to do a n-ary and or 'or'.
Here's a one-liner for the n-ary and:
bool(min(bool(x) for x in L))
py> bool(min(bool(x) for x in [1, 1, 1, 0]))
False
py> bool(min(bool(x) for x in [1, 1, 1, 1]))
True
py> bool(min(bool(x) for x in ['a', ''
Michael Hartl wrote:
> I warmly recommend downloading Peter Norvig's Python utilities file
> (http://aima.cs.berkeley.edu/python/utils.py) and putting it on your
> Python path. (E.g., in bash, put a line like
>
> export PYTHONPATH="/path/to/utilities_directory"
>
> in your .bashrc file.) The uti
Steven Bethard wrote:
Another alternative:
not False in (bool(x) for x in L)
Note that this should short-circuit, where min won't.
Steve
Whoops, for some reason the thought that short-circuiting didn't apply
to And entered my mind while trying to post a nice solution. Hard to say
why considering
I'm looking for an implementation of AES (the Advanced Encryption
Standard) in pure Python. I'm aware of pycrypto, but that uses C code.
I'm hoping to find something that only uses Python...I'm willing to
trade speed for portability, since my application is designed for
several different platform
"Roose" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
> I need this a lot: a one line way to do a n-ary and or 'or'.
>
> e.g.,
>
> result = True
> for x in L:
> if not boolean_function(x):
> result = False
>
> or
>
> >>> reduce(operator.__and__, [boolean_function(x) for x in L)
Root.option_add("*Menu.Font", "Veranda 9")
as an example, works fine in my program.
Root.option_add("*Radiobutton*selectColor", "black")
also works fine for regular radiobuttons. What I can't
do is get the selectColor of the radiobutton's in the
menu to be black...the x.add_radiobutton() ones.
let's take the word "dogs"
ext = dict("D":"V1", "O":"M1", "G":"S1")
std = dict("S":"H")
encode("DOGS") # proc()
we'll get: "V1M1S1H"
let's say i want to do just the opposite
word: "V1M1S1H"
decode("V1M1S1H")
#how do i decode "V1" to "D", how do i keep the "V1" together?
and get: "DOGS
MM wrote:
> Hi,
>
> I downloaded the latest win32all build 202 and tried to install under
> win2000 with Py2.4. Install complains about 'couldn't open py2.4 to
run
> script pywin32-preinstall.py'. I checked the directories and there
was
> no sign of this file (preinstall.py) so I presume this is
Your mail to 'RT-Announce' with the subject
You are made active
Is being held until the list moderator can review it for approval.
The reason it is being held:
Post by non-member to a members-only list
Either the message will get posted to the list, or you will receive
notification of
[EMAIL PROTECTED] wrote:
I'm looking for an implementation of AES (the Advanced Encryption
Standard) in pure Python. I'm aware of pycrypto, but that uses C code.
I'm hoping to find something that only uses Python...I'm willing to
trade speed for portability, since my application is designed for
s
Hi all,
My PC finally went belly up last week and I'm looking forward to
playing with my new Mac. However, I play a bit of online poker, and
there is no Mac client for my poker room.
Ideally, instead of running Virtual PC, I'd much rather build a custom
poker client with Python. It's an idea I've
In Python there are so many ways to do things...
This looks like another one, I haven't tested it:
not False in imap(pred, iterable)
As usual tests are required to measure the faster one.
I agree with Roose, there are are some "primitive" operations (like
this, and flatten, partition, mass remova
1 - 100 of 157 matches
Mail list logo