Re: sum and strings

2006-08-24 Thread Fredrik Lundh
Tim Chase wrote: q3 = q1 + q2 q3.n, q3.i, q3.j, q3.k (8, 13, 16, 22) sum([q1,q2]) Traceback (most recent call last): File stdin, line 1, in ? TypeError: unsupported operand type(s) for +: 'int' and 'q' Just because something is slow or sub-optimal doesn't mean it should be an

Re: how to get file name of the running .py file

2006-08-24 Thread Fredrik Lundh
Larry Bates wrote: How to get the name of the running .py file like the macro _FILE_ in C? import os import sys print sys.argv[0] or if you just want the script and not the full path print os.path.basename(sys.argv[0]) except that __FILE__ is the name of the current source file, not

Re: Taking data from a text file to parse html page

2006-08-24 Thread Anthra Norell
DH, Could you be more specific describing what you have and what you want? You are addressing people, many of whom are good at stripping useless junk once you tell them what 'useless junk' is. Also it helps to post some of you data that you need to process and a sample of the same

Re: Problem with tokenize module and indents

2006-08-24 Thread Tim Scheidemantle
Tim wrote: I ran into a problem with a script i was playing with to check code indents and need some direction. It seems to depend on if tabsize is set to 4 in editor and spaces and tabs indents are mixed on consecutive lines. Works fine when editors tabsize was 8 regardless if indents

Re: Problem with tokenize module and indents

2006-08-24 Thread Fredrik Lundh
Tim wrote: I ran into a problem with a script i was playing with to check code indents and need some direction. It seems to depend on if tabsize is set to 4 in editor and spaces and tabs indents are mixed on consecutive lines. Works fine when editors tabsize was 8 regardless if indents

what is the data from loads()

2006-08-24 Thread leo
Hi, Following is the python scripts: import marshal

Re: How to download a web page just like a web browser do ?

2006-08-24 Thread Bo Yang
Thank you , Max ! I think HarvestMan is just what I need ! Thanks again ! -- http://mail.python.org/mailman/listinfo/python-list

Record Audio Analysis

2006-08-24 Thread Jo Chase
I would like to record audio from a mic and perform some basic analysis on the audio wave patterns produced. What would be the easiest way to accomplish this in Python? -- http://mail.python.org/mailman/listinfo/python-list

Re: what is the data from loads()

2006-08-24 Thread Fredrik Lundh
leo wrote: anyone know what is the data in loads()? i mean what is the ('c\000\000\000\000\001\000\000\000s\017... compiled and serialized Python code (the same kind of stuff that you'll find in PYC files). if you don't trust the source, don't run that program. /F --

Re: How to download a web page just like a web browser do ?

