how to remove the blank lines?

2006-12-08 Thread boyeestudio
The following program have the same function as the linux's command:tail -f logfile.log But it print a lot of blank lines while showing on the stdout. How to fix this problem and let it go ahead always showing the end line as the log file's increasing. #tail.py: import os import sys class Tail:

Re: Video stream server

2006-12-08 Thread Lad
Hi Paul, I checked your video strem server.It seems interesting for me. Can you please answer these questions? 1. What is a price? 2.Do you support FLV format files, if not, why? 3. How many users do already use the server? 4. Can you name any of your customers ? Thank you Lad, Paul Boddie wrot

Re: python.org not current

2006-12-08 Thread Norbert
On 8 Dez., 08:40, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > Norbert wrote: > > the python websitehttp://www.python.org/mentions Version 2.3.6 and > > 2.4.4 on the most prominent place. Shouldn't this be changed to 2.5.x > > ?you're looking at the news section: the 2.3.6 and 2.4.4 maintenance >

Re: Need Help Parsing From File

2006-12-08 Thread Duncan Booth
Gabriel Genellina <[EMAIL PROTECTED]> wrote: > For the Borland C++ 3.1 help (about 1991): > If "t" or "b" is not given in the string, the mode is governed by > _fmode. > If _fmode is set to O_BINARY, files are opened in binary mode. > If _fmode is set to O_TEXT, they are opened in

autoadd class properties

2006-12-08 Thread manstey
I have a ClassWrapper that wraps around a third party database object. Each database object has a set of properties, like columns in a relational database. I want my wrapper to generate a property for each database object and load its value into it. Thus, in my database (which is an oodbms) say I

Re: Need Help Parsing From File

2006-12-08 Thread Gabriel Genellina
At Friday 8/12/2006 05:30, Duncan Booth wrote: > For the Borland C++ 3.1 help (about 1991): > If "t" or "b" is not given in the string, the mode is governed by > _fmode. > If _fmode is set to O_BINARY, files are opened in binary mode. > If _fmode is set to O_TEXT, they are opened

Re: autoadd class properties

2006-12-08 Thread Gabriel Genellina
At Friday 8/12/2006 05:38, manstey wrote: Is this clear? I'm sorry, not for me. Some code showing how things are used now and how you would like it to be, would help. -- Gabriel Genellina Softlab SRL __ Correo Yahoo! Espacio para todos tus

Re: SOAP Server with WSDL?

2006-12-08 Thread vasudevram
Ravi Teja wrote: > tobiah wrote: > > Actually, do I have to make a WSDL? Do people hand write these, or > > are there tools? I don't really need to publish an interface. I just > > want some in house apps to communicate. > > Java and .NET based tools can auto-generate WSDL from code. Python doe

Re: Common Python Idioms

2006-12-08 Thread George Sakkis
Steven D'Aprano wrote: > On Thu, 07 Dec 2006 13:52:33 -0800, George Sakkis wrote: > > > I'm surprized that none of these pages mentions the incompatible type > > comparison gotcha: > > > 5 < "4" > > True > > > > I'm sure this has bitten many folks, particularly (ex) Perl'ers. > > Why is this

Re: autoadd class properties

2006-12-08 Thread George Sakkis
manstey wrote: > I have a ClassWrapper that wraps around a third party database object. > Each database object has a set of properties, like columns in a > relational database. > > I want my wrapper to generate a property for each database object and > load its value into it. > > Thus, in my datab

Re: I think Python is a OO and lite version of matlab

2006-12-08 Thread George Sakkis
Allen wrote: > Does anyone agree with me? > If you have used Matlab, welcome to discuss it. Sure, and earth is a heavy version of a basketball. If all you have is a hammer... George -- http://mail.python.org/mailman/listinfo/python-list

Re: I think Python is a OO and lite version of matlab

2006-12-08 Thread Allen
> Sure, and earth is a heavy version of a basketball. If all you have is > a hammer... > It is not make sense to compare earth and basketball. I think Python introduced many idea of matlab. If you have used matlab, you will say that they are very very similar, except that matlab was born years e

Re: Best way to split up lines - RE: About the 79 character linerecommendation

2006-12-08 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Gabriel Genellina wrote: > At Thursday 7/12/2006 16:46, Roy Smith wrote: > >>I see your point. Actually, I think you want to force the sequences to be >>lists (regardless of what syntax we end up with), on the theory that tuples >>are for heterogeneous sequences and lists

