"Hamilton, William " <[EMAIL PROTECTED]> writes:
> > Why on earth would anyone prefer taking a failure in the field over
> > having a static type check make that particular failure impossible?
>
> Because static typechecking won't make that particular failure
> "impossible," but instead just chan
Steve Holden <[EMAIL PROTECTED]> writes:
> > Python even leaks the index variable of list comprehensions (I've
> > mostly stopped using them because of this), though that's a
> > recognized wart and is due to be fixed.
> >
> Wow, you really take non-pollution of the namespace seriously. I agree
> i
Twisted <[EMAIL PROTECTED]> writes:
> On Jul 7, 6:12 pm, Lew <[EMAIL PROTECTED]> wrote:
>> Twisted wrote:
>> Edward Dodge wrote:
>> >> So -- what magical computer app illuminates the entire room and shows
>> >> you how to use everything at the flip of a switch? This brilliant
>> >> discovery woul
Bruno Desthuilliers <[EMAIL PROTECTED]> writes:
> > Some users in fact recommend writing an explicit type signature for
> > every Haskell function, which functions sort of like a unit test.
>
> Stop here. explicit type signature == declarative static typing !=
> unit test.
The user-written signat
"Peter Decker" <[EMAIL PROTECTED]> writes:
> Imagine if you wrote applications where the default behavior did not
> do what was needed 99% of the time: how long do you think you'd be
> in business?
You seem to be complaining about the functionality of your mail user
agent (MUA) software. The mail
On Jul 8, 12:21 am, David <[EMAIL PROTECTED]> wrote:
> Hi,
>
> In matlab, I'd calculate the time for a script named test.m to run
> with:
>
> >> tic, run, toc
>
> Is there some way to do this in python on a mac os x from the terminal
> window? Or whatever?
The timeit module may be of use:
http://d
> Post the code.
ok.
here is the code:
# Echo server program
import socket
HOST = '' # Symbolic name meaning the local host
PORT = 50007 # Arbitrary non-privileged port
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.setsockopt(socket.SOL_SOCKET, socket.SO_REU
On Jul 7, 8:47 pm, "Nathan Harmston" <[EMAIL PROTECTED]>
wrote:
> Hi,
>
> I m thinking about writing some code which logs the input and output
> of a function/script and stores it in a database using sqlalchemy
> (although I havent started on this yet). I want to do this via a
> decorator ( I think
On Jul 5, 8:53 am, Christoph Zwerschke <[EMAIL PROTECTED]> wrote:
> What is the best way to re-raise any exception with a message
> supplemented with additional information (e.g. line number in a
> template)? Let's say for simplicity I just want to add "sorry" to every
> exception message.
OK, thi
i3dmaster <[EMAIL PROTECTED]> wrote:
>
>Then you can use other chars as the delimiter, [EMAIL PROTECTED]@b@ or r!a!b!,
>
>etc... The import thing is so long as the interpreter doesn't get
>confused on the data and the delimiter.
That limits the number of valid delimiters to a relatively small
Neil Hodgson wrote:
> Edward Diener:
>
>> Probably most reliable on Windows is a Windows API function, if it
>> exists, for getting the home directory, as opposed to using
>> environment variables, but I can not find any Windows API for it at
>> present.
>
>Look at SHGetFolderPath(CSIDL_PR
Peter Decker wrote:
> On 7/7/07, Kelvie Wong <[EMAIL PROTECTED]> wrote:
>> Ugh.. this would be a repost for the OP, but I forgot to hit "reply to
>> all" again.
>
>
> Imagine if you wrote applications where the default behavior did not
> do what was needed 99% of the time: how long do you think y
On Jul 7, 6:12 pm, Lew <[EMAIL PROTECTED]> wrote:
> Twisted wrote:
> Edward Dodge wrote:
> >> So -- what magical computer app illuminates the entire room and shows
> >> you how to use everything at the flip of a switch? This brilliant
> >> discovery would put Sam's, O'Reilly, the for-Dummies serie
On Jul 7, 4:58 pm, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
> On Sat, 07 Jul 2007 08:32:52 +0200, Hendrik van Rooyen wrote:
> >> erik,viking,"ham, spam and eggs","He said ""Ni!""","line one
> >> line two"
>
> >> That's 5 elements:
>
> >> 1: eric
> >> 2: viking
> >> 3: ham, spam and eggs
ahlongxp wrote:
> me again.
>
> "Connection reset by peer" happens about one in fifth.
> I'm using python 2.5.1 and ubuntu 7.04.
>
> --
> ahlongxp
>
> Software College,Northeastern University,China
> [EMAIL PROTECTED]://www.herofit.cn
>
>
Post the code.
Without it we can only help when o
Manlio Perillo <[EMAIL PROTECTED]> writes:
> I have just noticed that exception objects does not handle well
> Unicode arguments.
This error is unrelated to the fact that you created an exception
object.
> >>> e = RuntimeError(u'àèìòù')
> >>> str(e)
> Traceback (most recent call last):
> File
Edward Diener:
> Probably most reliable on Windows is a Windows API function, if it
> exists, for getting the home directory, as opposed to using environment
> variables, but I can not find any Windows API for it at present.
Look at SHGetFolderPath(CSIDL_PROFILE, ...) for Windows Me/2000 or
On 7/7/07, Kelvie Wong <[EMAIL PROTECTED]> wrote:
> Ugh.. this would be a repost for the OP, but I forgot to hit "reply to
> all" again.
Imagine if you wrote applications where the default behavior did not
do what was needed 99% of the time: how long do you think you'd be in
business?
The defaul
Boris Ozegovic wrote:
> Boris Ozegovic wrote:
>
>> Why do I get double new lines when geting data from server? Example:
>
> Fixed.
>
How? It's customary to include details when you've solved your own
problem in case someone else gets the same issue.
regards
Steve
--
Steve Holden+1
Boris Ozegovic wrote:
> Why do I get double new lines when geting data from server? Example:
Fixed.
--
Ne dajte da nas lažljivac Bandić truje:
http://cnn.blog.hr/arhiva-2007-06.html#1622776372
--
http://mail.python.org/mailman/listinfo/python-list
Why do I get double new lines when geting data from server? Example:
I have a following file:
--start-
Ovo je testni primjerak
--end---
And the code is:
conn = httplib.HTTPConnection("localhost:8000")
conn.request("GET", "/folder/index.html")
response = conn.g
Hi,
Are there any tests that will help me ensure that my Python
database driver conforms to the Database API v2.0 specification?
Thanks in advance.
Regards,
-MD
--
http://mail.python.org/mailman/listinfo/python-list
Rod Person ha escrito:
> I'm looking for a way to determine which window manager is running using
> python. I can't seem to find a system variable that hold this info.
I don't think one exists. You could check which process is running,
but that would be so web 1.0 (think javascript) it makes me si
[EMAIL PROTECTED] wrote:
> Hi to all, I have a little problem with unicode handling under Python.
>
> I have this code
>
> s = u'A unicode string with this damn apostrophe \x2019'
>
> outf = codecs.open('filename.txt', 'w', 'iso-8859-15')
> outf.write(s)
>
> what I obtain is a UnicodeEncodeErr
Twisted wrote:
Edward Dodge wrote:
>> So -- what magical computer app illuminates the entire room and shows
>> you how to use everything at the flip of a switch? This brilliant
>> discovery would put Sam's, O'Reilly, the for-Dummies series, and
>> virtually every other computer book publisher out
Ugh.. this would be a repost for the OP, but I forgot to hit "reply to
all" again.
This should do it:
os.execv(sys.argv[0], sys.argv)
Not sure how portable that statement is, though.
On 7/3/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I packaged up an application I am developing
On Jul 7, 4:13 pm, samwyse <[EMAIL PROTECTED]> wrote:
> On Jul 5, 8:53 am, Christoph Zwerschke <[EMAIL PROTECTED]> wrote:
>
> > What is the best way to re-raise any exception with a message
> > supplemented with additional information (e.g. line number in a
> > template)?
[...]
> That leaves the is
Does anyone know if there is a Phoenix (Arizona) based Python User
Group? If not, is there any interest out there to start one?
Personally, I'm motivated to help out with it..
If you are interest too (or know of an existing group I might of over-
looked) email mmarch at gmail dot com.
thanks!
-
On Jul 5, 8:53 am, Christoph Zwerschke <[EMAIL PROTECTED]> wrote:
> What is the best way to re-raise any exception with a message
> supplemented with additional information (e.g. line number in a
> template)? Let's say for simplicity I just want to add "sorry" to every
> exception message. My naive
On Jul 7, 4:26 pm, Edward Dodge <[EMAIL PROTECTED]> wrote:
> So -- what magical computer app illuminates the entire room and shows
> you how to use everything at the flip of a switch? This brilliant
> discovery would put Sam's, O'Reilly, the for-Dummies series, and
> virtually every other computer
Daniel:
> On Sat, 07 Jul 2007 21:35:40 +0300, David <[EMAIL PROTECTED]>
> wrote:
>> Is there a pretty printing utility for Python, something like Tidy for
>> HTML?
>
> Why not just write python as it should be written?
Oh, you write all the code you use yourself?
It's relatively common that you h
Twisted <[EMAIL PROTECTED]> writes:
> Besides, ANY interface that involves fumbling around in the dark
> trying to find a light switch is clunky. You should be able to see
> what the hell you're doing and navigate easily. Applications that not
> only eschew normal methods of navigation of the inte
David <[EMAIL PROTECTED]> wrote:
> Is there some way to do this in python on a mac os x from the terminal
> window? Or whatever?
You can use:
% time script.py
from the command line of the terminal
--
Lawrence, oluyede.org - neropercaso.it
"It is difficult to get a man to understand
something
On Sat, 07 Jul 2007 21:35:40 +0300, David <[EMAIL PROTECTED]>
wrote:
>
> All,
>
> Is there a pretty printing utility for Python, something like Tidy for
> HTML?
>
> That will change:
>
> xp=self.uleft[0]+percentx*(self.xwidth)
>
> To:
>
> xp = self.uleft[0] + percentx * (self.xwi
On 2007-07-07, Edward Diener <[EMAIL PROTECTED]> wrote:
> Thank you for responding. I hope Python will fix this problem.
Python: the language that fixes itself!
--
Grant Edwards grante Yow! I'm a GENIUS! I want
at to
On Sat, 2007-07-07 at 11:59 -0700, Paul McGuire wrote:
> On Jul 7, 1:47 pm, "Nathan Harmston" <[EMAIL PROTECTED]>
> wrote:
> > Hi,
> >
> > I m thinking about writing some code which logs the input and output
> > of a function/script and stores it in a database using sqlalchemy
> > (although I haven
Josiah Carlson wrote:
> Edward Diener wrote:
>> What is the generic operating system way of getting the home directory ?
>>
>> I am guessing it is os.path.expanduser("~"). Is there a better way or
>> an alternate way ?
>>
>> If it is as I surmise, the aforementioned expanduser("~") of os.path
>>
Hi,
In matlab, I'd calculate the time for a script named test.m to run
with:
>> tic, run, toc
Is there some way to do this in python on a mac os x from the terminal
window? Or whatever?
--
http://mail.python.org/mailman/listinfo/python-list
On Jul 7, 1:47 pm, "Nathan Harmston" <[EMAIL PROTECTED]>
wrote:
> Hi,
>
> I m thinking about writing some code which logs the input and output
> of a function/script and stores it in a database using sqlalchemy
> (although I havent started on this yet). I want to do this via a
> decorator ( I think
Hi,
I m thinking about writing some code which logs the input and output
of a function/script and stores it in a database using sqlalchemy
(although I havent started on this yet). I want to do this via a
decorator ( I think this is the best way ).
def log(fn):
def newfn(*args):
print
All,
Is there a pretty printing utility for Python, something like Tidy for
HTML?
That will change:
xp=self.uleft[0]+percentx*(self.xwidth)
To:
xp = self.uleft[0] + percentx * (self.xwidth)
And other formatting issues.
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
...
Ah, I answered you on the Italian NG before seeing you had also posted
the same request here. What I proposed there was (untested):
import codecs
_rimedi = { u'\x2019': "'" }
def rimedia(exc):
if isinstance(exc, (UnicodeEncodeError, Unic
Hi all.
I have just noticed that exception objects does not handle well Unicode
arguments.
>>> e = RuntimeError(u'àèìòù')
>>> str(e)
Traceback (most recent call last):
File "", line 1, in ?
UnicodeEncodeError: 'ascii' codec can't encode characters in position
0-4: ordinal not in range(128)
>>
K Gaur <[EMAIL PROTECTED]> wrote:
> this is what the python interpreter returns on giving the basic
> command
>
> >>>pickle.dump(x,f) where x is a tuple and f is a file object
>
> Traceback (most recent call last):
> File "", line 1, in ?
> NameError: name 'pickle' is not defined
>
> k
In article <[EMAIL PROTECTED]>,
=?utf-8?b?U3TDqXBoYW5l?= Larouche <[EMAIL PROTECTED]> wrote:
>Aahz pythoncraft.com> writes:
>>
>> Can you reproduce your problem with stub code that only creates threads?
>> If yes, that indicates that you're messing with a thread structure
>> somewhere. Note that
hello everybody
I've just started learning python . i stumbled upon this broad
spectrum function 'pickle'
but it is not getting executed as it should
this is what the python interpreter returns on giving the basic
command
>>>pickle.dump(x,f) where x is a tuple and f is a file object
Tra
Edward Diener wrote:
> What is the generic operating system way of getting the home directory ?
>
> I am guessing it is os.path.expanduser("~"). Is there a better way or an
> alternate way ?
>
> If it is as I surmise, the aforementioned expanduser("~") of os.path
> seems incorrect to me under W
> Actually I am using wxPython for a GUI front-end. Thus, it is already
> in a class. I am not sure how to apply your idea to a program that is
> already running in an infinite event loop.
I don't know wxPython, but I was able to grab an example program and
adapt it to do what I think you are ask
Kirk Strauser wrote:
> In article <[EMAIL PROTECTED]>,
> Kirk Strauser <[EMAIL PROTECTED]> wrote:
>
>> I was thinking about how a lot of Lisp proponents claim that Lisp is
>> inherently parallelizable because its functions don't have (or are not
>> supposed to have) side effects, and therefore th
On Jul 7, 6:27 am, John Machin <[EMAIL PROTECTED]> wrote:
> On Jul 7, 4:59 pm, David <[EMAIL PROTECTED]> wrote:
>
> > Hi,
>
> > Very new to python. When I uncomment the line
> > #self.im.putpalette(mkpalette())
>
> Try to focus in on where the nasty is happening:
>
>p = mkpalette()
>
me again.
"Connection reset by peer" happens about one in fifth.
I'm using python 2.5.1 and ubuntu 7.04.
--
ahlongxp
Software College,Northeastern University,China
[EMAIL PROTECTED]://www.herofit.cn
--
http://mail.python.org/mailman/listinfo/python-list
> I agree, but the problem is much subtle. I have coverted a text from
> iso-8859-1 to utf-8 and the codecs have translated \x27 ( the iso
> apostrophe ) to \xe28099 in utf-8 ( or u'2019' in unicode code point
> notation )
What software did you use to make that so? The Python codec certainly
never
> No it shouldn't because \x2019 is a "right single quotation mark" and not
> an apostrophe.
>
> Ciao,
> Marc 'BlackJack' Rintsch
I agree, but the problem is much subtle. I have coverted a text from
iso-8859-1 to utf-8 and the codecs have translated \x27 ( the iso
apostrophe ) to \xe28099
Aahz pythoncraft.com> writes:
> Can you reproduce your problem with stub code that only creates threads?
> If yes, that indicates that you're messing with a thread structure
> somewhere. Note that because you're using gcc, it's possible there's a
> thread bug on Windows with your tool chain. Yo
On Sat, 07 Jul 2007 16:06:03 +, [EMAIL PROTECTED] wrote:
> Hi to all, I have a little problem with unicode handling under Python.
>
> I have this code
>
> s = u'A unicode string with this damn apostrophe \x2019'
>
> outf = codecs.open('filename.txt', 'w', 'iso-8859-15')
> outf.write(s)
>
>
Hi to all, I have a little problem with unicode handling under Python.
I have this code
s = u'A unicode string with this damn apostrophe \x2019'
outf = codecs.open('filename.txt', 'w', 'iso-8859-15')
outf.write(s)
what I obtain is a UnicodeEncodeError that says me that character \x2019
maps to
I'm looking for a way to determine which window manager is running using
python. I can't seem to find a system variable that hold this info.
--
Rod
"it takes an unusual mind to see the obvious."
- Alfred Whitehead
signature.asc
Description: This is a digitally signed message part
--
http://ma
Hi, everyone,
I'm implementing a simple client/server protocol.
Now I've got a situation:
client will send server command,header paires and optionally body.
server checks headers and decides whether to accept(read) the body.
if server decided to throw(dump) the request's body, it'll send
how would MAXBUFFERSIZE be taken care in python;
--abhi
On 7/7/07, Steven D'Aprano <[EMAIL PROTECTED]> wrote:
On Fri, 06 Jul 2007 17:31:50 +, DeveloperX wrote:
> Python Attempt: Please note that since I can't type TABs online
> easily, I am using the @ character to represent TABs in the f
I am working on a script that utilizes tk in order to connect users to an
online account. It must be done on their personal machines and I would like
to have them use a gui. Is there a method that can take text and make it
unreadable (like password form in html)?
thanks -J
--
http://mail.python.o
In article <[EMAIL PROTECTED]>,
=?utf-8?b?U3TDqXBoYW5l?= Larouche <[EMAIL PROTECTED]> wrote:
>Aahz pythoncraft.com> writes:
>> In article python.org>,
>> =?utf-8?b?U3TDqXBoYW5l?= Larouche polymtl.ca> wrote:
>>>
>>>If I call the methods in the C++ modules from the Python main thread, I
>>>don't
On Jul 7, 4:59 pm, David <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Very new to python. When I uncomment the line
> #self.im.putpalette(mkpalette())
Try to focus in on where the nasty is happening:
p = mkpalette()
# self.im.putpalette(p)
> in the following code, I get the error:
>
> pyt
Hi,
My application has a tree control in which a user can select a filter.
This filter is then applied to the results and the results are
constructed in the ListControl (report style) widget.
This all works fine.
Recently I added the wx.lib.mixins.listctrl.ColumnSorterMixin mixin to
the ListC
Hi,
I'm trying to write a ftp in python to send files to my webserverr.
Curtly I will change the directory to the folder name, down load the
file, then do a chnag dir ..\ to go back to the root diretory, chnag
the directory, save the file, do a ../.
Instad of going back one directory by doing ..\
On Jul 2, 7:12 pm, John Machin <[EMAIL PROTECTED]> wrote:
> On Jul 3, 9:02 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>
> > Hi,
>
> > My program has the following code to transfer a binary file
>
> > f = open(pathanme+filename,'rb')
> > print "start transfer"
> > sel
On Jul 2, 7:07 pm, Adonis Vargas <[EMAIL PROTECTED]>
wrote:
> [EMAIL PROTECTED] wrote:
> > Hi,
>
> > My program has the following code to transfer a binary file
>
> > f = open(pathanme+filename,'rb')
> > print "start transfer"
> > self.fthHandle.storbinary('STOR '+filename,
Howdy
I ran into a difference between Python on Windows XP and Linux Fedora
6.
Writing a dom to xml with minidom works on Linux. It gives an error on
XP if there is an empty namespace. The problem was handled in CVS a
while ago.
http://mail.python.org/pipermail/xml-sig/2003-October/009904.html
Gerard Flanagan wrote:
> Would a decorator work here?
Depends on how you want to use that functionality. In my use case I only
need to catch the excpetion once.
Note that in your code the exception has not the right type which is
what I targeted in my last posting. I.e. the following will raise
Hi,
Very new to python. When I uncomment the line
#self.im.putpalette(mkpalette())
in the following code, I get the error:
python $ ./mandelbrot.py
Python(2860) malloc: *** Deallocation of a pointer not malloced:
0xff00; This could be a double free(), or free() called with the
middle
On Sat, 07 Jul 2007 08:32:52 +0200, Hendrik van Rooyen wrote:
>> erik,viking,"ham, spam and eggs","He said ""Ni!""","line one
>> line two"
>>
>> That's 5 elements:
>>
>> 1: eric
>> 2: viking
>> 3: ham, spam and eggs
>> 4: He said "Ni!"
>> 5: line one
>>line two
>
> Also true - What can I sa
>
> How do I install SIP? I can't seem to do this. I've downloaded the
> package and read the README file, but I don't see a way of installing
> it on windows. I ran the configure.py file but then it generates
> makefiles to run which can't be run on windows. I also attempted to
> download QT but
71 matches
Mail list logo