2006-08-24 Thread BJörn Lindqvist
Mechanize (http://wwwsearch.sourceforge.net/mechanize/) is another option, it can even fill out forms! -- mvh Björn -- http://mail.python.org/mailman/listinfo/python-list

datetime problems select from MySQL

2006-08-24 Thread ZoombyWoof
Hi. I have ran into a weird thing I just can't find any solution for. I have googled and searched but no luck. The problem is that when I select TIME values from MySQL from python, I get wrong results when the TIME values are negative. From mysql program: mysql select id,flex from Users where

Re: programming with Python 3000 in mind

2006-08-24 Thread GHUM
Steven, you ask good questions! (2) Will there be automated tools for converting source code from Python 2 to Python 3000? If you would have been to the EuroPythom 2006, you may have heard the plans for PyPy 2.0; which may have per-module-switchable syntax compatibility for Py 2.2-3000. So by

Concatenating arrays

2006-08-24 Thread Sheldon
Good day everyone, I would like to know if anyone has a fast and concise way of concatenating two 2D arrays of same dimensions? Whenever I try: a = concatenate(b,c) I get erroneous data as if the axises were incorrectly chosen. As far as I can see concatenate((b,c),0) does it vertically while a

Re: Python + Java Integration

2006-08-24 Thread Paul Boddie
Fredrik Lundh wrote: Ben Sizer wrote: Java itself never deserved to be the 'next' anything anyway. I've had a lot of developers come up to me and say, I haven't had this much fun in a long time. It sure beats writing Cobol -- James Gosling Nice quote! It also reinforces the

Re: Can Python do Perl's print EOF; notation? - popen, subprocess works?

2006-08-24 Thread Nick Craig-Wood
[EMAIL PROTECTED] [EMAIL PROTECTED] wrote: However, when the code in the string was actually qsubcmds = echo cd %(cwd)s %(cmds) %(args) rm -f %(files)s % vars() in which %(cmd)s folks a subprocess, when this string was write to some pipe, e.g.:

Re: radio buttons in curses

2006-08-24 Thread Fabian Braennstroem
Hi Steve, * Steve Holden [EMAIL PROTECTED] wrote: Fabian Braennstroem wrote: Sorry, me again... Does nobody have an idea or is it to stupid? * Fabian Braennstroem [EMAIL PROTECTED] wrote: Hi, I want to add some radio and check buttons to my curses script. As I understand it, there are no

Re: all ip addresses of machines in the local network

2006-08-24 Thread Amit Khemka
On 23 Aug 2006 21:46:21 -0700, damacy [EMAIL PROTECTED] wrote: hi, sandra. no, it's not as complicated as that. all i want to do is to load a database onto different machines residing in the same network. i hope there is a way doing it. or perhaps i have a poor understanding of how networks

Re: Help don't know what problem is Newbie

2006-08-24 Thread len
Sorry for the stupid question. I was fixated on the SQL. Thanks Len Sumnler Peter Otten wrote: len wrote: Have the following code: Short variable names increase the likelihood of name clashes: c = db.cursor() c = '' c = csz[0] c

Re: radio buttons in curses

2006-08-24 Thread Fredrik Lundh
Fabian Braennstroem wrote: Does nobody have an idea or is it to stupid? have you looked at: http://excess.org/urwid/ /F -- http://mail.python.org/mailman/listinfo/python-list

RE: Python and STL efficiency

2006-08-24 Thread Ames Andreas
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] g] On Behalf Of Ray Sent: Wednesday, August 23, 2006 4:28 PM Subject: Re: Python and STL efficiency Tim N. van der Leeuw wrote: With the nr of loops corrected, Python on my laptop performs worse than C++

Re: all ip addresses of machines in the local network

2006-08-24 Thread Amit Khemka
On 8/24/06, Amit Khemka [EMAIL PROTECTED] wrote: On 23 Aug 2006 21:46:21 -0700, damacy [EMAIL PROTECTED] wrote: hi, sandra. no, it's not as complicated as that. all i want to do is to load a database onto different machines residing in the same network. i hope there is a way doing it.

Re: Problem of function calls from map()

2006-08-24 Thread Fredrik Lundh
Steve Holden wrote: Well I guess if people wanted to argue for keeping the functionals this should be on the list ... who's arguing ? is this perhaps a little like the now that we have lexical scoping, the default argument object binding trick is no longer needed myth ? /F --

Re: radio buttons in curses

2006-08-24 Thread Fabian Braennstroem
Hi Fredrik, * Fredrik Lundh [EMAIL PROTECTED] wrote: Fabian Braennstroem wrote: Does nobody have an idea or is it to stupid? have you looked at: http://excess.org/urwid/ Thanks! I found this too and it seems to be helpful... Greetings! Fabian --

Re: What do you want in a new web framework?

2006-08-24 Thread Paul Boddie
Cliff Wells wrote: On Thu, 2006-08-24 at 04:04 +, Tim Roberts wrote: Cliff Wells [EMAIL PROTECTED] wrote: But there are interesting things in Ruby (and Ruby 2 should take care of lots of warts Ruby 1.8 has) that Python could learn from. All-in-all, Ruby is mostly as good as Python

Best Editor

2006-08-24 Thread JAG CHAN
Friends, I am trying to learn Python. It will be of great help to me if you let me know which one would be best editor for learning Python. Plese note that I would like to have multiplatform editor which will be useful for both LInux and Windows XP. Thanks. --