Re: I think Python is a OO and lite version of matlab

2006-12-08 Thread Fredrik Lundh
Allen wrote: > It is not make sense to compare earth and basketball. why not? they're both round, so surely they must have been inspired by each other. the question is if humanity invented balls before we figured out that the earth is round, or if it's the other way around... -- http://mai

Re: how to remove the blank lines?

2006-12-08 Thread Peter Otten
boyeestudio wrote: > The following program have the same function as the linux's command:tail > -f logfile.log > But it print a lot of blank lines while showing on the stdout. > How to fix this problem and let it go ahead always > showing the end line as the log file's increasing. > > #tail.py: >

why is this different?

2006-12-08 Thread Schüle Daniel
Hello snakes :) In [38]: f = [lambda:i for i in range(10)] In [39]: ff = map(lambda i: lambda : i, range(10)) In [40]: f[0]() Out[40]: 9 In [41]: f[1]() Out[41]: 9 In [42]: ff[0]() Out[42]: 0 In [43]: ff[1]() Out[43]: 1 I don't understand why in the first case f[for all i in 0..9]==9 what is diff

Re: dict.has_key(x) versus 'x in dict'

2006-12-08 Thread Roel Schroeven
Hendrik van Rooyen schreef: > <[EMAIL PROTECTED]> wrote: > >> Hendrik> - as long as it works, and is fast enough, its not broken, so >> Hendrik> don't fix it... >> >> That's the rub. It wasn't fast enough. I only realized that had been a >> problem once I fixed it though. > > LOL - this

apache & mod_python

2006-12-08 Thread m.banaouas
Hi, bonjour, witch versions are suitable to use for apache & mod_python ? Can i install and use "Apache 2.2.3" & "mod_python 3.2.10" (most recent versions) without facing any known major issue ? thanks for any help. -- http://mail.python.org/mailman/listinfo/python-list

merits of Lisp vs Python

2006-12-08 Thread Mark Tarver
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 my general education. Mark -- http://mail.python.org/mailman/listinfo/python-list

Re: apache & mod_python

2006-12-08 Thread Maxim Sloyko
m.banaouas wrote: > Can i install and use "Apache 2.2.3" & "mod_python 3.2.10" (most recent > versions) without facing any known major issue ? Works fine for me. The only "known major issue" you can face is general non-threadsafety of Python interpreter. So, if you are using Apache MPM, you have

Re: Subprocess with a Python Session?

2006-12-08 Thread Paul Boddie
Hendrik van Rooyen wrote: > "Giovanni Bajo" <[EMAIL PROTECTED]> > > > > Yeah, but WHY was the API designed like this? Why can't I read and write > > freely from a pipe connected to a process as many times as I want? > > you can - all you have to do is to somehow separate the "records" - else how >

Re: merits of Lisp vs Python

2006-12-08 Thread Mathias Panzenboeck
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 my general education. > > Mark > I do not know much about Lisp. What I

Re: I think Python is a OO and lite version of matlab

2006-12-08 Thread Gabriel Genellina
On 8 dic, 06:57, "Allen" <[EMAIL PROTECTED]> wrote: > > If you have used matlab, you will say that they are very very similar, > except that matlab was born years earlier and is used mainly in the > area > of matrix calculation. > > I do not mean Python shall feel ashamed for it. We will be pleased

Re: merits of Lisp vs Python

2006-12-08 Thread Paul Rubin
"Mark Tarver" <[EMAIL PROTECTED]> writes: > How do you compare Python to Lisp? What specific advantages do you > think that one has over the other? -- http://mail.python.org/mailman/listinfo/python-list

Re: Common Python Idioms

2006-12-08 Thread Daniel Dittmar
John Machin wrote: > No it doesn't look wrong to anyone who has read the docs on > sys.modules. My point was really that there is no obvious implementation for 'in' on dictionaries, so it should have been left out. And that GvR thought so for quite some time as well (until he got mixed up with

Re: why is this different?

2006-12-08 Thread Gabriel Genellina
On 7 dic, 22:53, Schüle Daniel <[EMAIL PROTECTED]> wrote: > In [38]: f = [lambda:i for i in range(10)] > In [39]: ff = map(lambda i: lambda : i, range(10)) > In [40]: f[0]() > Out[40]: 9 > In [41]: f[1]() > Out[41]: 9 > In [42]: ff[0]() > Out[42]: 0 > In [43]: ff[1]() > Out[43]: 1 > > I don't unde

