XPN - X Python Newsreader is a multiplatform newsreader with unicode
support. It is written in Python+PyGTK.
It has features like scoring/actions, XFace and Face decoding and random
taglines.
You can find it on:
http://xpn.altervista.org/index-en.html
http://sf.net/projects/xpn
Changes in this
ctypes 0.9.5 released - Mar 11, 2005
Overview
ctypes is an advanced ffi (Foreign Function Interface) package for
Python 2.3 and higher.
ctypes allows to call functions exposed from dlls/shared libraries
and has extensive facilities to create,
Chris wrote:
the current csv module cannot handle unicode the docs say, is there any
workaround or is unicode support planned for the near future? in most
cases support for characters in iso-8859-1(5) would be ok for my
purposes but of course full unicode support would be great...
It doesn't
Thanks Pierre all working now.
Pete
Pierre Quentel wrote:
PGMoscatt a crit :
Hi All,
I am trying to create a dialog which will have a number of components but
having trouble with the placement of various widgets.
For example, in my code below you will see I am trying to insert
Chris wrote:
hi,
to convert excel files via csv to xml or whatever I frequently use
the
csv module which is really nice for quick scripts. problem are of
course
non ascii characters like german umlauts, EURO currency symbol etc.
The umlauted characters should not be a problem, they're all in
hi,
thanks for all replies, I try if I can at least get the work done.
I guess my problem mainly was the rather mindflexing (at least for me)
coding/decoding of strings...
But I guess it would be really helpful to put the UnicodeReader/Writer
in the docs
thanks a lot
chris
--
Hello, Just Visit
Our Pharrmacy-By-Mail SHOP and save up to
75%.
Va
umVi
raCi
isAm
en,
Andman
li
ag
al
bi
yother!
P.S. You will be pleasantly surprised with our prrices
;)
Have a good day!
--
John Machin wrote:
Just look at the efficiency of processing N files of the same size S,
where they differ after d bytes: [If they don't differ, d = S]
PU: O(Nd) reading time, O(Nd) data comparison time [Actually (N-1)d
which is important for small N and large d].
Hashing method: O(NS) reading
ctypes 0.9.5 released - Mar 11, 2005
Overview
ctypes is an advanced ffi (Foreign Function Interface) package for
Python 2.3 and higher.
ctypes allows to call functions exposed from dlls/shared libraries
and has extensive facilities to create,
Thomas Heller wrote:
It would be for 2.5, anyway, and I have hoped that bdist_wininst would
be replaced by bdist_msi then ;-). What are your plans for that?
I still hope to write one by for 2.5.
One issue is that you cannot have multiple installations of an MSI
package. So if you want to support
Vincent Wehren wrote:
is there a reason why msiexec iterates through what looks like all (?)
files and directories in/under the destination directory? There is
massive file I/O going on there (OK, by now you know I didn't de-install
2.4 before trying ;-)) which explains the 100% CPU usage and
Joerg Schuster wrote:
Thanks to all. This thread shows again that Python's best feature is
comp.lang.python.
from comp.lang import python ;)
Paul
--
http://mail.python.org/mailman/listinfo/python-list
klappnase wrote:
enc = locale.nl_langinfo(locale.CODESET).lower()
Notice that this may fail on systems which don't provide the
CODESET information. Recent Linux systems (glibc 6) have it,
and so do recent Solaris systems, but if you happen to use
an HPUX9 or some such, you find that
[EMAIL PROTECTED] wrote:
Hello NG,
Hello!
I am still quite a newbie with Python (I intensely use wxPython,
anyway).
I would like to know what are, in your opinions, the best/faster
databases
that I could use in Python (and, of course, I should be able to link
everything
with a
Hi Roger,
Thanks, I understand it now, I didn't yet receive in the mail any
replies to my post on py-dev when I read your post here! That's why it
didn't make any sense to me.
I didn't yet have a chance to try the workaround given in the
bug-report (remove MBCS encoding line). Hope to find time
I've used the default support available by these classes. Thus it will
run on a potentially public TCP/IP port. As the application backend
allows, among other things, saving files to the local filesystem, this
would be a clear security hole in the wild. Restricting it to
localhost would be a
Jeffrey Barish wrote:
I have a small program that I would like to run on multiple platforms
(at least linux and windows). My program calls helper programs that
are different depending on the platform. I think I figured out a way
to structure my program, but I'm wondering whether my solution is
Mike Wimpe [EMAIL PROTECTED] wrote in news:1110628448.532469.117000
@g14g2000cwa.googlegroups.com:
http://groups.google.de/groups?hl=delr=c2coff=1threadm=
2c60a528.0309251324.109d4af5%40posting.google.comrnum=5prev=/groups%3Fq%
basically what the code does is transmit data to a hardware and then
receive data that the hardware will transmit.
import serial
import string
import time
from struct import *
ser = serial.Serial()
ser.baudrate = 9600
ser.port = 0
ser
ser.close()
ser.open()
command = 67
message_no = 1
André Roberge wrote:
[EMAIL PROTECTED] wrote:
I have a number of variables (environmental variables, actually), most
of which will have a value. But some may not have been found by
os.environ.get(), so I set those to None. Now, if any of them are None,
the app cannot proceed, so I want to test for
It doesn't seem like the python 2.4(and the recent 2.4.1) support
berkeley db 4.3. (4.3 fixes some deadlock bugs I occasionally encounter
using 4.2.)
bsddb3(at pybsddb.sf.net) already supports 4.3 since last December(but
doesn't explicitly support win32 -- see the assert statement in
setup.py). I
Steve Holden wrote:
You could think about teaching them the linelist.append(fn(x)) way,
which then gives you the choice of
.join(linelist) - no gaps
\n.join(lienlist) - one item per line
.join(linelist) - spaces between items.
Sure I will. Next week, when we come to list operations.
Hi,
I'm trying to get a bitmap onto a button, but I
can't.Can anyone tell me where to look for a solution?
The call I use is this one:self.b =
Button(toolbar, text="nieuw", bitmap="@/test.xbm", width=20,
command=self.print_msg)
The message I get is this:Traceback (most
recent call last):
Hi,
I'm trying to get a bitmap onto a button, but I
can't.Can anyone tell me where to look for a solution?
The call I use is this one:self.b =
Button(toolbar, text="nieuw", bitmap="@/test.xbm", width=20,
command=self.print_msg)
The message I get is this:Traceback (most
recent call last):
Hi,
I'm trying to get a bitmap onto a button, but I
can't.Can anyone tell me where to look for a solution?
The call I use is this one:self.b =
Button(toolbar, text="nieuw", bitmap="@/test.xbm", width=20,
command=self.print_msg)
The message I get is this:Traceback (most
recent call last):
On 2005-03-11, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Hello NG,
I am still quite a newbie with Python (I intensely use wxPython, anyway).
I would like to know what are, in your opinions, the best/faster databases
that I could use in Python (and, of course, I should be able to link
Patrick Useldinger wrote:
Just to explain why I appear to be a lawer: everybody I spoke to about
this program told me to use hashes, but nobody has been able to explain
why. I found myself 2 possible reasons:
1) it's easier to program: you don't compare several files in parallel,
but process
jfj schreef:
Ruud wrote:
So far for *how* it works. As to *why* it works like this, I don't know
for sure. But my guess is that the reasoning was something as follows:
if you define a function (regular or something special like a
classmethod) only for an instance of a class, you obviously don't
On 2005-03-12, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Hello, I'm new to both PostgreSQL and psycopg and I'm trying to connect
to my database running on localhost. I have postgres setup to do md5
authentication and this works when using a db admin tool on my local
network. For some reason,
Harald Massa wrote:
def getdoublekey(row):
return row[0:2]
for key, bereich in groupby(eingabe,getdoublekey):
print Area:,key
for data in bereich:
print --data--, data[2:]
which indeed leeds to the expected result, while looking less hacky ..
on the other hand
Posting the same question three times is unecessary and is likely to upset
people!
TclError: error reading bitmap file \test.xbm
This is no valid path name - nor is @/test.xbm, at least to my knowledge.
What happens if you supply the full path like this:
path = C:\\somedir\\test.xbm
--
although a bit more than I bargained for, this does has some good info,
in case you are way in the future of this post...
love,
mike
--
http://mail.python.org/mailman/listinfo/python-list
Daniel == Daniel Keep [EMAIL PROTECTED] writes:
Daniel Thanks for the advice. I'll probably go with either the
Daniel BSD license, or possibly the LGPL. But I'm leaning
Daniel towards the BSD since it fits on the screen...
Isn't MIT license even shorter and simpler? A while ago
Michael == Michael Spencer [EMAIL PROTECTED] writes:
Michael Here's a non-recursive implementation.
Thanks.
Michael There are lots around.
Yet another fact that suggest the inclusion in stdlib would make sense
;-).
--
Ville Vainio http://tinyurl.com/2prnb
--
You have:
=@/test.xbm
take the '/' out or (if it is in a different dir which i think it is),
do
=/@test.xbm
also... make sure your *.xbm is really a bitmap file (that would just
be another thing to check... not to say its not the proper format)...
Regards,
Harlin Seritt
--
If this is for making money, make it either a proprietary license or
BSD.
If you're giving it away and expect nothing for it except maybe fame,
do GPL.
:-)
Regards,
Harlin Seritt
--
http://mail.python.org/mailman/listinfo/python-list
When you ask an opinion, you can expect a long thread list... even if
it's something inane like What kind of license should I use?...
hacker/geeks/freaks/wannabes are only too happy to issue an opinion --
warranted or otherwise...
Regards,
Harlin Seritt
--
Try not to triple post if you can help it (I'll assume you accidentally
hit the SENT button three times whistles)
Regards,
Harlin Seritt
--
http://mail.python.org/mailman/listinfo/python-list
hah, this code is anything but simple...
--
http://mail.python.org/mailman/listinfo/python-list
[Patrick Useldinger]
Shouldn't you add the additional comparison time that has to be done
after hash calculation? Hashes do not give 100% guarantee. If there's
a large number of identical hashes, you'd still need to read all of
these files to make sure.
Identical hashes for different files?
I have a Python program that collects user input using
msg = Enter the full path and name of the file to be processed:
answer = raw_input(msg)
If I run it in IDLE, the question is splashed across the execution
window, and if it is long, simply wraps to the next line. Most
importantly, it is
Won't extend this except to say thanks to Michael Spencer for another
version. If I were doing it only once I'd use that. Since I do it more
than once I should package it as a function.
Thanks.
Charles Hartman
Professor of English, Poet in Residence
http://cherry.conncoll.edu/cohar
Ville Vainio wrote:
Daniel Thanks for the advice. I'll probably go with either the
Daniel BSD license, or possibly the LGPL. But I'm leaning
Daniel towards the BSD since it fits on the screen...
Isn't MIT license even shorter and simpler? A while ago some Debian
guys were speculating
I embedded Python in a Windows C++ program. Now I want to debug my
embedded scripts which of course won't run in any IDE process.
Commercial IDEs like WingIDE can attach to external processes by
importing a module in the scripts. Is there a debugger capable of this
which is Free or Open
Reinhold Birkenfeld wrote:
Steven Bethard wrote:
Chris Perkins wrote:
Random idea of the day: How about having syntax support for
currying/partial function application, like this:
func(..., a, b)
func(a, ..., b)
func(a, b, ...)
That is:
1) Make an Ellipsis literal legal syntax in an argument list.
François Pinard wrote:
Identical hashes for different files? The probability of this happening
should be extremely small, or else, your hash function is not a good one.
We're talking about md5, sha1 or similar. They are all known not to be
100% perfect. I agree it's a rare case, but still, why
Harald Massa wrote:
def getdoublekey(row):
return row[0:2]
for key, bereich in groupby(eingabe,getdoublekey):
print Area:,key
for data in bereich:
print --data--, data[2:]
Why don't you just pass a slice to itemgetter?
py eingabe=[
... (Stuttgart,70197,Fernsehturm,20),
...
[Sorry, I previously replied to Diez offlist, and probably to a
spam-protected address at that. Here's that reply and my followup
after reading up on pyro
]
On Sat, 12 Mar 2005 11:08:31 -0600, Michael Urman [EMAIL PROTECTED] wrote:
On Sat, 12 Mar 2005 14:12:21 +0100, Diez B. Roggisch [EMAIL
Hallchen!
I have to generate a lot of data types (for ctypes by the way). An
example is
ViUInt32 = u_long
ViPUInt32 = POINTER(ViUInt32)
ViAUInt32 = ViPUInt32
Therefore, I defined functions that should make my life easier:
def generate_type_dublett(visa_type, ctypes_type):
visa_type_name
I'm trying to create some read-only instance specific properties, but
the following attempt didn't work:
class Foobar(object):
pass
foobar = Foobar()
foobar.x = property(fget=lambda: 42)
print foobar.x:, foobar.x
Which results in the following ouput instead of '42':
foobar.x:
Hallchen!
Torsten Bronger [EMAIL PROTECTED] writes:
I have to generate a lot of data types (for ctypes by the way).
An example is
ViUInt32 = u_long
ViPUInt32 = POINTER(ViUInt32)
ViAUInt32 = ViPUInt32
Therefore, I defined functions that should make my life easier:
[...]
However, this
Martin Miller wrote:
I'm trying to create some read-only instance specific properties, but
the following attempt didn't work:
class Foobar(object):
pass
foobar = Foobar()
foobar.x = property(fget=lambda: 42)
print foobar.x:, foobar.x
[snip]
Can anyone tell me what's wrong with this approach
A. Klingenstein wrote:
I embedded Python in a Windows C++ program. Now I want to debug my
embedded scripts which of course won't run in any IDE process.
Commercial IDEs like WingIDE can attach to external processes by
importing a module in the scripts. Is there a debugger capable of this
which
I'm trying to add a row to a MySQL table using insert. Here is the code:
connection = MySQLdb.connect(host=localhost, user=root, passwd=pw,
db=japanese)
cursor = connection.cursor()
cursor.execute(INSERT INTO edict (kanji, kana, meaning) VALUES (%s, %s,
%s), (a, b, c) )
connection.close()
After
Torsten Bronger wrote:
def generate_type_dublett(visa_type, ctypes_type):
visa_type_name = visa_type.__name__
exec visa_type_name + = + ctypes_type.__name__
exec ViP + visa_type_name[2:] + =POINTER( + visa_type_name + )
You shouldn't need to use exec for this, and it is best to avoid
[EMAIL PROTECTED] wrote:
It doesn't seem like the python 2.4(and the recent 2.4.1) support
berkeley db 4.3.
What makes you say that? It builds fine for me.
bsddb3(at pybsddb.sf.net) already supports 4.3 since last December(but
doesn't explicitly support win32 -- see the assert statement in
Torsten Bronger wrote:
Okay this works:
def generate_type_dublett(visa_type, ctypes_type):
return visa_type + = + ctypes_type + ; + \
ViP + visa_type[2:] + =POINTER( + visa_type + )
def generate_type_triplett(visa_type, ctypes_type):
return generate_type_dublett(visa_type,
grumfish wrote:
connection = MySQLdb.connect(host=localhost, user=root, passwd=pw,
db=japanese)
cursor = connection.cursor()
cursor.execute(INSERT INTO edict (kanji, kana, meaning) VALUES (%s, %s,
%s), (a, b, c) )
connection.close()
Just a guess in the dark (I don't use MySQL): is commit
On Sat, 12 Mar 2005 09:48:42 -0800, Martin Miller wrote:
I'm trying to create some read-only instance specific properties, but the
following attempt didn't work:
I'm going to echo Steven's comment: What's the situation in which you
think you want different properties for different instances of
Peter Hansen wrote:
[EMAIL PROTECTED] wrote:
In Martinelli's Nutshell book in the Exceptions chapter there is an
example of a custom exception class (pg.112) that I am trying to
implement without success. The custom exception class example
pulls
sys.exc_info() into an attribute and I am
Just out of curiosity, I was wondering if anyone has
compiled Python 2.4 with the Intel C Compiler and its
processor specific optimizations. I can build it fine
with OPT=-O3 or OPT=-xN but when I try to combine
them I get this as soon as ./python is run:
case $MAKEFLAGS in \
*-s*) CC='icc
Robin Becker wrote:
A. Klingenstein wrote:
I embedded Python in a Windows C++ program. Now I want to debug my
embedded scripts which of course won't run in any IDE process.
Commercial IDEs like WingIDE can attach to external processes by
importing a module in the scripts. Is there a debugger
window / cons / fencepost / slice functions: +1
(with a flag to say if you want to truncate or pad incomplete tuples at
end of input sequence.
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/303279
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/303060
Thanks for your time everyone; I got it XMLRPC working over unix
domain stream sockets. In case people are interested, here's the
pieces I put together. I'm sure they throw away a little flexibility,
but they work for my purpose. Any pointers to make the code more
robust, or do less total
Hi!
I was thinking about connecting SimpleXMLRPCServer with inetd.. but I
haven't been able to replace the socket by sys.stdin and sys.stdout. Maybe
socket.fromfd(sys.stdin.fileno()) could help me, but I can't get it to
work, I always get connection refused. Any ideas?
greets,
Marek
--
grumfish wrote:
The rowcount of the
cursor is 1 after the execute is 1 and the table's auto_increment value
is increased for each insert done.
If the auto_increment is increased, then it seems like the row was
inserted. Are you sure the problem is not with your SELECT attempt?
Just a guess,
Scott David Daniels wrote:
Chris Perkins wrote:
Random idea of the day: How about having syntax support for
currying/partial function application, like this:
func(..., a, b)
func(a, ..., b)
func(a, b, ...)
That is:
1) Make an Ellipsis literal legal syntax in an argument list.
2) Have the compiler
grumfish wrote:
I'm trying to add a row to a MySQL table using insert. Here is the code:
connection = MySQLdb.connect(host=localhost, user=root, passwd=pw,
db=japanese)
cursor = connection.cursor()
cursor.execute(INSERT INTO edict (kanji, kana, meaning) VALUES (%s, %s,
%s), (a, b, c) )
Patrick Useldinger wrote:
Just a guess in the dark (I don't use MySQL): is commit implicit, or
do you have to add it yourself?
Thank you. Inserts work fine now.
Another question. I'm trying to insert Japanese text into the table. I
created the database using 'CHARACTER SET UTF8'. In Python I do
deelan wrote:
which version of MySQLdb are you running? versions
1.1.6 and below gained a connection.autocommit) method set by default
ehm, 1.1.6 and *above*, of course. :)
--
Però è bello sapere che, di questi tempi spietati, almeno
un mistero sopravvive: l'età di Afef Jnifen. -- dagospia.com
--
Hmm. On inspection, pyro seems to be really heavy, what with its
requirement of a pyro-nameserver, and using TCP as the transport.
The nameserver is purely optional. Regarding the overhead of transport -
well, I didn't check pyro on that, but corba is 10-100 times faster over
the network than
Hello,
I'm in critical need to install Python Imaging Library on my linux/cpanel server. I'm not very experienced and I almost always have to use instalation guides. I have downloaded the software, unzipped it, and now I think I just need to install it somehow. Are there files that need to be
[EMAIL PROTECTED] wrote:
window / cons / fencepost / slice functions: +1
(with a flag to say if you want to truncate or pad incomplete tuples
at end of input sequence.
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/303279
Bengt Richter wrote:
BTW, what makes you think any self-respecting scientist wouldn't be insulted
by the idea of your spoon-feeding them a dumbed-down programming equivalent of
See Spot run?
Am I right thinking that your dream 3 R's curriculum starts with
Stately, plump Buck Mulligan and Plya
I'm running an .exe in Python, using subProcess.Popen. The executable
writes data to a file I process later on in the program. Unfortunately,
my program returns the error no such file How do I block
execution until the external executable terminates?
Earl
--
PingGUI is a program that nobody but me knows anything about. If I
wanted help from people who are experts on it, I'd get nothing at all.
--
http://mail.python.org/mailman/listinfo/python-list
Kevin I'm in critical need to install Python Imaging Library on my
Kevin linux/cpanel server. I'm not very experienced and I almost always
Kevin have to use instalation guides.
Take a look at the BUILDME and README files in the top-level directory.
Skip
--
So far a couple of people have asked:
What's the situation in which you think you want different properties
for different instances of the same class?
Fair enough -- here goes:
Essentially what I'm doing is implementing (yes, yet another ;-)
'enumeration' class using an an approach which
Chris Perkins wrote:
[snip implementation]
While I think that func(x, ...) is more readable than partial(func, x),
I'm not sure that I would use either of them often enough to warrant
special syntax.
Interesting. Thought it might be worth listing a few of the current
places people use lambdas
Diez B. Roggisch wrote:
... corba is 10-100 times faster over
the network than soap/xmlrpc. ...
I'm not challenging these statistics (because I don't know),
but I would be interested in the source. Are you referring
to the results of an actual benchmark, or something more
subjective?
Steve
--
I i need a decorator that adds a local variable in the function it
decorates, probably related with nested scopes, for example:
def dec(func):
def wrapper(obj = None):
if not obj : obj = Obj()
bind obj to func
return func()
return wrapper()
@dec()
def fun(b):
obj.desc =
On Thu, 10 Mar 2005 18:56:41 +0100, bruno modulix [EMAIL PROTECTED] wrote:
G. Völkl wrote:
Hello,
I use a dictionary:
phone = {'mike':10,'sue':8,'john':3}
phone['mike'] -- 10
I want to know who has number 3?
3 -- 'john'
Note that you can have many keys with the same value:
phone
os.path.getsize(Inputdirectory + '\\' + Filename) works, but
os.path.getsize(Inputdirectory + '\\' + Filename.split('.') + '.ext')
Fails reporting no such file or directory
InputDirectory\\Filename.ext.
os.path.getsize(Inputdirectory + r'\' + Filename.split('.') + '.ext')
generates a syntax error.
Patrick Useldinger wrote:
John Machin wrote:
Just look at the efficiency of processing N files of the same size
S,
where they differ after d bytes: [If they don't differ, d = S]
PU: O(Nd) reading time, O(Nd) data comparison time [Actually (N-1)d
which is important for small N and
Steve,
Why don't you just pass a slice to itemgetter?
py for key, bereich in groupby(eingabe, itemgetter(slice(0, 2))):
WHOW, that is great! that makes it really simple, just have to structure
the SQL to make a real cut first, serve first structure.
Thanks to all who helped!
also the
John Machin wrote:
Maybe I was wrong: lawyers are noted for irritating precision. You
meant to say in your own defence: If there are *any* number (n = 2)
of identical hashes, you'd still need to *RE*-read and *compare*
Right, that is what I meant.
2. As others have explained, with a decent
vegetax wrote:
I i need a decorator that adds a local variable in the function it
decorates, probably related with nested scopes, for example:
def dec(func):
def wrapper(obj = None):
if not obj : obj = Obj()
bind obj to func
return func()
return wrapper()
@dec()
def fun(b):
@sir harlin
so you are saying that there is nothing wrong in this simple program.
On 12 Mar 2005 07:39:31 -0800, Harlin Seritt [EMAIL PROTECTED] wrote:
hah, this code is anything but simple...
--
http://mail.python.org/mailman/listinfo/python-list
--
Earl Eiland wrote:
I'm running an .exe in Python, using subProcess.Popen. The executable
writes data to a file I process later on in the program. Unfortunately,
my program returns the error no such file How do I block
execution until the external executable terminates?
Either:
1)
returncode
Steven Bethard wrote:
vegetax wrote:
I i need a decorator that adds a local variable in the function it
decorates, probably related with nested scopes, for example:
def dec(func):
def wrapper(obj = None):
if not obj : obj = Obj()
bind obj to func
return func()
Earl Eiland wrote:
os.path.getsize(Inputdirectory + '\\' + Filename) works, but
os.path.getsize(Inputdirectory + '\\' + Filename.split('.') + '.ext')
Fails reporting no such file or directory
InputDirectory\\Filename.ext.
No, that should be a TypeError. This will be easier if you copy and
paste
To generate path names take a look at os.path.join(see
http://docs.python.org/lib/module-os.path.html)
--
http://mail.python.org/mailman/listinfo/python-list
Gensek wrote:
PingGUI is a program that nobody but me knows anything about. If I
wanted help from people who are experts on it, I'd get nothing at all.
It appears as if that's the situation anyway, at least so far. But you
want wxPython help so you should ask for that instead. Something like
Why
Chris wrote:
hi,
thanks for all replies, I try if I can at least get the work done.
I guess my problem mainly was the rather mindflexing (at least for
me)
coding/decoding of strings...
But I guess it would be really helpful to put the
UnicodeReader/Writer
in the docs
UNFORTUNATELY the
vegetax wrote:
Steven Bethard wrote:
Have you considered using OO here? You might find that this is more
easily written as:
py class Object(object):
... pass
...
py class fun(object):
... def __new__(self, *args):
... if len(args) == 2:
... obj, b = args
...
Martin v. Löwis [EMAIL PROTECTED] wrote in message news:[EMAIL
PROTECTED]...
klappnase wrote:
enc = locale.nl_langinfo(locale.CODESET).lower()
Notice that this may fail on systems which don't provide the
CODESET information. Recent Linux systems (glibc 6) have it,
and so do recent
What i want is to declare in the decorator some code that is common to all
these functions, so the functions assume that the decorator will be there
and wont need to duplicate the code provided by it, and the functions are
not known ahead of time, it has to be dynamic.
This sounds like a call
[EMAIL PROTECTED] wrote:
I have a Python program that collects user input using
msg = Enter the full path and name of the file to be processed:
answer = raw_input(msg)
If I run it in IDLE, the question is splashed across the execution
window, and if it is long, simply wraps to the next line. Most
On Fri, 11 Mar 2005 14:04:26 -0800, jfj [EMAIL PROTECTED] wrote:
Hi.
Suppose this:
def foo (x):
print x
f = classmethod (foo)
class A: pass
a=A()
a.f = f
a.f()
# TypeError: 'classmethod' object is not callable!
###
I understand that this
Patrick Useldinger wrote:
John Machin wrote:
Maybe I was wrong: lawyers are noted for irritating precision. You
meant to say in your own defence: If there are *any* number (n =
2)
of identical hashes, you'd still need to *RE*-read and *compare*
Right, that is what I meant.
2. As
1 - 100 of 163 matches
Mail list logo