Re: Python Expert

2006-08-24 Thread Frithiof Andreas Jensen
Perseo [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi guys, we are looking for a python developer for a European project. This project is multilangual and free it is called EuroCv and it need a module for exporting data in PDF. A brute-force approach could be to sidestep PDF

Re: Best Editor

2006-08-24 Thread Michiel Sikma
I personally use Eclipse with PyDev. It is a cross-platform solution because Eclipse is made with Java. http://www.eclipse.org/ http://pydev.sourceforge.net/ Michiel Op 24-aug-2006, om 13:29 heeft JAG CHAN het volgende geschreven: Friends, I am trying to learn Python. It will be of great

python

2006-08-24 Thread [EMAIL PROTECTED]
Regards, [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Pygame, mouse events and threads

2006-08-24 Thread jedi200581
Hi, I'm trying to retreive mouse event in a python thread using pygame. It's not working and I don't know why! Here is the code: snippet on import pygame, sys, os, threading from pygame.locals import * from threading import * class Display(Thread) : Class managing display def

setuid root

2006-08-24 Thread Tiago Simões Batista
Hello all I have a situation that requires that a python script, that is run from a webpage (via php exec()) must be run with root privileges. The sysadmin already set the setuid bit on the script, but it still fails when it tries to write to any file that only root has write access to. I read

Re: python

2006-08-24 Thread utabintarbo
[EMAIL PROTECTED] wrote: Regards, [EMAIL PROTECTED] Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: python

2006-08-24 Thread Michiel Sikma
Op 24-aug-2006, om 14:22 heeft utabintarbo het volgende geschreven: [EMAIL PROTECTED] wrote: Regards, [EMAIL PROTECTED] Thanks! You're welcome. Signed, Anonymous -- http://mail.python.org/mailman/listinfo/python-list

Re: Best Editor

2006-08-24 Thread Neil Cerutti
On 2006-08-24, JAG CHAN [EMAIL PROTECTED] wrote: Friends, I am trying to learn Python. It will be of great help to me if you let me know which one would be best editor for learning Python. Plese note that I would like to have multiplatform editor which will be useful for both LInux and

Re: Pygame, mouse events and threads

2006-08-24 Thread Ben Sizer
[EMAIL PROTECTED] wrote: When I put the content of the run and input functions in the main thread, it's working, why not in the thread? Because event handling needs to be done in the main thread. So does rendering. This is a limitation of the underlying system. As a general rule, try to keep

Re: Pygame, mouse events and threads

2006-08-24 Thread jedi200581
Ben Sizer wrote: [EMAIL PROTECTED] wrote: When I put the content of the run and input functions in the main thread, it's working, why not in the thread? Because event handling needs to be done in the main thread. So does rendering. This is a limitation of the underlying system. As a

Re: Python and STL efficiency

2006-08-24 Thread Neil Cerutti
On 2006-08-23, Mc Osten [EMAIL PROTECTED] wrote: Ray [EMAIL PROTECTED] wrote: Great to know that my model of how the world works is still correct! (at least in relation to Python and C++!) :) So please explain my results. I loop the same number of times. Those of you experiencing a temporary

Re: setuid root

2006-08-24 Thread Ove Svensson
Tiago Simões Batista [EMAIL PROTECTED] writes: Any sugestions? http://www.faqs.org/faqs/unix-faq/faq/part4/section-7.html -- http://mail.python.org/mailman/listinfo/python-list

[ANN]UliPad 3.3 is released

2006-08-24 Thread limodou
What's it? It's an Editor based on wxPython. NewEdit is the old name, and UliPad is the new name. UliPad uses Mixin and Plugin technique as its architecture. Most of its classes can be extended via mixin and plugin components, and finally become an integrity class at creating the

Re: MS SQL Server: NT Authentication. Possible?

2006-08-24 Thread Dirk Hagemann
http://msdn.microsoft.com/msdnmag/issues/05/09/SecurityBriefs/ http://msdn2.microsoft.com/en-us/library/bsz5788z.aspx Thanks for the links Tim! This really seems to go in the right direction. Tomorrow I will talk to my colleague who takes care of the webserver. Dirk --

Re: Python Syntax Highlighting Module

2006-08-24 Thread frikker
thank you! These will be very helpful. I'm not necessarily creating an editor from scratch, but maybe an editor that has some additional custom functionality. Thanks again, blaine gene tani wrote: [EMAIL PROTECTED] wrote: Hello, I have an idea for a project which involves an editor that

Re: Taking data from a text file to parse html page

2006-08-24 Thread Larry Bates
DH wrote: Hi, I'm trying to strip the html and other useless junk from a html page.. Id like to create something like an automated text editor, where it takes the keywords from a txt file and removes them from the html page (replace the words in the html page with blank space) I'm new to

Re: Python and STL efficiency

2006-08-24 Thread skip
Amanjit So on linux its a lot better than that, because - I think - Amanjit ptmalloc is used which is based on dmalloc which is efficient Amanjit for those small size allocs (which malloc() and free() were Amanjit never designed for). And which for Python has been further

Re: Accessing application data portably

2006-08-24 Thread Larry Bates
Tom E H wrote: Larry Bates wrote: Well that's great, but how do you access the ini file portably? From my original post: Then I use ConfigParser in my application... Thanks, but where in the directory structure do you put the ini file on different platforms? Presumably you have to

Re: hide python code !

2006-08-24 Thread Slawomir Nowaczyk
On Wed, 16 Aug 2006 18:35:37 -0700 enigmadude [EMAIL PROTECTED] wrote: # Slawomir Nowaczyk wrote: # On Thu, 10 Aug 2006 17:35:27 -0700 # enigmadude [EMAIL PROTECTED] wrote: # # # 2. I've never done this, but you might be able to encrypt or otherwise # # turn you modules into binary form, and

Re: Record Audio Analysis

2006-08-24 Thread Frank LaFond
Jo Chase wrote: I would like to record audio from a mic and perform some basic analysis on the audio wave patterns produced. What would be the easiest way to accomplish this in Python? Take a look at http://pymedia.org I think it allows the features you want. Frank. --

Re: Pygame, mouse events and threads

2006-08-24 Thread Diez B. Roggisch
[EMAIL PROTECTED] schrieb: Ben Sizer wrote: [EMAIL PROTECTED] wrote: When I put the content of the run and input functions in the main thread, it's working, why not in the thread? Because event handling needs to be done in the main thread. So does rendering. This is a limitation of the

Is there an elegant way to dir() module from inside?

2006-08-24 Thread volcano
I am looking for a way to discover which classes a module contains from inside. I am building a testing class that should, when instatntiated within any module, locate certain classes within the containing module. Words of wisdom? Anybody? -- http://mail.python.org/mailman/listinfo/python-list

Leo 4.4.1 beta 4 released

2006-08-24 Thread Edward K. Ream
Leo 4.4.1 beta 4 is now available at: http://sourceforge.net/project/showfiles.php?group_id=3458package_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.1:

Re: Python Expert

2006-08-24 Thread Perseo
Hi again, I must create a webpage with this service not a standalone software. Is it correct, anyway? have you a little example to show me? Thanks for your suggestions. Frithiof Andreas Jensen wrote: Perseo [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi guys, we are looking

Re: Concatenating arrays

2006-08-24 Thread Robert Kern
Sheldon wrote: Good day everyone, I would like to know if anyone has a fast and concise way of concatenating two 2D arrays of same dimensions? Whenever I try: a = concatenate(b,c) That is not the correct signature. a = concatenate((b, c)) -- Robert Kern I have come to believe that

Re: Is there an elegant way to dir() module from inside?

2006-08-24 Thread davelist
On Aug 24, 2006, at 10:18 AM, volcano wrote: I am looking for a way to discover which classes a module contains from inside. I am building a testing class that should, when instatntiated within any module, locate certain classes within the containing module. Words of wisdom?

Re: Taking data from a text file to parse html page

2006-08-24 Thread DH
Frederic, Good points... I have a plain text file containing the html and words that I want removed(keywords) from the html file, after processing the html file it would save it as a plain text file. So the program would import the keywords, remove them from the html file and save the html file

RE: Best Editor

2006-08-24 Thread Caolan
Title: Re: Best Editor I like ActiveState's KOMODO editor. It is multilanguage compiler editor. Its not free but it is inexpensive for what it does, IMO. I believe they have a 30day free trial and a version for both platforms you mentioned. -Caolan. From: [EMAIL PROTECTED] on behalf

Re: Python and STL efficiency

2006-08-24 Thread Mc Osten
Neil Cerutti [EMAIL PROTECTED] wrote: Those of you experiencing a temporary obsession with this topic are encouraged to study The Great Language Shootout, until the obsession goes away. ;) I think that everybody knows GLS. However, when I have results different from what I expected, I try to

Re: Python and STL efficiency

2006-08-24 Thread Mc Osten
Neil Cerutti [EMAIL PROTECTED] wrote: Those of you experiencing a temporary obsession with this topic are encouraged to study The Great Language Shootout, until the obsession goes away. ;) I think that everybody knows GLS. However, when I have results different from what I expected, I try to

