Re: can't start Apache on Mac OS X--no listening sockets available?

2007-06-26 Thread 7stud
On Jun 26, 12:52 am, kaens <[EMAIL PROTECTED]> wrote: > If apache2 works on macs how it does on linux (it should, right?) > there should be Apache2/sites-enabled and Apache2/sites-available > directories - the "default" files in these will tell you what pages > are being served, I believe. > There

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-26 Thread Giorgos Keramidas
On Fri, 22 Jun 2007 21:51:34 -, Twisted <[EMAIL PROTECTED]> wrote: >> C-h i, C-x b RET is non-trivial?!? [...] > I'm sorry. I don't speak Chinese. > > I trust I've made my point. Not only does it insist you learn a whole > other language (though I'm guessing it's not actually Chinese -- > Greek

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-26 Thread Giorgos Keramidas
On Fri, 22 Jun 2007 23:08:02 -, [EMAIL PROTECTED] wrote: >> lpr /usr/local/share/emacs/21.3/etc/refcard.ps >> or your install-dir^^ >> or your version.^ > > So now we're expected to go on a filesystem fishing expedition instead

Re: Python's "only one way to do it" philosophy isn't good?

2007-06-26 Thread Paul Rubin
Douglas Alan <[EMAIL PROTECTED]> writes: > > In the Maclisp era functions like mapcar worked on lists, and > > generated equally long lists in memory. > > I'm aware, but there were various different mapping functions. "map", > as opposed to "mapcar" didn't return any values at all, and so you had

Re: can't start Apache on Mac OS X--no listening sockets available?

2007-06-26 Thread 7stud
Well, I'm able to put html pages in /Library/Apache2/htdocs/ and access them in Safari as I would expect: http://localhost/test.htm and I can access the index.html page in that directory: http://localhost/index.html and it displays: It works! Apache 2.2.4 But, if I just use the address http:/

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-26 Thread Twisted
On Jun 25, 2:32 pm, Giorgos Keramidas <[EMAIL PROTECTED]> wrote: > > So much for the "free" in "free software". If you can't actually use > > it without paying money, whether for the software or for some book, it > > isn't really free, is it? > > Please do not confuse the term 'free' in 'free softw

Re: can't start Apache on Mac OS X--no listening sockets available?

2007-06-26 Thread 7stud
On Jun 26, 1:34 am, 7stud <[EMAIL PROTECTED]> wrote: > Where is that coming from? Is the original index.html page(before I > changed it and added "Apache 2.2.4") cached by Safari somehow? That > doesn't make any sense to me because when I explicitly request > index.html, I get the changed output.

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-26 Thread Twisted
On Jun 25, 2:28 pm, Giorgos Keramidas <[EMAIL PROTECTED]> wrote: > > This is the lowly Notepad, which I'll freely admit is the rusty > > bicycle of text editors, and it's much easier to use (including the > > help) than the supposed Mercedes-Benz of editors. > > Isn't this always the case? The 'in

Dispatching a method using PyobjC Selectors/Methods

2007-06-26 Thread sapsi
Hi, I am writing a SIMBL plugin for Mail.app, so far it loads and the correct method has been swizzled. However, i would like to call the original method and that is where the problem lies. If you could see the code(below), in console.app, i get the following error because of old(x) " 2007-06-26 0

Re: can't start Apache on Mac OS X--no listening sockets available?

2007-06-26 Thread half . italian
On Jun 25, 11:09 pm, 7stud <[EMAIL PROTECTED]> wrote: > > On Jun 25, 7:23 pm, 7stud <[EMAIL PROTECTED]> wrote: > > > > I'm trying to get Apache set up on my system so I can use mod_python. > > > I installed Apache 2.2.4 according to the following instructions: > > > >http://switch.richard5.net/isp-

Tkinter: different results from the same tcl script

2007-06-26 Thread Fabrizio Pollastri
Hello, in mixed python-tcl programming I found the following different behaviours of the same tcl script. If I type manually in the python interpreter the following lines >>> from Tkinter import * >>> w = Tk() >>> w.tk.evalfile('my_tcl_script.tcl') where my_tcl_script.tcl is #!/bin/sh

Re: Installing python under the linux

2007-06-26 Thread vedrandekovic
Danyelle Gragsone je napisao/la: > Hi, > > Yeah .. if its ubuntu then you have python already installed. I would > suggest that you start reading the documentation on your distro. How > did you get your distro if you don't know what it is? That concerns > me a bit. Ubuntu has alot of documenta