Re: merits of Lisp vs Python

2006-12-08 Thread Mark Tarver
Paul Rubin wrote: > "Mark Tarver" <[EMAIL PROTECTED]> writes: > > How do you compare Python to Lisp? What specific advantages do you > > think that one has over the other? > > Thanks; a quick read of your reference to Norvig's a

Re: merits of Lisp vs Python

2006-12-08 Thread Fredrik Lundh
Mark Tarver wrote: > seems to show that Python is a cut down (no macros) version of Lisp > with a worse performance. "can be seen as, by a Lisp programmer", perhaps. it's not like anybody set out to make a Lisp-with-other-syntax but "failed"... -- http://mail.python.org/mailman/listinfo/p

Re: merits of Lisp vs Python

2006-12-08 Thread Richard Brodie
"Mark Tarver" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > seems to show that Python is a cut down (no macros) version of Lisp > with a worse performance. Performance claims are always controversial. So, Python is much slower doing array multiplication, when you hand roll it, i

Re: why is this different?

2006-12-08 Thread Schüle Daniel
Gabriel Genellina schrieb: Gabriel Genellina schrieb: > On 7 dic, 22:53, Schüle Daniel <[EMAIL PROTECTED]> wrote: > >> In [38]: f = [lambda:i for i in range(10)] >> In [39]: ff = map(lambda i: lambda : i, range(10)) >> In [40]: f[0]() >> Out[40]: 9 >> In [41]: f[1]() >> Out[41]: 9 >> In [42]: ff[0

Re: merits of Lisp vs Python

2006-12-08 Thread Istvan Albert
Mark Tarver wrote: > seems to show that Python is a cut down (no macros) version of Lisp > with a worse performance. or maybe it shows that Lisp is an obfuscated version of Python with lots of parentheses, backward logic, and complicated constructs that run faster. i. -- http://mail.python.org

Re: merits of Lisp vs Python

2006-12-08 Thread Tim Chase
> How do you compare Python to Lisp? What specific advantages do you > think that one has over the other? Easy... Python reads like pseudocode Lisp reads like line-noise (much like most Perl or Ruby code) Python makes better use of my time as a programmer because it maps fairly closely to how

Re: Video stream server

2006-12-08 Thread Paul Boddie
Lad wrote: > I checked your video strem server.It seems interesting for me. It's not my software, I'm afraid. I just read enough of Planet GNOME to have become aware of the activities of various people, including people who work at Fluendo [1] - the principal developers of that software. > Can y

Re: dict.has_key(x) versus 'x in dict'

2006-12-08 Thread Roel Schroeven
Roel Schroeven schreef: > Have you never experienced the following: > > A customer reports a bug. Upon investaging you find the source of the > problem, but from studying the code you don't understand anymore how it > has ever been able to function correctly. From that moment, it indeed > stops

Re: I think Python is a OO and lite version of matlab

2006-12-08 Thread Harry George
Fredrik Lundh <[EMAIL PROTECTED]> writes: > Allen wrote: > > > It is not make sense to compare earth and basketball. > > why not? they're both round, so surely they must have been inspired > by each other. the question is if humanity invented balls before we > figured out that the earth is rou

Re: merits of Lisp vs Python

2006-12-08 Thread Harry George
"Mark Tarver" <[EMAIL PROTECTED]> writes: > Paul Rubin wrote: > > "Mark Tarver" <[EMAIL PROTECTED]> writes: > > > How do you compare Python to Lisp? What specific advantages do you > > > think that one has over the other? > > > >

Re: merits of Lisp vs Python

2006-12-08 Thread Alex Mizrahi
(message (Hello 'Richard) (you :wrote :on '(Fri, 8 Dec 2006 14:08:09 -)) ( ??>> seems to show that Python is a cut down (no macros) version of Lisp ??>> with a worse performance. RB> Performance claims are always controversial. So, Python is much slower RB> doing array multiplication, wh

IPython 0.7.3 beta 2 is out!

2006-12-08 Thread Ville Vainio
Yes, next version of IPython is closing in on final release around the years end, with lots of new exiting features (full list TBD, but it *does* include proper python 2.5 support if that's what you've been waiting for). Get the 0.7.3 beta 2 it at http://projects.scipy.org/ipython/ipython/wiki/Re

Re: merits of Lisp vs Python

2006-12-08 Thread Alex Mizrahi
(message (Hello 'Istvan) (you :wrote :on '(8 Dec 2006 06:11:20 -0800)) ( ??>> seems to show that Python is a cut down (no macros) version of Lisp ??>> with a worse performance. IA> or maybe it shows that Lisp is an obfuscated version of Python hell no, lisp's syntax is much easier than pytho

Re: raw strings in regexps

2006-12-08 Thread Mike
"Gabriel Genellina" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] ... > You have to quote metacharacters if you want to match them. The escape > method is useful for this: > > >>> re.escape('(a)') > '\\(a\\)' Doh! Of course! Thanks everyone. -- Mike -- -- http://mail.python.o

Re: merits of Lisp vs Python

2006-12-08 Thread Ken Tilton
Mark Tarver wrote: > How do you compare Python to Lisp? Lisp programmers are smarter and better looking. And better programmers. Not sure if that is what you were after, though. > What specific advantages do you > think that one has over the other? http://www.googlefight.com/index.php?lang=e

Re: merits of Lisp vs Python

2006-12-08 Thread Wade Humeniuk
Mark Tarver wrote: > How do you compare Python to Lisp? What specific advantages do you > think that one has over the other? > Since the late 1950's Lisp has participated in the development of modern (present day) programming practises. It has shaped and been shaped by the minds of just not pro

Python's email module - problem with umlauts in some email clients

2006-12-08 Thread Nico Grubert
Hi there, I wrote a short python script that sends an email using python's email module and I am using Python 2.3.5. The problem is, that umlauts are not displayed properly in some email clients: + On a windows machine running thunderbird 1.0.2 umlauts are displayed properly. The email he

Re: Python's email module - problem with umlauts in some email clients

2006-12-08 Thread Fredrik Lundh
Nico Grubert wrote: > + On a solaris machine running thunderbird 1.5.0.8 and on a macintosh > machine running eudora umlauts are *not* displayed properly. > The email header does not contain any "Content-type". If I manually > switch the email client's character encoding to "Unicode (UTF-8)"

Re: merits of Lisp vs Python

2006-12-08 Thread Richard Brodie
"Alex Mizrahi" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > heh, do you have "standard numeric packages" for everything? maybe then we'll > make > standard programs for everything -- that will obsolete "slow" "custom > scripts" and we'll > just use shell to select what progr

Re: I think Python is a OO and lite version of matlab

2006-12-08 Thread Godson
On 8 Dec 2006 01:57:20 -0800, Allen <[EMAIL PROTECTED]> wrote: > Sure, and earth is a heavy version of a basketball. If all you have is > a hammer... > It is not make sense to compare earth and basketball. I think Python introduced many idea of matlab. If you have used matlab, you will say th

IMAP4 SEARCH question

2006-12-08 Thread Laszlo Nagy
Hi, I'm using imaplib to access an IMAP4 server. I'm reading the IMAP4 specification, and I found something odd. The search command can be used in conjuction with date values. For example, I would like to search for messages that are older than 30 days. However, the IMAP4 specs does not def

Re: why is this different?

2006-12-08 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Schüle Daniel wrote: > I have two more examples, but now I understand the difference > > In [70]: x = [eval("lambda:i") for i in range(10)] > In [71]: y = [eval("lambda:%i" % i) for i in range(10)] > > I think [71] is most obvious what the programmer intends But unnecess

Re: merits of Lisp vs Python

2006-12-08 Thread Rob Thorpe
Mathias Panzenboeck wrote: > 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 my general education. > > > > Mark >

Re: Common Python Idioms

2006-12-08 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Daniel Dittmar wrote: > John Machin wrote: >> No it doesn't look wrong to anyone who has read the docs on >> sys.modules. > > My point was really that there is no obvious implementation for 'in' on > dictionaries, so it should have been left out. And that GvR thought so

Re: merits of Lisp vs Python

2006-12-08 Thread Kay Schluehr
Alex Mizrahi schrieb: > it's also > interesting, that python, perl, php and ruby show very similar peformance, > while lisp and scheme implementations show large improvements -- it makes me > think that there's something "pathalogically scripting" in their > specifications (maybe some obligatory u

Re: IMAP4 SEARCH question

2006-12-08 Thread Laszlo Nagy
Sorry, I found it: date= date-text / DQUOTE date-text DQUOTE date-day= 1*2DIGIT ; Day of month date-day-fixed = (SP DIGIT) / 2DIGIT ; Fixed-format version of date-day date-month = "Jan" / "Feb" / "Mar" / "Apr" / "May" / "Jun" / "Jul" / "Aug" / "Sep" / "O

Re: merits of Lisp vs Python

2006-12-08 Thread Carl Banks
Mark Tarver wrote: > This confirms my suspicion > that Lisp is losing out to newbies because of its > lack of standard support for the things many people want to do. Whoa there, that's a pretty big logical jump there, don't you think? Consumer choice can never be boiled down to one thing; there a

Re: merits of Lisp vs Python

2006-12-08 Thread hankhero
One overlooked advantage for Lisp over Python is a better development environment, for me that means Slime for Lisp. For Python I have several years of experience with IDLE and the win32 Ide, and Slime is the winner. Press a key and the function you are editing is recompiled and loaded into memory.

Re: Subprocess with a Python Session?

2006-12-08 Thread Fredrik Lundh
Paul Boddie wrote: > This is one of the more reliable methods since upon receiving a packet > "delimiter" the receiver knows that the data is complete. and for people who want RELIABLE and not just "at least not entirely unreliable", there's always: http://cr.yp.to/proto/netstrings.txt (i

Re: IMAP4 SEARCH question

2006-12-08 Thread Laszlo Nagy
Laszlo Nagy wrote: Sorry, I found it: date= date-text / DQUOTE date-text DQUOTE date-day= 1*2DIGIT ; Day of month date-day-fixed = (SP DIGIT) / 2DIGIT ; Fixed-format version of date-day date-month = "Jan" / "Feb" / "Mar" / "Apr" / "May" / "Jun" / "Jul"

Text Encoding - Like Wrestling Oiled Pigs

2006-12-08 Thread apotheos
So I've got a problem. I've got a database of information that is encoded in Windows/CP1252. What I want to do is dump this to a UTF-8 encoded text file (a RSS feed). While the overall problem seems to be related to the conversion, the only error I'm getting is a "UnicodeDecodeError: 'ascii' cod

Re: merits of Lisp vs Python

2006-12-08 Thread Fredrik Lundh
Carl Banks wrote: > Consumer choice can never be boiled down to one thing; there are so > many factors. No one knows the whole answer. I certainly don't. it's all due to Python's humongous marketing budget, of course. just imagine what would have happened if someone had spent that much VC mon

Re: merits of Lisp vs Python

2006-12-08 Thread Soni Bergraj
Mark Tarver wrote: > seems to show that Python is a cut down (no macros) version of Lisp > with a worse performance. If you wont to put it this way, go for it. But if you care to give it a closer look, you may understand that Pythons main advantage is not seizable by feature and performance charts

Re: Subprocess with a Python Session?

2006-12-08 Thread Paul Boddie
Fredrik Lundh wrote: > Paul Boddie wrote: > > > This is one of the more reliable methods since upon receiving a packet > > "delimiter" the receiver knows that the data is complete. > > and for people who want RELIABLE and not just "at least > not entirely unreliable", there's always: > > http:

Re: merits of Lisp vs Python

2006-12-08 Thread Bjoern Schliessmann
Alex Mizrahi wrote: > hell no, lisp's syntax is much easier than python's since it's > homogenous Can you give an example? I cannot imagine how homogenity always results in easiness. > (and certainly lisp was invented much 30 years before > Python, so that's Python uses Lisp features) I think

Re: merits of Lisp vs Python

2006-12-08 Thread George Sakkis
Alex Mizrahi wrote: > (message (Hello 'Istvan) > (you :wrote :on '(8 Dec 2006 06:11:20 -0800)) > ( > > ??>> seems to show that Python is a cut down (no macros) version of Lisp > ??>> with a worse performance. > > IA> or maybe it shows that Lisp is an obfuscated version of Python > > hell no, l

Re: merits of Lisp vs Python

2006-12-08 Thread André Thieme
hankhero schrieb: > Some clever details, like using minus to index vectors from the right. > (aref "hello" -1) gives an error on Lisp, but the character o on Python. It would not be difficult to add this feature to Lisp. > Another detail I like is that you can choose how to quote strings, in >

Re: [ctypes-users] comtypes

2006-12-08 Thread Niki Spahiev
Thomas Heller wrote: > comtypes seems to gain some attention (comtypes is a pure Python, lightweight > COM client and server framework, based on the ctypes Python FFI package.) > > I'll try to release a new version over the next days. > > However, I'm wondering what would be the correct list to d

shell command needs whitespace characters escaped

2006-12-08 Thread metaperl
I downloaded a file which has a space in the filename. I want to run a shell unzip on it, but it fails in my current code: syscmd = "cd %s ; unzip %s" % (self.storage.input, file.basename()) os.system(syscmd) because no escaping was done. Is there a more principled way to constru

Re: merits of Lisp vs Python

2006-12-08 Thread Petter Gustad
Bjoern Schliessmann <[EMAIL PROTECTED]> writes: > Can you give an example? I cannot imagine how homogenity always > results in easiness. CL-USER> (+ 1 2 3 4 5 6 7 8 9 10) 55 CL-USER> (< 1 2 3 4 5 6 7 8 9 10) T CL-USER> (< 1 2 3 4 5 6 7 8 9 10 9) NIL Petter -- A: Because it messes up the order

py2exe install script problem

2006-12-08 Thread Croteam
Hello, I using py2exe for my script installing,and I have one problem about it,actually the real problem is tkinter window iconbitmap: import Tkinter root=Tkinter.Tk() root.iconbitmap('myicon.ico') # I was try and with myicon.bmp Then after I install myscript in .exe,and when I run it I

Re: How to create a global hotkey?

2006-12-08 Thread k04jg02
Sorry, I should have mentioned that I'm running Linux, and I only will be running this app while X is running. pyHook doesn't seem to be an option because it's win32 only. I'm guessing python-xlib is the way to go, but it seems to be that it relies on you understanding the C xlib library, which is

Re: merits of Lisp vs Python

2006-12-08 Thread Bill Atkins
Bjoern Schliessmann <[EMAIL PROTECTED]> writes: > I think you acknowledged that the syntax is different and not > borrowed? Um, so does that mean that Python couldn't have borrowed other features? -- http://mail.python.org/mailman/listinfo/python-list

Re: merits of Lisp vs Python

2006-12-08 Thread Bill Atkins
"Mark Tarver" <[EMAIL PROTECTED]> writes: > 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 my general education. > > Mark What was the reason

Re: Common Python Idioms

2006-12-08 Thread Daniel Dittmar
Marc 'BlackJack' Rintsch wrote: > If ``in`` shouldn't work with dictionaries, either `__contains__()` must > be implemented to throw an exception or dictionaries shouldn't be iterable. I agree completely (in the sense that dictionaries shouldn't be iterable directly). Probably even more strongly,

Re: merits of Lisp vs Python

2006-12-08 Thread George Sakkis
André Thieme wrote: > On the other hand can I see difficulties in adding macros to Python, > or inventing a new object system, or adding new keywords without > changing the sources of Python itself. Actually, an even bigger difficulty is the rejection of programmable syntax by Guido, both for the

Re: shell command needs whitespace characters escaped

2006-12-08 Thread Klaus Alexander Seistrup
Metaperl wrote: > I downloaded a file which has a space in the filename. I want > to run a shell unzip on it, but it fails in my current code: > > syscmd = "cd %s ; unzip %s" % (self.storage.input, file.basename()) > os.system(syscmd) > > because no escaping was done. Using "cd '

Re: merits of Lisp vs Python

2006-12-08 Thread Alex Mizrahi
(message (Hello 'Kay) (you :wrote :on '(8 Dec 2006 08:03:18 -0800)) ( KS> http://www.sbcl.org/manual/Handling-of-Types.html#Handling-of-Types KS> If you'd read the docs of the tools you admire you might find the KS> answers yourself. SBCL is a COMPILER that explains everything. it's interest

Problem in reading a URL

2006-12-08 Thread Χρυσάνθη Αϊναλή
Hi, I get an error, when I am trying to read URL. Where is the Problem? Thank u very much for all ideas!!! sincerely Chrysanthi from urllib2 import * filename=urlopen('http://www.ncbi.nlm.nih.gov/entrez/viewer.fcgi?query_key=1&db=nucleotide&qty=1&c_start=1&uids=&dopt=fasta&dispmax=20&sendto=

Re: shell command needs whitespace characters escaped

2006-12-08 Thread Fredrik Lundh
metaperl wrote: > I downloaded a file which has a space in the filename. I want to run a > shell unzip on it, but it fails in my current code: > > syscmd = "cd %s ; unzip %s" % (self.storage.input, > file.basename()) > os.system(syscmd) > > because no escaping was done. > > Is t

MySQL-python-1.2.1_p2, Python 2.5 and OS X Tiger

2006-12-08 Thread scum
How do you install MySQL-python-1.2.1_p2 on a PPC OS X 10.4 machine with MySQL 4.1? >>> python setup.py build ... ... _mysql.c:2854: error: parse error before ')' token _mysql.c:2854: error: called object '&' is not a function _mysql.c:2854: error: called object '&' is not a function _mysql.c:285

Re: MySQL-python-1.2.1_p2, Python 2.5 and OS X Tiger

2006-12-08 Thread scum
And I know about the precompiled binary... I'm just sick of getting this warning Python 2.5 (r25:51918, Sep 19 2006, 08:49:13) [GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import _mysql __main__:1: RuntimeWa

Re: Problem in reading a URL

2006-12-08 Thread Fredrik Lundh
Χρυσάνθη Αϊναλή wrote: > I get an error, when I am trying to read URL. > Where is the Problem? did you read the error message you got from the server? > Error: History is unavailable either because it has expired or because > your system cannot accept href='/entrez/query/static/faq.html#Accepts

Re: Window, Windows, Linux, client and server...

2006-12-08 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, MRAB <[EMAIL PROTECTED]> wrote: . . . >I think he wants to be able to show the server desktop on a client (for >example, to show a user how to do something) and also be able to see a >client desk

*** C.L.L README/FAQ *** (Was: merits of Lisp vs Python)

2006-12-08 Thread [EMAIL PROTECTED]
Sounds like it's time for: A Beginners' Meta FAQ for comp.lang.lisp: http://nostoc.stanford.edu/jeff/llisp/cllfaq.html The purpose of this page is to help those new to Lisp (aka. "newbies") gain some background before they enter the fray of comp.lang.lisp (c.l.l). This is not a complete Lisp F

Re: Common Python Idioms

2006-12-08 Thread Fredrik Lundh
Daniel Dittmar wrote: > I agree completely (in the sense that dictionaries shouldn't be iterable > directly). Probably even more strongly, at least every time I see some > code where someone iterates over the keys, only to use the key to look > up the value (instead if using iteritms). so? th

Re: Problem in reading a URL

2006-12-08 Thread Simon Brunning
On 12/8/06, Χρυσάνθη Αϊναλή <[EMAIL PROTECTED]> wrote: > Hi, > > I get an error, when I am trying to read URL. > Where is the Problem? > > Thank u very much for all ideas!!! > > sincerely > > Chrysanthi > > > from urllib2 import * > > filename=urlopen('http://www.ncbi.nlm.nih.gov/entrez/viewer.fcgi

Re: Text Encoding - Like Wrestling Oiled Pigs

2006-12-08 Thread John Machin
[EMAIL PROTECTED] wrote: > So I've got a problem. > > I've got a database of information that is encoded in Windows/CP1252. > What I want to do is dump this to a UTF-8 encoded text file (a RSS > feed). > > While the overall problem seems to be related to the conversion, the > only error I'm gettin

Re: merits of Lisp vs Python

2006-12-08 Thread Alex Mizrahi
(message (Hello 'Bjoern) (you :wrote :on '(Fri, 08 Dec 2006 17:31:08 +0100)) ( ??>> hell no, lisp's syntax is much easier than python's since it's ??>> homogenous BS> Can you give an example? I cannot imagine how homogenity always BS> results in easiness. homogenity means that i can cut any

is there a tutorial for creating packages in python?

2006-12-08 Thread krishnakant Mane
hello all, I have got a lot of sets of functions and classes that do related work. so just like we get python libraries I too need to create such libraries often called packages. I want to put my code to re-use so will create these libraries and put in the site-libs folder. can any one suggest me

Re: *** C.L.L README/FAQ *** (Was: merits of Lisp vs Python)

2006-12-08 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > Sounds like it's time for: > > A Beginners' Meta FAQ for comp.lang.lisp: > > http://nostoc.stanford.edu/jeff/llisp/cllfaq.html > > The purpose of this page is to help those new to Lisp (aka. "newbies") > gain some background before they enter the fray of comp.lang.l

RE: Text Encoding - Like Wrestling Oiled Pigs

2006-12-08 Thread Tim Golden
[EMAIL PROTECTED] | I've got a database of information that is encoded in Windows/CP1252. | What I want to do is dump this to a UTF-8 encoded text file (a RSS | feed). | "UnicodeDecodeError: 'ascii' codec can't decode byte 0x92 in position | 163: ordinal not in range(128)" | | So somewhere I'm m

Re: Problem in reading a URL

2006-12-08 Thread scum
This is not a python problem. That is the text of the site when you go to it. The site uses cookies to store a session of your visit. Using python bypasses that cookie and throws an error. You will be better served using teh mechanize library. http://wwwsearch.sourceforge.net/mechanize/ Even

Re: How to create a global hotkey?

2006-12-08 Thread Paul Boddie
[EMAIL PROTECTED] wrote: > Sorry, I should have mentioned that I'm running Linux, and I only will > be running this app while X is running. Global "hot keys" are typically the domain of the desktop environment (or window manager for archaic desktops). For example, KDE has a configuration dialogue

Re: merits of Lisp vs Python

2006-12-08 Thread Mark Tarver
Bill Atkins wrote: > "Mark Tarver" <[EMAIL PROTECTED]> writes: > > > 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 my general educatio

Re: merits of Lisp vs Python

2006-12-08 Thread Rob Thorpe
Alex Mizrahi wrote: > (message (Hello 'Kay) > (you :wrote :on '(8 Dec 2006 08:03:18 -0800)) > ( > > KS> http://www.sbcl.org/manual/Handling-of-Types.html#Handling-of-Types > > KS> If you'd read the docs of the tools you admire you might find the > KS> answers yourself. > > SBCL is a COMPILER th

Using Py_InitModule3 -> [Linker Error] Unresolved external '_Py_InitModule4TraceRefs'

2006-12-08 Thread iwl
Hello I copied the code from the Extending Embedded Python section in the Python 2.5 but get an linker Error Unresolved external _Py_InitModule4TraceRefs. Who knows what's wrong? -- http://mail.python.org/mailman/listinfo/python-list

Re: Using Py_InitModule3 -> [Linker Error] Unresolved external '_Py_InitModule4TraceRefs'

2006-12-08 Thread Fredrik Lundh
iwl wrote: > I copied the code from the Extending Embedded Python section in the > Python 2.5 but get an linker Error Unresolved external > _Py_InitModule4TraceRefs. > Who knows what's wrong? you've mixed components compiled with Py_TRACE_REFS with components that aren't compiled with Py_TRACE_R

Re: is there a tutorial for creating packages in python?

2006-12-08 Thread Soni Bergraj
krishnakant Mane wrote: > I saw the official python tutorial and I think chapter 6 has quite a > bit on that. I'm not sure what you are after. There is not much to say about building python packages. I imagine that the important stuff should be in there (I have not checked!). If you are looking f

Re: Is PyGTK only for local - not web?

2006-12-08 Thread Gian Mario Tagliaretti
walterbyrd wrote: > I have noticed that there is also pygtk-web project, I suppose that is > what you use for the web? It's the pygtk web site as you see it here www.pygtk.org cheers -- Gian Mario Tagliaretti -- http://mail.python.org/mailman/listinfo/python-list

Re: merits of Lisp vs Python

2006-12-08 Thread Kaz Kylheku
Mark Tarver wrote: > I don't mind controversy - as long as there is intelligent argument. > And since it involves Python and Lisp, well it should be posted to both > groups. The Lispers will tend to say that Lisp is better for sure - > so it gives the Python people a chance to defend this creatio

mySql and multiple connection for threads

2006-12-08 Thread johnny
How do you create multiple connection in the treads. Lets say I will have at most 5 threads and I want to create at most 5 connections. If I create a connection in the "worker method", does it create connection for each threads. def worker(tq): while True: host, e = tq.get()

Re: merits of Lisp vs Python

2006-12-08 Thread Jan Dries
Alex Mizrahi wrote: > RB> Performance claims are always controversial. So, Python is much slower > RB> doing array multiplication, when you hand roll it, instead of using the > RB> standard numerical packages available. > > heh, do you have "standard numeric packages" for everything? maybe then

Re: shell command needs whitespace characters escaped

2006-12-08 Thread Nick Craig-Wood
Fredrik Lundh <[EMAIL PROTECTED]> wrote: > metaperl wrote: > > > I downloaded a file which has a space in the filename. I want to run a > > shell unzip on it, but it fails in my current code: > > > > syscmd = "cd %s ; unzip %s" % (self.storage.input, file.basename()) > > os.syste

  1   2   3   >