Newbie question about numpy

2006-08-24 Thread Paul Johnston
Hi I'm new to python and have just been taking a look at what it has to offer. I noted the lack of matrices so installed numpy I know the documentation is chargable so wanted a quick play to see if I should buy it However _ from numpy

Re: Best Editor

2006-08-24 Thread JAG CHAN
Neil Cerutti [EMAIL PROTECTED] wrote in news:[EMAIL PROTECTED]: Start with IDLE, which will likely be available everywhere you use Python. The full instructions for using IDLE take up about two pages of text, which means it's lightweight, and it comes preconfigured with good Python

libcurses.so installing Python 2.4.3

2006-08-24 Thread dmulcahy
Folks, I am trying to build the binaries for Python 2.4.3 on a Sun E6900 running SPARC Solaris 9 and using gcc 3.4.2. When the makefile tries to build the _curses extension it fails with a symbol referencing error on mvwgetnstr, which it appears should exist in libcurses.so. For some reason it

Re: Taking data from a text file to parse html page

2006-08-24 Thread Roberto Bonvallet
DH wrote: I'm trying to strip the html and other useless junk from a html page.. Id like to create something like an automated text editor, where it takes the keywords from a txt file and removes them from the html page (replace the words in the html page with blank space) [...] I've

Re: setuid root