Re: Tkinter: different results from the same tcl script

2007-06-26 Thread half . italian
On Jun 26, 1:06 am, Fabrizio Pollastri <[EMAIL PROTECTED]> wrote: > Hello, > in mixed python-tcl programming I found the following different > behaviours of the same tcl script. > > If I type manually in the python interpreter the following lines > > >>> from Tkinter import * > >>> w = Tk() > >>

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-26 Thread Giorgos Keramidas
On Tue, 26 Jun 2007 07:40:55 -, Twisted <[EMAIL PROTECTED]> wrote: >On Jun 25, 2:32 pm, Giorgos Keramidas <[EMAIL PROTECTED]> >wrote: >>> So much for the "free" in "free software". If you can't actually use >>> it without paying money, whether for the software or for some book, >>> it isn't rea

Re: Face Recognition

2007-06-26 Thread Diez B. Roggisch
Henrik Lied wrote: > Hi there! > > Has anyone made effort to try to create a python binding to a facial > recognition software [1]? > > For those of you with some experience - would this be very hard? OpenCV has a python-binding. And a ctypes-binding. Diez -- http://mail.python.org/mailman/l

Re: can't start Apache on Mac OS X--no listening sockets available?

2007-06-26 Thread 7stud
> Console and the system logs are an invaluable debugging tool on Macs. > Bet you have some errors there saying why apache couldnt stop/start. > What/where is Console and how do I look at the system logs? -- http://mail.python.org/mailman/listinfo/python-list

Re: [OT] can't start Apache on Mac OS X--no listening sockets available?

2007-06-26 Thread Bruno Desthuilliers
7stud a écrit : > I'm trying to get Apache set up on my system so I can use mod_python. > I installed Apache 2.2.4 according to the following instructions: > > http://switch.richard5.net/isp-in-a-box-v2/installing-apache-on-mac-os-x/#comment-30704 > > and everything seemed to install correctly, b

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-26 Thread Gian Uberto Lauri
> "n" == nebulous99 <[EMAIL PROTECTED]> writes: n> On Jun 22, 6:32 pm, Cor Gest <[EMAIL PROTECTED]> wrote: >> > HOW IN THE BLOODY HELL IS IT SUPPOSED TO OCCUR TO SOMEONE TO >> ENTER > THEM, GIVEN THAT THEY HAVE TO DO SO TO REACH THE HELP THAT >> WOULD TELL > THEM THOSE ARE THE KEYS TO REACH T

Re: PEP 3107 and stronger typing (note: probably a newbie question)

2007-06-26 Thread tony . theodore
On Jun 21, 4:53 am, Stephen R Laniel <[EMAIL PROTECTED]> wrote: > Before I ask anything, let me note that this is surely an > old question that has inspired its share of flame wars; I'm > new to Python, but not new to how Internet discussions work. > So if there's a canonical thread or web page tha

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-26 Thread Gian Uberto Lauri
> Long count = 12.19.14.7.15; tzolkin = 1 Men; haab = 3 Tzec. > I get words from the Allmighty Great Gnus that > "T" == Twisted <[EMAIL PROTECTED]> writes: T> And the myth of the bicycle being easy to learn persists. Did you T> know that kids learn better than adults do? Why do kids p

text-mode tree viewer?

2007-06-26 Thread Torsten Bronger
Hallöchen! I'm looking for a package/routine that can convert [["Peter", ["Ian", [["Randy", ["Clara"], "Paul", ["Mary", ["Arthur"]]] into +---> Peter | | | +---> Ian | | | +---> Randy |

Re: sqlite newbie questions

2007-06-26 Thread Carsten Haese
On Tue, 26 Jun 2007 08:38:29 GMT, Dennis Lee Bieber wrote: > In both cases, the whole idea behind letting the adapter do > parameter substitution is that the adapter will add the appropriate > delimiters (quote marks, for the most part) needed for the data type. That's only the case if the a

Re: Installing python under the linux

2007-06-26 Thread Paul Boddie
On 25 Jun, 22:50, Grant Edwards <[EMAIL PROTECTED]> wrote: > > I really do not recommend installing from source for somebody > like you who knows nothing about Python or Linux. Can explain > why you think you want to install Python from source instead of > using the Python that's already installed

Re: simplifying algebraic expressions

2007-06-26 Thread Robin Becker
> Hi, > > Are there any libraries for manipulating algebraic expression trees? > In particular, take an expression tree and simplify it down. > > I'm working up the next release of PyGene, the genetic programming and > genetic algorithms library. > > Part of PyGene works with trees holding algeb