2006-08-24 Thread Patrick Useldinger
Tiago Simões Batista wrote: The sysadmin already set the setuid bit on the script, but it still fails when it tries to write to any file that only root has write access to. use sudo. -- http://mail.python.org/mailman/listinfo/python-list

telnetlib thread-safe?

2006-08-24 Thread Jerry
Can anyone tell me if the telnetlib module is thread-safe? I've done some looking, but don't know, and I don't know how to tell from reading the module code. -- http://mail.python.org/mailman/listinfo/python-list

Re: Taking data from a text file to parse html page

2006-08-24 Thread Fredrik Lundh
DH wrote: I have a plain text file containing the html and words that I want removed(keywords) from the html file, after processing the html file it would save it as a plain text file. So the program would import the keywords, remove them from the html file and save the html file as

Re: Newbie question about numpy

2006-08-24 Thread Gabriel Genellina
At Thursday 24/8/2006 12:38, Paul Johnston wrote: from numpy import * a = array([[1,2,3],[4,5,6],[1,2,3]]) b = array([[1,3,6],[2,5,1],[1,1,1]]) print a * b is \n, a * b I know its a long time since my degree but that's not matrix multiplication is it ? No, it's plain element-by-element

Re: Is there an elegant way to dir() module from inside?

2006-08-24 Thread Sion Arrowsmith
volcano [EMAIL PROTECTED] wrote: I am looking for a way to discover which classes a module contains from inside. I am building a testing class that should, when instatntiated within any module, locate certain classes within the containing module. globals().keys() -- \S -- [EMAIL PROTECTED] --

Re: sum and strings

2006-08-24 Thread Tim Chase
Just because something is slow or sub-optimal doesn't mean it should be an error. that's not an error because it would be slow or sub-optimal to add custom objects, that's an error because you don't understand how sum works. (hint: sum != reduce) No, clearly sum!=reduce...no dispute

Re: Newbie question about numpy

2006-08-24 Thread Robert Kern
Paul Johnston wrote: Hi I'm new to python and have just been taking a look at what it has to offer. I noted the lack of matrices so installed numpy You will want to ask numpy questions on the numpy list. http://www.scipy.org/Mailing_Lists numpy arrays are not matrices; they are arrays.

Re: Newbie question about numpy

2006-08-24 Thread Avell Diroll
Paul Johnston wrote: (snip) I noted the lack of matrices so installed numpy (snip) _ from numpy import * a = array([[1,2,3],[4,5,6],[1,2,3]]) b = array([[1,3,6],[2,5,1],[1,1,1]]) (snip) print a * b is \n, a * b

Re: telnetlib thread-safe?

2006-08-24 Thread Fredrik Lundh
Jerry wrote: Can anyone tell me if the telnetlib module is thread-safe? define thread-safe. how do you plan to use it? /F -- http://mail.python.org/mailman/listinfo/python-list

String formatting with nested dictionaries

2006-08-24 Thread [EMAIL PROTECTED]
I've got a bit of code which has a dictionary nested within another dictionary. I'm trying to print out specific values from the inner dict in a formatted string and I'm running into a roadblock. I can't figure out how to get a value from the inner dict into the string. To make this even more

Re: sum and strings

2006-08-24 Thread Fredrik Lundh
Tim Chase wrote: The interpreter is clearly smart enough to recognize when the condition occurs such that it can throw the error...thus, why not add a few more smarts and have it simply translate it into start+''.join(sequence) to maintain predictable behavior according to duck-typing?

Re: Newbie question about numpy

2006-08-24 Thread Robert Kern
Avell Diroll wrote: For matrices multiplication, you could get a hint by typing the following in the interpreter : import numpy dir(numpy) help(numpy.matrixmultiply)#type q to exit Note that the name matrixmultiply() has been deprecated in favor of dot() for many, many years now even

Re: sum and strings

2006-08-24 Thread Gabriel Genellina
At Thursday 24/8/2006 13:12, Tim Chase wrote: The interpreter is clearly smart enough to recognize when the condition occurs such that it can throw the error...thus, why not add a few more smarts and have it simply translate it into start+''.join(sequence) to maintain predictable behavior

Re: String formatting with nested dictionaries

2006-08-24 Thread Diez B. Roggisch
[EMAIL PROTECTED] schrieb: I've got a bit of code which has a dictionary nested within another dictionary. I'm trying to print out specific values from the inner dict in a formatted string and I'm running into a roadblock. I can't figure out how to get a value from the inner dict into the

Re: Best Editor