Customizable GUI package for Win$?

2007-06-26 Thread Alex Sentry
I want to know which GUI package should I turn to if I want to make something resembling MS OneNote. A lot of packages have "Notebook" style widgets or tabbed stuff, but wxPython's are not really customizable from what I know, and neither are TKs. I'm not sure about pyGTK and it's primarily a L

Re: simplifying algebraic expressions

2007-06-26 Thread DavidM
On Tue, 26 Jun 2007 11:11:39 +0100, Robin Becker wrote: > I have seen this sort of evolution strategy in the past and it's very wrong > to > attempt to simplify outside the genetic framework. The implication is that > you > know better than the overall fitness requirement. The additional expre

Re: Installing python under the linux

2007-06-26 Thread Stefan Behnel
[EMAIL PROTECTED] wrote: > is there any folder with that basic Python > on ubuntu linux where can I find file "Grammar" and change the names > of python keywords. AFAICT, the Grammar file is not part of the binary installation. So, download the Python source distribution from python.org and unpac

Re: simplifying algebraic expressions

2007-06-26 Thread Mark Westwood
Hi David It seems that all you are asking for are the capabilities of Mathematica or Maple or some other CAS. A quick Google reveals that there is a CAS written in Python, called SAGE. That might be a good place to start; but I'll admit that I know nothing about it. I'm with Robin Becker on thi

Re: PEP 3107 and stronger typing (note: probably a newbie question)

2007-06-26 Thread harri
Bruno Desthuilliers wrote: [...] > > It seems obvious from this that static typecheking would require > dropping all dynamism from Python - then turning it into another, very > different (and mostly useless as far as I'm concerned) language. IOW : > you can't have Python *and* static typechecks -

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-26 Thread Martin Gregorie
Twisted wrote: > > First, I didn't claim the ideal WP was necessarily perfectly WYSIWYG. > Maybe I should have clarified my viewpoint. When it comes to programs that operate on the content of textual documents a word processor is WYSIWYG by definition. Anything else is a text editor. You may ha

Re: text-mode tree viewer?

2007-06-26 Thread Martin Skou
Not quite, but almost: data=[["Peter", ["Ian", [["Randy", ["Clara"], "Paul", ["Mary", ["Arthur"]]] def show(data,level): for i in data: if i.__class__.__name__=='list': show(i,level

Re: Python Info.

2007-06-26 Thread Joe Riopel
On 6/26/07, kaens <[EMAIL PROTECTED]> wrote: > It was like being slapped with the mid-90s That was awesome. > On 6/26/07, Stefan Behnel <[EMAIL PROTECTED]> wrote: > > Brandon wrote: > > > Check it out: www.BrandonsMansion.com That is horrible. -- http://mail.python.org/mailman/listinfo/python-lis

Re: Portable general timestamp format, not 2038-limited

2007-06-26 Thread Martin Gregorie
Paul Rubin wrote: > Martin Gregorie <[EMAIL PROTECTED]> writes: pretend the leap seconds never happened, just as Java does. >>> Which leaves you about 30 seconds out by now - smelly. >> Easy solution: always read Zulu time directly from a recognized >> real-time clock > > That's no good,

Re: text-mode tree viewer?

2007-06-26 Thread Torsten Bronger
Hallöchen! Martin Skou writes: > Not quite, but almost: > > > data=[["Peter", >["Ian", > [["Randy", > ["Clara"], > "Paul", > ["Mary", >["Arthur"]]] This was flawed, there were two brackets too much: data=[["Peter", ["Ian",

Re: Collections of non-arbitrary objects ?

2007-06-26 Thread walterbyrd
> > On Jun 24, 10:31 pm, Bruno Desthuilliers > > <[EMAIL PROTECTED]> wrote: > > You perhaps don't know this, but most statically typed languages have > the notion of either pointers or references, that can cause similar - > and usually worse - problems. > Yes, but those languages also have the not

Problem with wxPython

2007-06-26 Thread Ali
Hi I'm not sure if this is the right place to post, pardon me if it's not. I'm having a problem with an application written with wxpython. The frame seems only to refresh when moving my mouse of it, though i frequently call: frame.Refresh(True). In fact, that line is called by another thread, righ

Re: eggs considered harmful

2007-06-26 Thread Harry George
[EMAIL PROTECTED] (John J. Lee) writes: > Harry George <[EMAIL PROTECTED]> writes: >> [EMAIL PROTECTED] (John J. Lee) writes: > [...] >>> 2. You can run your own private egg repository. IIRC, it's as simple >>> as a directory of eggs and a plain old web server with directory >>> listings turned o

Change Geany Syntax Highlighting

2007-06-26 Thread Scott
Hi, I think I may have finally found a IDE/text editor that I like, but, it still haves one problem. Geany haves syntax highlighting, but it is not very good for Python. It only seems to have a couple different colours. One for text and another for modules/classes/ functions. Is it possib

_hashlib portability issue

2007-06-26 Thread Olivier Feys
Hi all, I build python 2.5 on linux-x86-64 (centos). Why is lib-dynload/_hashlib.so dynamically linked with libssl.so.0.9.7 and not with libssl.so that points on it (same thing for libcrypto.so)? This causes problems when copying all the python distribution and running it on a different os, wher

Re: text-mode tree viewer?

2007-06-26 Thread Martin Skou
Torsten Bronger wrote: > > It doesn't show Paul and Mary on the same level. I (think I) solved > the problem with this: > I could do so if Poul was in a list of his own, like "Arthur" and "Clara". /Martin -- http://mail.python.org/mailman/listinfo/python-list

Leo 4.4.3 final released

2007-06-26 Thread Edward K Ream
Leo 4.4.3 final is available at: http://sourceforge.net/project/showfiles.php?group_id=3458&package_id=29106 Leo is a text editor, data organizer, project manager and much more. See: http://webpages.charter.net/edreamleo/intro.html The highlights of Leo 4.4.3: - Added

Re: Installing python under the linux

2007-06-26 Thread vedrandekovic
Hello, >No. The only way to change the keywords would be to edit the >Python source and re-compile it. This was very helpful information , I already know that but I don't know how to that.PLEASE HELP ME ABOUT THIS, I WILL BE VERY GRATEFUL TO YOU. ( IF you can please step by step how to I instal

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-26 Thread Matthias Buelow
Twisted wrote: [...] Hey dude, get back to selling used cars and leave us computer geeks alone, will ya? Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: Collections of non-arbitrary objects ?

2007-06-26 Thread Bruno Desthuilliers
walterbyrd a écrit : >>> On Jun 24, 10:31 pm, Bruno Desthuilliers >>> <[EMAIL PROTECTED]> wrote: >> You perhaps don't know this, but most statically typed languages have >> the notion of either pointers or references, that can cause similar - >> and usually worse - problems. >> > > Yes, but those

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-26 Thread David Kastrup
Matthias Buelow <[EMAIL PROTECTED]> writes: > Twisted wrote: > > [...] > > Hey dude, > > get back to selling used cars and leave us computer geeks alone, > will ya? Well, how will his customers react to the stories about avoiding Mercedes cars because of people getting hit in the face by the cran

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-26 Thread notbob
On 2007-06-25, Giorgos Keramidas <[EMAIL PROTECTED]> wrote: > X11 interface. I don't see why Notepad is special in any way here. It's not. I discovered, quite by accident, wordpad is the superior text editor in windows. It even properly formats those cryptic brag pages crackers put in cracked

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-26 Thread Bjorn Borud
[Robert Uhl <[EMAIL PROTECTED]>] | | Once again I am forced to wonder if you have _ever_ actually used | emacs. find-file has tab completion: hit tab without anything typed, and | it displays _everything_ in the directory; type a few characters to | narrow it down; hit tab to complete the filenam

Help needed in Handling HTML file

2007-06-26 Thread senthil arasu
Hi, Right now Iam handling HTML files using Python. Is there any modules to support HTML parsing and rendering ? or suggest me any other way to support HTML. thanks -- http://mail.python.org/mailman/listinfo/python-list

Converting Diff Output to XML?

2007-06-26 Thread Debajit Adhikary
What would be the best way to convert the regular (unix) diff output into XML? Are there any libraries at all which might help? -- http://mail.python.org/mailman/listinfo/python-list

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-26 Thread Bjorn Borud
[Twisted <[EMAIL PROTECTED]>] | | Really? None of this happens if you just do the straightforward file- | open command, which should obviously at least provide a navigable | directory tree, but definitely does not. well, if you insist on using Emacs in the most clumsy way possible, then of course

Re: Help needed in Handling HTML file

2007-06-26 Thread Stephen R Laniel
On Tue, Jun 26, 2007 at 09:42:37AM -0500, senthil arasu wrote: > Right now Iam handling HTML files using Python. > Is there any modules to support HTML parsing and rendering ? > or suggest me any other way to support HTML. Parsing: BeautifulSoup http://www.crummy.com/software/BeautifulSoup/ Rende

Re: Installing python under the linux

2007-06-26 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: > Hello, > >>No. The only way to change the keywords would be to edit the >>Python source and re-compile it. > > This was very helpful information , I already know that but I don't > know how > to that.PLEASE HELP ME ABOUT THIS, I WILL BE VERY GRATEFUL TO YOU. > > ( I

logging anomaly

2007-06-26 Thread Jesse James
I have some fairly simply code in a turbogears controller that uploads files. In this code, I inserted a 'start uploading' and a 'done uploading' log record like this: logger.info('- start uploading file: '+Filename) # copy file to specified location. while 1:

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-26 Thread Bjorn Borud
[Robert Uhl <[EMAIL PROTECTED]>] | | Agreed. Stallman got sidetracked by Scheme, which IMHO was a | dead-end. too many people buying SICP and believing what they heard about it being an important book. I too spent some time exploring Scheme, or should I say, wasted some time, years ago, and not

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-26 Thread Bjorn Borud
[Twisted <[EMAIL PROTECTED]>] | On Jun 23, 2:04 am, Robert Uhl <[EMAIL PROTECTED]> wrote: | > Of course, emacs doesn't take years of mastery. It takes 30, 40 | > minutes. | | I gave it twice that, and it failed to grow on me in that amount of | time. then it just wasn't meant to be. stick to No

Help needed with translating perl to python

2007-06-26 Thread vj
I have a perl script which connect to network stream using sockets. The scripts first logins in to the server and then parses the data comming from the socket. Statement 1: my $today = sprintf("%4s%02s%02s", [localtime()]->[5]+1900, [localtime()]->[4]+1, [localtime()]->[3]) ; Statement 2: my

Re: Output XML buffer?

2007-06-26 Thread Jan Danielsson
Stefan Behnel wrote: [---] > lxml.etree already implements that, BTW. > > http://codespeak.net/lxml Ok, thanks. I'll take a look at it. [---] > Some people propose just that if you really *want* a declaration. No need to > have it, though, as ET will create well-formed XML anyway. Yeah, I

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-26 Thread Bjorn Borud
[Twisted <[EMAIL PROTECTED]>] | | and you said that depended on the definition of "expert". Apparently | you believe there is a type of "expert" for whom beginner-friendly | software is intrinsically less usable than beginner-hostile | software. no, I was alluding to you thinking that posession o

popen and a long running process in a wx.python application

2007-06-26 Thread Doru Moisa
Hello, How can I capture the output of a long runnning process which I open with popen() ? I tried reading line by line, char by char, but the result always comes when the process finishes. (I am trying to make a wx.python program that opens some "make ..." with popen). How can I receive the outpu

Re: Help needed with translating perl to python

2007-06-26 Thread vj
I posted too soon: > Statement 1: > my $today = sprintf("%4s%02s%02s", [localtime()]->[5]+1900, > [localtime()]->[4]+1, [localtime()]->[3]) ; 1. is localtime the same as time in python? 2. What does -> ? do in perl? 3. What is 'my' > Statement 2: > my $password = md5_hex("$today$username") ;

RE: Collections of non-arbitrary objects ?

2007-06-26 Thread Hamilton, William
> From: walterbyrd > > > Yes, but those languages also have the notion of structures that do > not allow arbitrary collections. That is what I was wondering about > when I started the thread. It's fine that python has four different > ways of creating collections of arbitrary data types, but I th

Re: Problem with wxPython

2007-06-26 Thread Chris Mellon
On 6/26/07, Ali <[EMAIL PROTECTED]> wrote: > Hi > > I'm not sure if this is the right place to post, pardon me if it's not. > I'm having a problem with an application written with wxpython. The frame > seems only to refresh when moving my mouse of it, though i frequently call: > frame.Refresh(True)

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-26 Thread David Kastrup
Bjorn Borud <[EMAIL PROTECTED]> writes: > [Twisted <[EMAIL PROTECTED]>] > | > | and you said that depended on the definition of "expert". Apparently > | you believe there is a type of "expert" for whom beginner-friendly > | software is intrinsically less usable than beginner-hostile > | software.

Re: Help needed with translating perl to python

2007-06-26 Thread Jay Loden
vj wrote: > I posted too soon: > >> Statement 1: >> my $today = sprintf("%4s%02s%02s", [localtime()]->[5]+1900, >> [localtime()]->[4]+1, [localtime()]->[3]) ; > > 1. is localtime the same as time in python? http://perldoc.perl.org/functions/localtime.html It's more like time.localtime() One

Re: PEP 3107 and stronger typing (note: probably a newbie question)

2007-06-26 Thread paul
Bruno Desthuilliers schrieb: > Stephen R Laniel a écrit : >> On Wed, Jun 20, 2007 at 09:41:09PM +0100, Michael Hoffman wrote: >>> If you asked Java programmers why you couldn't turn *off* Java's static >>> type checking if you wanted to, you'd probably get a similar response. >> Perhaps it would h

Re: Python's "only one way to do it" philosophy isn't good?

2007-06-26 Thread Andy Freeman
On Jun 26, 12:26 am, Paul Rubin wrote: > Precisely, I think that's what Alexander was trying to get across, Lisp > didn't have a uniform interface for traversing different types of sequence. And he's wrong, at least as far as common lisp is concerned - map does exactly t

Return name of caller function?

2007-06-26 Thread Matthew Peter
For example, how do I get this to work? def func(): print "This is", __?__ return __caller__ def echo(): print "This is ", __?__ return func() >>> print echo() This is echo This is func echo _

Hi How to implement switch case statement.

2007-06-26 Thread parasuram.nooranianand
Hi My requirement is to check a variable with a set of constant values and call a particular function depending on the value of the variable. A C-language implementation might look something like : switch (a) { case 1 : func1(); case 2 : func2() ; default : func3(); } How t

Re: PEP 3107 and stronger typing (note: probably a newbie question)

2007-06-26 Thread Chris Mellon
On 6/26/07, paul <[EMAIL PROTECTED]> wrote: > Bruno Desthuilliers schrieb: > > Stephen R Laniel a écrit : > >> On Wed, Jun 20, 2007 at 09:41:09PM +0100, Michael Hoffman wrote: > >>> If you asked Java programmers why you couldn't turn *off* Java's static > >>> type checking if you wanted to, you'd p

Re: Return name of caller function?

2007-06-26 Thread Stephen R Laniel
On Mon, Jun 25, 2007 at 06:27:29PM -0700, Matthew Peter wrote: > For example, how do I get this to work? > > def func(): > print "This is", __?__ > return __caller__ > > def echo(): > print "This is ", __?__ > return func() inspect is your friend: http://docs.python.org/lib/inspe

Re: Python's "only one way to do it" philosophy isn't good?

2007-06-26 Thread Andy Freeman
On Jun 26, 8:49 am, Andy Freeman <[EMAIL PROTECTED]> wrote: > Map doesn't work on generators or iterators because they're not part > of the common lisp spec, but if someone implemented them as a library, > said library could easily include a map that handled them as well. Note that this is is a co

Re: Help needed with translating perl to python

2007-06-26 Thread attn . steven . kuo
On Jun 26, 8:04 am, vj <[EMAIL PROTECTED]> wrote: > I have a perl script which connect to network stream using sockets. > The scripts first logins in to the server and then parses the data > comming from the socket. > > Statement 1: > my $today = sprintf("%4s%02s%02s", [localtime()]->[5]+1900, >

Re: Help needed with translating perl to python

2007-06-26 Thread Greg Armer
On Tue, Jun 26, 2007 at 08:17:06AM -0700, vj wrote: >I posted too soon: > >> Statement 1: >> my $today = sprintf("%4s%02s%02s", [localtime()]->[5]+1900, >> [localtime()]->[4]+1, [localtime()]->[3]) ; > >1. is localtime the same as time in python? You could use this instead - from time import loc

Re: Python changing keywords name

2007-06-26 Thread Sion Arrowsmith
Gabriel Genellina <[EMAIL PROTECTED]> wrote: >(I hope nobody will abuse this technique... Y perd=F3n a los >hispanoparlantes por lo horrible de la traducci=F3n). Ah, I only spotted this when I came to post a response. And the reason I was going to post a response was that these: >'assert': '

Re: logging anomaly

2007-06-26 Thread Vinay Sajip
On Jun 26, 3:48 pm, Jesse James <[EMAIL PROTECTED]> wrote: > > 2007-06-26 07:59:38,192 vor.uploader INFO - start uploading file: > 7_Canyons_Clip_1.flv > 2007-06-26 07:59:38,206 vor.uploader INFO - done uploading file: > 7_Canyons_Clip_1.flv > > I know this is wrong because this is a large

Re: eggs considered harmful

2007-06-26 Thread Robert Kern
Harry George wrote: > [EMAIL PROTECTED] (John J. Lee) writes: >> Not sure how this differs significantly "from running a repository", >> in the sense I use it above. >> >> >> John > > Significant differences: > > "depot": Place(s) where tarballs can be stored, and can then be > reached via http.

Re: Installing python under the linux

2007-06-26 Thread Grant Edwards
On 2007-06-26, Diez B. Roggisch <[EMAIL PROTECTED]> wrote: >>>No. The only way to change the keywords would be to edit the >>>Python source and re-compile it. >> >> This was very helpful information , I already know that but I >> don't know how to that.PLEASE HELP ME ABOUT THIS, I WILL BE >> VER

Re: Installing python under the linux

2007-06-26 Thread Evan Klitzke
On 6/26/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hello, > > >No. The only way to change the keywords would be to edit the > >Python source and re-compile it. > > This was very helpful information , I already know that but I don't > know how > to that.PLEASE HELP ME ABOUT THIS, I WILL BE

Re: _hashlib portability issue

2007-06-26 Thread Robert Kern
Olivier Feys wrote: > Hi all, > > I build python 2.5 on linux-x86-64 (centos). > Why is lib-dynload/_hashlib.so dynamically linked with libssl.so.0.9.7 > and not with libssl.so that points on it (same thing for libcrypto.so)? > This causes problems when copying all the python distribution and >

Re: Python's "only one way to do it" philosophy isn't good?

2007-06-26 Thread Paul Rubin
Andy Freeman <[EMAIL PROTECTED]> writes: > And he's wrong, at least as far as common lisp is concerned - map does > exactly that. > > http://www.lispworks.com/documentation/HyperSpec/Body/f_map.htm "sequence" there just means vectors and lists. > Map doesn't work on generators or iterators becau

Re: popen and a long running process in a wx.python application

2007-06-26 Thread kyosohma
On Jun 26, 10:16 am, Doru Moisa <[EMAIL PROTECTED]> wrote: > Hello, > > How can I capture the output of a long runnning process which I open > with popen() ? > I tried reading line by line, char by char, but the result always > comes when the process finishes. > (I am trying to make a wx.python pro

Re: Hi How to implement switch case statement.

2007-06-26 Thread Evan Klitzke
Read this thread, which was discussed on the list a few days ago: http://www.mail-archive.com/python-list@python.org/msg150704.html On 6/25/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > Hi > > My requirement is to check a variable with a set of constant values and > call a particular

Re: Python's "only one way to do it" philosophy isn't good?

2007-06-26 Thread Paul Rubin
Andy Freeman <[EMAIL PROTECTED]> writes: > Compare that with what a programmer using Python 2.4 has to do if > she'd like the functionality provided by 2.5's with statement. Yes, > with is "just syntax", but it's extremely useful syntax, syntax that > can be easily implemented with lisp-style macr

Re: Portable general timestamp format, not 2038-limited

2007-06-26 Thread Paul Rubin
Martin Gregorie <[EMAIL PROTECTED]> writes: > I don't recall the OP mentioning time interval computability - just a > requirement for sub second accuracy timestamps. That Y2038 is an issue suggests the OP wants a timestamp format that is future-proof and that means it should be good for all plausi

Re: Return name of caller function?

2007-06-26 Thread Jay Loden
Matthew Peter wrote: > For example, how do I get this to work? > > def func(): > print "This is", __?__ > return __caller__ > > def echo(): > print "This is ", __?__ > return func() > > print echo() > This is echo > This is func > echo This may not be what you're looking

Re: Help needed with translating perl to python

2007-06-26 Thread attn . steven . kuo
On Jun 26, 8:59 am, [EMAIL PROTECTED] wrote: (snipped) > > >>> def bcdlen(*args): > > ... strlen = "%04s" % str(args[0]) > ... firstval = int(strlen[2:3]) * 16 + int(strlen[3:4]) > ... lastval = int(strlen[0:1]) * 16 + int(strlen[1:2]) > ... return "%s%s" % (chr(firstval), chr(la

Re: Internals and complexity of types, containers and algorithms

2007-06-26 Thread Harald Luessen
On Mon, 25 Jun 2007 James Stroud wrote: >Harald Luessen wrote: >> Hi, I am new to python and I miss some understanding of the internals >> of some types and containers. With my C/C++ background I hope to get >> some hints to chose the best data structure for my programs. Here are >> some questi

Re: Internals and complexity of types, containers and algorithms

2007-06-26 Thread Harald Luessen
On Mon, 25 Jun 2007 Martin v. Löwis wrote: >Sure, see below: > >- tuples are represented as arrays, with a single block for the > entire objects (object header, tuple size, and data) >- list are represented as arrays, with two memory blocks: > one for object header and sizes, and the other one f

problem mixing gettext and properties

2007-06-26 Thread André
I've encountered a problem using gettext with properties while using a Python interpreter. Here's a simple program that illustrate the problem. == # i18n_test.py: test of gettext & properties import gettext fr = gettext.translation('i18n_test', './translations', languages=['fr']) fr.

Re: Indenting in Emacs

2007-06-26 Thread Rustom Mody
Ive been struggling with this same question -- which python mode -- for a while but not getting anywhere! I understand (from the emacs list) that the new python mode has better support for debugging (pdbtrack in addition to pdb) but dont know much more. On 6/26/07, John J. Lee <[EMAIL PROTECTED]

Re: problem mixing gettext and properties

2007-06-26 Thread Matimus
On Jun 26, 10:52 am, André <[EMAIL PROTECTED]> wrote: > I've encountered a problem using gettext with properties while using a > Python interpreter. > > Here's a simple program that illustrate the problem. > == > # i18n_test.py: test of gettext & properties > > import gettext > > fr = g

Re: problem mixing gettext and properties

2007-06-26 Thread Peter Otten
André wrote: > I've encountered a problem using gettext with properties while using a > Python interpreter. > > Here's a simple program that illustrate the problem. > == > # i18n_test.py: test of gettext & properties > > import gettext > > fr = gettext.translation('i18n_test', './tr

Re: Internals and complexity of types, containers and algorithms

2007-06-26 Thread Paul Rubin
"Martin v. Löwis" <[EMAIL PROTECTED]> writes: > Amortized O(1) for inserting into lists. I think you mean amortized O(1) for appending to lists. -- http://mail.python.org/mailman/listinfo/python-list

Re: problem mixing gettext and properties

2007-06-26 Thread André
On Jun 26, 3:56 pm, Peter Otten <[EMAIL PROTECTED]> wrote: > André wrote: > > I've encountered a problem using gettext with properties while using a > > Python interpreter. > > > Here's a simple program that illustrate the problem. > > == > > # i18n_test.py: test of gettext & properties

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-26 Thread Kjetil S. Matheussen
On Tue, 26 Jun 2007, Bjorn Borud wrote: > [Robert Uhl <[EMAIL PROTECTED]>] > | > | Agreed. Stallman got sidetracked by Scheme, which IMHO was a > | dead-end. > > too many people buying SICP and believing what they heard about it > being an important book. I too spent some time exploring Scheme

Re: popen and a long running process in a wx.python application

2007-06-26 Thread Ratko
On Jun 26, 10:16 am, Doru Moisa <[EMAIL PROTECTED]> wrote: > Hello, > > How can I capture the output of a long runnning process which I open > with popen() ? > I tried reading line by line, char by char, but the result always > comes when the process finishes. > (I am trying to make a wx.python pro

Re: Python plain-text database or library that supports joins?

2007-06-26 Thread Joshua J. Kugler
On Friday 22 June 2007 09:18, felciano wrote: > Hello -- > > Is there a convention, library or Pythonic idiom for performing > lightweight relational operations on flatfiles? I frequently find > myself writing code to do simple SQL-like operations between flat > files, such as appending columns f

Re: problem mixing gettext and properties

2007-06-26 Thread Peter Otten
André wrote: > On Jun 26, 3:56 pm, Peter Otten <[EMAIL PROTECTED]> wrote: >> André wrote: >> > I've encountered a problem using gettext with properties while using a >> > Python interpreter. >> >> > Here's a simple program that illustrate the problem. >> > == >> > # i18n_test.py: test

ironpython exception line number

2007-06-26 Thread Troels Thomsen
Hello , When an exeption occurs in a IronPython executet script, and I print the sys.exc , i get something ugly like the example below. How can I get the fileName and line number? Thx in advance Troels 26-06-2007 13:19:04 : IronPython.Runtime.Exceptions.PythonIndentationError: unexpected tok

Re: bicycle repair man help

2007-06-26 Thread Kathryn Van Stone
On Jun 23, 2007, at 2:24 PM, Rustom Mody wrote: > Does someone know that when using bicycle repair man to refactor > python code what exactly extract local variable means? I don't know about bicycle repair main, but in general 'extract local variable' means to make a change like this: self.

  1   2   >