2006-08-24 Thread abisen
Wow I like the sound of Learning a highly portable, industrial-strength program like Vim or emacs is something I highly recommend. I use Aquamacs (it's emacs with Mac OS-X Interface) and emacs on other platform. It works great for me. Neil Cerutti wrote: On 2006-08-24, JAG CHAN [EMAIL

Re: smtplib needs me to put from/to headers in the message?

2006-08-24 Thread Carl J. Van Arsdall
Dennis Lee Bieber wrote: On Wed, 23 Aug 2006 20:23:57 +, Tobiah [EMAIL PROTECTED] declaimed the following in comp.lang.python: Thank you for the valuable clarification, and the pointers. I will look into the RFC's. I wonder though, whether that will solve my main question, which is

Re: String formatting with nested dictionaries

2006-08-24 Thread Gabriel Genellina
At Thursday 24/8/2006 13:22, [EMAIL PROTECTED] wrote: I've got a bit of code which has a dictionary nested within another dictionary. I'm trying to print out specific values from the inner dict in a formatted string and I'm running into a roadblock. I can't figure out how to get a value from

Matrice Multiplication Problem

2006-08-24 Thread mclaugb
I want to multiply two arrays: a matrice and the conjugate of its transpose. Then i wish to invert the resulting matrix. In Matlab, the statement is : Z= inv(M .' * M) To implement in python, I simply cannot get this to work. Here is my code: from numpy import * import scipy as Sci from

Re: Matrice Multiplication Problem

2006-08-24 Thread Robert Kern
mclaugb wrote: I want to multiply two arrays: a matrice and the conjugate of its transpose. Then i wish to invert the resulting matrix. You will want to ask numpy questions on the numpy mailing list. http://www.scipy.org/Mailing_Lists In Matlab, the statement is : Z= inv(M .' * M)

array tofile to a socket?

2006-08-24 Thread KraftDiner
Can pythons array.tofile method be used for a TCP/IP Socket? ie can the socket be a file object? -- http://mail.python.org/mailman/listinfo/python-list

Re: sum and strings

2006-08-24 Thread Fredrik Lundh
Gabriel Genellina wrote: sequences don't have to be homogeneous, and iterators cant go back. But let GvR say that in his own words: http://mail.python.org/pipermail/python-dev/2003-April/034854.html you could of course dispatch on the type of the second argument (the start value), but

Re: array tofile to a socket?

2006-08-24 Thread Gabriel Genellina
At Thursday 24/8/2006 14:08, KraftDiner wrote: Can pythons array.tofile method be used for a TCP/IP Socket? ie can the socket be a file object? I've never tried, but usually any object with a write() method works fine in these cases. Gabriel Genellina Softlab SRL

lambda

2006-08-24 Thread fegge
what is a lambda expression? -- http://mail.python.org/mailman/listinfo/python-list

Re: array tofile to a socket?

2006-08-24 Thread Gabriel Genellina
At Thursday 24/8/2006 14:08, KraftDiner wrote: Can pythons array.tofile method be used for a TCP/IP Socket? ie can the socket be a file object? I've never tried, but usually any object with a write() method works fine in these cases. Gabriel Genellina Softlab SRL

Re: lambda

2006-08-24 Thread Fredrik Lundh
fegge wrote: what is a lambda expression? that's explained in the documentation, of course; see e.g. http://pyref.infogami.com/lambda /F -- http://mail.python.org/mailman/listinfo/python-list

Re: lambda

2006-08-24 Thread Larry Bates
fegge wrote: what is a lambda expression? You really should try Google first (python lambda): http://www.secnetix.de/~olli/Python/lambda_functions.hawk http://diveintopython.org/power_of_introspection/lambda_functions.html -Larry -- http://mail.python.org/mailman/listinfo/python-list

Re: lambda

2006-08-24 Thread Laszlo Nagy
what is a lambda expression? labmda is a reserved word and AFAIK it is an operatior. By using lamba, you can create an anonymous function. That is, a function without name. For example, doing def create_adder(amount): def adder(x): return x + amount return adder is equvalent

Re: Taking data from a text file to parse html page

2006-08-24 Thread DH
I found this http://groups.google.com/group/comp.lang.python/browse_thread/thread/d1bda6ebcfb060f9/ad0ac6b1ac8cff51?lnk=gstq=replace+text+filernum=8#ad0ac6b1ac8cff51 Credit Jeremy Moles --- finds = ({, }, (, )) lines = file(foo.txt, r).readlines()

Re: String formatting with nested dictionaries

2006-08-24 Thread [EMAIL PROTECTED]
Gabriel Genellina wrote: At Thursday 24/8/2006 13:22, [EMAIL PROTECTED] wrote: I've got a bit of code which has a dictionary nested within another dictionary. I'm trying to print out specific values from the inner dict in a formatted string and I'm running into a roadblock. I can't figure

Re: telnetlib thread-safe?

2006-08-24 Thread Jerry
Fredrik Lundh wrote: define thread-safe. how do you plan to use it? I would like to write a program that spawns ~10 threads. Each thread would get a host to connect to from a Queue object and run then do it's thing (i.e. connecting to the host, running some commands, returning back a success

Python chess

2006-08-24 Thread Paolo Pantaleo
Well Python is not a good language for writing a chess engine (even if a chess engine exists: http://www.kolumbus.fi/jyrki.alakuijala/pychess.html), but it could be grat for chess interfaces, for drawing boards, and similar things. I foudn out a library for these things

Re: What do you want in a new web framework?

2006-08-24 Thread Cliff Wells
On Thu, 2006-08-24 at 04:28 -0700, Paul Boddie wrote: Cliff Wells wrote: On Thu, 2006-08-24 at 04:04 +, Tim Roberts wrote: Cliff Wells [EMAIL PROTECTED] wrote: But there are interesting things in Ruby (and Ruby 2 should take care of lots of warts Ruby 1.8 has) that Python could

can't destroy a wxMiniFrame

2006-08-24 Thread Flavio
Hi, I have a miniframe composed mainly of combo boxes, that I need to destroy and recreate multiple time with different choice lists for the combo boxes. My problem is that even after destroying a miniframe with the Destroy() method, when it is recreated, the combo boxes show the same lists of

Re: can't destroy a wxMiniFrame

2006-08-24 Thread Laszlo Nagy
Flavio írta: Hi, I have a miniframe composed mainly of combo boxes, that I need to destroy and recreate multiple time with different choice lists for the combo boxes. My problem is that even after destroying a miniframe with the Destroy() method, when it is recreated, the combo boxes show

[ANN]pygccxml 0.8.1

2006-08-24 Thread Roman Yakovenko
I'm glad to announce the new version of pygccxml is available. Download page: http://www.language-binding.net/pygccxml/download.html What is it? ...The purpose of the GCC-XML extension is to generate an XML description of a C++ program from GCC's internal representation. Since XML is easy to

Re: telnetlib thread-safe?

2006-08-24 Thread Diez B. Roggisch
Jerry schrieb: Fredrik Lundh wrote: define thread-safe. how do you plan to use it? I would like to write a program that spawns ~10 threads. Each thread would get a host to connect to from a Queue object and run then do it's thing (i.e. connecting to the host, running some commands,

Re: [wxPython-users] [ANN]UliPad 3.3 is released

2006-08-24 Thread Mario Lacunza
Hi,Is possible then you correct the path for download the sources Zip file?? I want to test this tool but I dont could donwload it...Thansk!2006/8/23, limodou [EMAIL PROTECTED]:What's it? It's an Editor based on wxPython. NewEdit is the old name, and UliPadis the new name. UliPad uses

Why can't I subclass off of date ?

2006-08-24 Thread davidfinance
Ok, maybe this is a stupid question, but why can't I make a subclass of datetime.date and override the __init__ method? --- from datetime import date class A(date): def __init__(self, a, b, c, d): print a, b, c, d date.__init__(self, 2006, 12, 11) d = A(1, 2, 3, 4) --- $

Re: [wxPython-users] [ANN]UliPad 3.3 is released

2006-08-24 Thread Mario Lacunza
Sorry, I correct me:Your link in the message not found, but the link in the web site work Ok.Thanks!2006/8/24, Mario Lacunza [EMAIL PROTECTED] :Hi,Is possible then you correct the path for download the sources Zip file?? I want to test this tool but I dont could donwload it...Thansk!2006/8/23,

Re: Python Syntax Highlighting Module

2006-08-24 Thread Cliff Wells
On Mon, 2006-08-21 at 08:19 -0700, gene tani wrote: [EMAIL PROTECTED] wrote: Hello, I have an idea for a project which involves an editor that supports syntax highlighting. This would be for any language, particularly php, html, css, etc. I would like to write this program using python.

Re: setuid root

2006-08-24 Thread Tiago Batista
On Thu, 24 Aug 2006 17:48:26 +0200 Patrick Useldinger [EMAIL PROTECTED] wrote: Tiago Simões Batista wrote: The sysadmin already set the setuid bit on the script, but it still fails when it tries to write to any file that only root has write access to. use sudo. --

  1   2   >