i have error then use ftplib

2006-03-29 Thread Леонов Алексей
Hello! I use this code: from ftplib import FTP def handleDownload(block): file.write(block) print "." file = open('1', 'wb') ftp = FTP('ftp.utk.ru') ftp.set_pasv(1) ftp.login() ftp.retrlines('LIST') ftp.cwd('users/video/Anime/Beyond the Clouds') ftp.retrbinary('RETR "[Triad]_Beyond_th

Re: any() and all() on empty list?

2006-03-29 Thread Steven D'Aprano
Tim Peters wrote: >>In the all() example, if there *are* no values in S, then none of the >>values can be != 0, and IMHO all() should return False. > > > That would break everything mentioned above. Think of it another way: > if all(seq) is false, shouldn't it be the case that you can point to

Re: difference between .cgi and .py

2006-03-29 Thread Erik Max Francis
[EMAIL PROTECTED] wrote: > Hi, > I am new to python.. I have uploaded few scripts in my cgi-bin folder, > some with extension .cgi and some with .py. Only how the Web server is configured. > What is the difference between the two extensions.. which one is more > prefered, do it effects performanc

Re: dynamic construction of variables / function names

2006-03-29 Thread Steven D'Aprano
Sakcee wrote: > python provides a great way of dynamically creating fuctions calls and > class names from string > > a function/class name can be stored as string and called/initilzed > > e.g > > def foo(a,b): > return a+b > > def blah(c,d): > return c*d > > > list = ["foo", "blah"]

Re: any() and all() on empty list?

2006-03-29 Thread Duncan Booth
Ron Adam wrote: > Where we are assembling widgets in a manufacturing plant. Where we don't > want to go to the next step until *all* the sub parts are present. > > if all(part.status == 'present' for part in unit): > do_release() > > Oops! Some empty bins showed up at the next assembly st

Re: difference between .cgi and .py

2006-03-29 Thread Sybren Stuvel
[EMAIL PROTECTED] enlightened us with: > I am new to python.. I have uploaded few scripts in my cgi-bin > folder, some with extension .cgi and some with .py. > > What is the difference between the two extensions.. None at all, except the way you write them. > which one is more prefered That depe

Re: dynamic construction of variables / function names

2006-03-29 Thread Duncan Booth
Sakcee wrote: > python provides a great way of dynamically creating fuctions calls and > class names from string > > a function/class name can be stored as string and called/initilzed > > e.g > > def foo(a,b): > return a+b > > def blah(c,d): > return c*d > > > list = ["foo", "blah"]

does python could support sequence of short or int?

2006-03-29 Thread momobear
hi, is there a way to let python operate on sequence of int or short? In C, we just need declare a point, then I could get the point value, just like: short* k = buffer, //k is a point to a sequence point of short. short i = *k++, but python is a dynamic language, a = buffer i = ? I don't know how

Re: dynamic construction of variables / function names

2006-03-29 Thread Felipe Almeida Lessa
Em Qua, 2006-03-29 às 22:44 -0800, Sakcee escreveu: > either eval or exec should be used > is it correct way, is there a simple way, is this techniqe has a name? eval and exec are insecure. Try looking at globals(): $ python2.4 Python 2.4.3c1 (#2, Mar 29 2006, 08:34:35) [GCC 4.0.3 (Debian 4.0.3-1

Re: python challenge question (string manipulation)

2006-03-29 Thread Felipe Almeida Lessa
Em Qua, 2006-03-29 às 22:20 -0800, Caleb Hattingh escreveu: > That is very succint. Rewriting my shift function given earlier: > > >>> import string > >>> alpha = string.ascii_lowercase > >>> print alpha > abcdefghijklmnopqrstuvwxyz > >>> def shift(lst, n): > return [lst[(i+len(lst)-n)%len(

Re: dynamic construction of variables / function names

2006-03-29 Thread limodou
On 29 Mar 2006 22:44:24 -0800, Sakcee <[EMAIL PROTECTED]> wrote: > python provides a great way of dynamically creating fuctions calls and > class names from string > > a function/class name can be stored as string and called/initilzed > > e.g > > def foo(a,b): > return a+b > > def blah(c,d): >

difference between .cgi and .py

2006-03-29 Thread amaltasb
Hi, I am new to python.. I have uploaded few scripts in my cgi-bin folder, some with extension .cgi and some with .py. What is the difference between the two extensions.. which one is more prefered, do it effects performance ?? Thanks -- http://mail.python.org/mailman/listinfo/python-list

dynamic construction of variables / function names

2006-03-29 Thread Sakcee
python provides a great way of dynamically creating fuctions calls and class names from string a function/class name can be stored as string and called/initilzed e.g def foo(a,b): return a+b def blah(c,d): return c*d list = ["foo", "blah"] for func in list: print func(2,4) o

Re: excel application

2006-03-29 Thread luca72
Thanks Peter Regards Luca -- http://mail.python.org/mailman/listinfo/python-list

Re: Simple py script to calc folder sizes

2006-03-29 Thread Caleb Hattingh
Hi John Your code works on some folders but not others. For example, it works on my /usr/lib/python2.4 (the example you gave), but on other folders it terminates early with StopIteration exception on the os.walk().next() step. I haven't really looked at this closely enough yet, but it looks as

Re: python challenge question (string manipulation)

2006-03-29 Thread Caleb Hattingh
Terry That is very succint. Rewriting my shift function given earlier: >>> import string >>> alpha = string.ascii_lowercase >>> print alpha abcdefghijklmnopqrstuvwxyz >>> def shift(lst, n): return [lst[(i+len(lst)-n)%len(lst)] for i,item in enumerate(lst)] >>> print shift(alpha,2) ['y',

Re: Try Python!

2006-03-29 Thread Ben Finney
"Michael Tobis" <[EMAIL PROTECTED]> writes: > So what is the scoop? Why does Guido say there is no such thing as a > secure Python, and (as is generally reasonable) presuming he is correct > on the matter, how can these sites work safely? "Security is a process, not a product." There's no such

List conversion

2006-03-29 Thread yawgmoth7
Hello, I have a piece of code: command = raw_input("command> ") words = string.split(command, ' ') temparg = words if len(words)<= 3: temparg = words[4:] else: tempar

Re: Try Python!

2006-03-29 Thread Serge Orlov
Michael Tobis wrote: > We had some discussion of this in the edu-sig meeting at PyCon. > > I alleged that I had read that there is no such thing as a Python > sandbox. Others claimed that one could simply preprocess and disallow > "dangerous" constructs. My allegation was based on an argument from

Re: Matplotlib: Histogram with bars inside grid lines...how??

2006-03-29 Thread John Hunter
> "Enigma" == Enigma Curry <[EMAIL PROTECTED]> writes: Enigma> pylab.xlim(0.5,6.5) should be: Enigma> pylab.xlim(min_x-(bar_width/2),max_x+(bar_width/2)) Glad it's working better for you -- just a couple more smallish hints. You might prefer to have your grid lines behind, rather th

Re: Try Python!

2006-03-29 Thread Armin Ronacher
BartlebyScrivener wrote: > Armin, > > Mike Meyer already took a crack at this, and his starts right up just > by clicking on the link. > > http://www.mired.org/home/mwm/try_python/ Hm. Looks not that useful since you can't create any functions and you can remove the prompt :-) > Yours looks pretti

Re: GUI in python

2006-03-29 Thread riplin
For quick, no learning curve, simple: http://www.ferg.org/easygui/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Seems like I want a pre-processor, but...

2006-03-29 Thread Michael Tobis
Well, Bill Mill and I simultaneously and independently decided to write a preprocessor to strip out the unfortunate "@" decorator syntax. I think we were both aiming at a polemic purpose rather than a practical one, but as time fades it seems less clear what we were simultaneously inspired to achie

Re: a hobbyist's dilemma

2006-03-29 Thread Ravi Teja
I don't have any dearth of Python needs ( I now, sort of pay my tuition through Python :-) ). But I use it for fun as well, say gaming. For example, I have scripts that send keystrokes based on voice commands or other keystrokes. Having a productive language like Python at your disposal can help a

Re: Matplotlib: Histogram with bars inside grid lines...how??

2006-03-29 Thread Enigma Curry
pylab.xlim(0.5,6.5) should be: pylab.xlim(min_x-(bar_width/2),max_x+(bar_width/2)) -- http://mail.python.org/mailman/listinfo/python-list

Re: Uninstalling Python

2006-03-29 Thread Pete
John Salerno wrote: > Robert Kern wrote: > >> "Why is Python Installed on my Computer?" FAQ: >> http://www.python.org/doc/faq/installed/ > > Most importantly from that link: > > Some Windows machines also have Python installed. At this writing > we're aware of computers from Hewlett-Packard and Com

Re: Matplotlib: Histogram with bars inside grid lines...how??

2006-03-29 Thread Enigma Curry
Thank you John. Your explanation helped a lot! In case it helps anyone else in the future, here is my code for *exactly* what I was after: import pylab def ryan_hist(data, bar_width, min_x, max_x): """ Create a frequency histogram over a continuous interval min_x = the low end of th

Re: Seems like I want a pre-processor, but...

2006-03-29 Thread Russell Warren
Yes, I definitely should have done that for that case. I'm not entirely sure why I didn't. If I had, though, I may not have been prompted to ask the question and get all the other great little tidbits! -- http://mail.python.org/mailman/listinfo/python-list

Re: a hobbyist's dilemma

2006-03-29 Thread John Salerno
Jim Sizelove wrote: > John Salerno wrote: >> Now that I've learned much of Python, I'm sort of stuck with what to do >> with it. I'm not a professional programmer, so I don't really have a use >> for Python now. But I really want to come up with some neat uses for it >> (for fun, and so I don't

Re: is 2.4.3 final?

2006-03-29 Thread John Salerno
Terry Reedy wrote: > "John Salerno" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> I just noticed on one page of the Python website that it said: >> >> "We are pleased to announce the release of Python 2.4.3 (final), a >> bugfix release of Python 2.4, on March 29, 2006." > > I b

Re: Uninstalling Python

2006-03-29 Thread John Salerno
Robert Kern wrote: > "Why is Python Installed on my Computer?" FAQ: > http://www.python.org/doc/faq/installed/ Most importantly from that link: Some Windows machines also have Python installed. At this writing we're aware of computers from Hewlett-Packard and Compaq that include Python. Appare

Re: a hobbyist's dilemma

2006-03-29 Thread Jim Sizelove
John Salerno wrote: > Now that I've learned much of Python, I'm sort of stuck with what to do > with it. I'm not a professional programmer, so I don't really have a use > for Python now. But I really want to come up with some neat uses for it > (for fun, and so I don't just start forgetting it r

Re: GUI in python

2006-03-29 Thread Peter Decker
On 29 Mar 2006 14:20:03 -0800, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I am a python newbie and have used it for about a month. I want to make > a simple GUI app in Python ( I take input form user and do processing > and show results). > > Which gui package is good for me. I need to do it q

Re: Uninstalling Python

2006-03-29 Thread Michael Ekstrand
Pete wrote: > Ben Finney wrote: >> "Pete" <[EMAIL PROTECTED]> writes: >> >>> I googled "python" and have no interest in it and know nothing about >>> it. >>> >>> Therefore, I would like to uninstall both the versions since I do >>> not believe I need them. Would it be okay to uninstall them or >>

Re: Try Python!

2006-03-29 Thread Terry Reedy
"Michael Tobis" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] ... > I refer you in particular to these messages from BDFL: > > http://mail.python.org/pipermail/python-dev/2002-December/031246.html This one says that new style classes in 2.2 opened a new, sizable, security hole. O

Re: Matplotlib: Histogram with bars inside grid lines...how??

2006-03-29 Thread John Hunter
> "Enigma" == Enigma Curry <[EMAIL PROTECTED]> writes: Enigma> I'm playing around with matplotlib for the first time. I'm Enigma> trying to make a very simple histogram of values 1-6 and Enigma> how many times they occur in a sequence. However, after Enigma> about an hour of se

Re: Uninstalling Python

2006-03-29 Thread Robert Kern
Pete wrote: > I am using xpsp2, and I have two versions of python (2.2 and 2.2.3 - both > are listed as 29.3 mb, and listed as rarely used, which means never to me) > listed in add/remove programs in the control panel. I assume they were put > in by HP out of the factory install, when I got my

Re: symbolic links, aliases, cls clear

2006-03-29 Thread SM Ryan
"mp" <[EMAIL PROTECTED]> wrote: # i have a python program which attempts to call 'cls' but fails: # # sh: line 1: cls: command not found # # i tried creating an alias from cls to clear in .profile, .cshrc, and # /etc/profile, but none of these options seem to work. # # my conclusion is that a py

Re: No Cookie: how to implement session?

2006-03-29 Thread Alex Martelli
Aahz <[EMAIL PROTECTED]> wrote: > In article <[EMAIL PROTECTED]>, > Alex Martelli <[EMAIL PROTECTED]> wrote: > > > >Cookies aren't "tricks" -- they are THE standard, architected solution > >for session persistence in HTTP 1.1 -- people who disable them are > >saying they do not *WANT* persistent s

Re: gtk.spinbutton and set_value

2006-03-29 Thread John Bushnell
Sandro Dentella wrote: > Hi all, > > why my spinbutton doesn't show '120'? > why, if I write in a number, it is reset to 0 wen Enter is pressed? > > TYA > sandro > > >import gtk > >w = gtk.Window() >spin = gtk.SpinButton() >w.add(spin) >w.show_all() >spin.set_value(1

Re: is 2.4.3 final?

2006-03-29 Thread Terry Reedy
"John Salerno" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >I just noticed on one page of the Python website that it said: > > "We are pleased to announce the release of Python 2.4.3 (final), a > bugfix release of Python 2.4, on March 29, 2006." I believe today was the target dat

[ANN] Dabo Runtime Engine For Windows 0.6.2 released

2006-03-29 Thread Ed Leafe
The Dabo Runtime Engine for Windows is a self-contained environment that allows you to run Dabo on Windows without having to first install all of the requirements. It comes with its own version of Python 2.4.2, wxPython 2.6.3.0, MySQLdb 1.2.0, kinterbasdb 3.2.0a1, ReportLab v.2463,

Re: Uninstalling Python

2006-03-29 Thread Pete
Ben Finney wrote: > "Pete" <[EMAIL PROTECTED]> writes: > >> I googled "python" and have no interest in it and know nothing about >> it. >> >> Therefore, I would like to uninstall both the versions since I do >> not believe I need them. Would it be okay to uninstall them or >> would you recommend

Re: Uninstalling Python

2006-03-29 Thread Ben Finney
"Pete" <[EMAIL PROTECTED]> writes: > I googled "python" and have no interest in it and know nothing about it. > > Therefore, I would like to uninstall both the versions since I do not > believe I need them. Would it be okay to uninstall them or would you > recommend that I keep them even thoug

Re: Content Management System

2006-03-29 Thread Adam
On Wed, 29 Mar 2006 16:32:39 GMT, Adrienne Boswell wrote: >Gazing into my crystal ball I observed "Water Cooler v2" ><[EMAIL PROTECTED]> writing in news:1143627824.174540.13710 >@z34g2000cwc.googlegroups.com: > >> I know what it is, and yet the knowledge of what a CMS is, is so vague >> that I fi

Uninstalling Python

2006-03-29 Thread Pete
I am using xpsp2, and I have two versions of python (2.2 and 2.2.3 - both are listed as 29.3 mb, and listed as rarely used, which means never to me) listed in add/remove programs in the control panel. I assume they were put in by HP out of the factory install, when I got my pc last April, since

Updated: python ctype question about "access violation reading location 0x5a5a5a5a"

2006-03-29 Thread Yanping Zhang
Here are more details about my codes, please help! The function declared in C: typedef void (WINAPI *PLEARNCALLBACKPROC) (unsigned int progress, unsigned int sigQuality, unsigned long carrierFreq, void *userData); UUIRTDRV_API BOOL PASCAL UUIRTLearnIR(HUUHANDLE hHandle, int codeFormat, char *IR

Re: any() and all() on empty list?

2006-03-29 Thread Ron Adam
Carl Banks wrote: > Steve R. Hastings wrote: >> I'm completely on board with the semantics for any(). But all() bothers >> me. If all() receives an empty list, it will return True, and I don't >> like that. To me, all() should be a more restrictive function than any(), >> and it bothers me to se

Re: Matplotlib: Histogram with bars inside grid lines...how??

2006-03-29 Thread Enigma Curry
Two things: 1) I now see where width is defined in the hist() documentation... I was expecting it to be in the definition up at the top, but instead the definition has **kwords.. not very helpful. 2) I noticed in my original historgram, that the y scale was not the same as the x scale.. so I upda

Matplotlib: Histogram with bars inside grid lines...how??

2006-03-29 Thread Enigma Curry
I'm playing around with matplotlib for the first time. I'm trying to make a very simple histogram of values 1-6 and how many times they occur in a sequence. However, after about an hour of searching I cannot make the histogram stay within the bounds of the grid lines. Here is my example: pylab.gr

Re: any() and all() on empty list?

2006-03-29 Thread Ron Adam
Paul Rubin wrote: > Ron Adam <[EMAIL PROTECTED]> writes: >> Just thinking about things. I really just want what is best for >> Python in the long term and am not trying to be difficult. > > I'm sorry, maybe it's the math geek in me, but I just see all those > suggestions about "not not S" as bein

Re: ldap usage

2006-03-29 Thread Jed Parsons
Hi, Michael, Thanks very much for your response. I think I can work it out now. >> authenticated = False > ^^^ > Identiation is wrong here. Yes, sorry about that - doesn't always work on this email client :( As an addendum, I discovered one little gotcha, namely that this:

Re: bandwidth shaping on urllib2

2006-03-29 Thread Larry Bates
outune wrote: > Hello, > I'm using urllib2 with threading and semaphore, > it works fine, but can I set a bandwidth limit in that process? > Use cstream: http://www.cons.org/cracauer/cstream.html or Wonder Shaper: http://lartc.org/wondershaper/ -Larry Bates -- http://mail.python.org/mailman/l

Re: Try Python!

2006-03-29 Thread Paul Rubin
"Michael Tobis" <[EMAIL PROTECTED]> writes: > So what is the scoop? Why does Guido say there is no such thing as a > secure Python, and (as is generally reasonable) presuming he is correct > on the matter, how can these sites work safely? One way is to run the Python interpreter itself in a sandb

Re: Try Python!

2006-03-29 Thread Michael Tobis
We had some discussion of this in the edu-sig meeting at PyCon. I alleged that I had read that there is no such thing as a Python sandbox. Others claimed that one could simply preprocess and disallow "dangerous" constructs. My allegation was based on an argument from authority; I recalled reading

Re: Apache and Python and Ubuntu

2006-03-29 Thread msuemnig
Thanx a lot for your input and advice. I went through the documentation on httpd.apache.org/docs/2.2/howto/cgi.html and added the following: AddModule cgi-script .cgi .py Options +ExecCGI It now gives me a 403 forbidden. When I check the error logs, it still says that Options ExecCGI is not t

Re: excel application

2006-03-29 Thread Petr Jakes
Luca, you can find a lot of answers to your questions on this discussion group. If you will try to search using key words "excel constants" for example, you will get the link to the following link (among others): http://tinyurl.com/go3qf IMHO it is good idea to search the web and discussion groups

Re: Content Management System

2006-03-29 Thread Jeff
Water Cooler v2 wrote: > I know what it is, and yet the knowledge of what a CMS is, is so vague > that I find myself asking this question every now and then. I've > googled and read the resources too. However, the knowledge is still not > clear. It is so vague. > > > Me: Just what is a content ma

Re: symbolic links, aliases, cls clear

2006-03-29 Thread Chris F.A. Johnson
On 2006-03-29, mp wrote: > i have a python program which attempts to call 'cls' but fails: > > sh: line 1: cls: command not found > > i tried creating an alias from cls to clear in .profile, .cshrc, and > /etc/profile, but none of these options seem to work. Why not call 'clear', since 'cls' do

Re: LDTP 0.4.0 released !!!

2006-03-29 Thread Ben Finney
"A Nagappan" <[EMAIL PROTECTED]> writes: > Welcome to the seventh issue of LDTP Newsletter! Nowhere in this newsletter do I see anything germane to a forum about Python. Why post it here, rather than somewhere more related to Linux or Desktops or Testing? And no, "because many Python programmers

Re: Seems like I want a pre-processor, but...

2006-03-29 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Russell Warren <[EMAIL PROTECTED]> wrote: . . . >Anyway - it worked... you've answered my question perfectly, thanks. I >hadn't considered that the module loading phase could basically used >for

Re: operation complexities of lists and dictionaries

2006-03-29 Thread Paul Rubin
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > what are the time complexities of inserting / removing / checking if an > element is present in 1) a list and 2) a dictionary? > does anybody know? I assume in the list case, the element you want to operate on is in the middle of the list. In CPyt

Re: symbolic links, aliases, cls clear

2006-03-29 Thread Keith Thompson
"mp" <[EMAIL PROTECTED]> writes: > i have a python program which attempts to call 'cls' but fails: > > sh: line 1: cls: command not found > > i tried creating an alias from cls to clear in .profile, .cshrc, and > /etc/profile, but none of these options seem to work. > > my conclusion is that a pyth

Re: how to capture os.execvp into variable

2006-03-29 Thread Ben C
On 2006-03-28, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > hi > i am using this code to run a ps command in unix > > def run(program, *args): > pid = os.fork() > if not pid: > os.execvp(program, (program,) + args) > return os.wait()[0] > > run("ps", "-eo pid,ppid,args") > >

Re: operation complexities of lists and dictionaries

2006-03-29 Thread Ben Finney
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > what are the time complexities of inserting / removing / checking if an > element is present in 1) a list and 2) a dictionary? Partly dependent on the implementation, of which there are several for Python (CPython, Jython, PyPy, and others). Which

Re: Apache and Python and Ubuntu

2006-03-29 Thread Jorge Godoy
[EMAIL PROTECTED] writes: > The problem is the programs just dump the contents to the browser in > plain text. Or, in the case of the .py files, I am prompted to > download the .py file. How can I get apache to recognize that it > should execute the .cgi script? > > Is there any special thing I

bandwidth shaping on urllib2

2006-03-29 Thread outune
Hello, I'm using urllib2 with threading and semaphore, it works fine, but can I set a bandwidth limit in that process? -- http://mail.python.org/mailman/listinfo/python-list

Re: Apache and Python and Ubuntu

2006-03-29 Thread grahamd
[EMAIL PROTECTED] wrote: > I've create an Ubuntu Linux box, which comes pre-installed with Python > (I've added the libapache2-mod-python throught the app manager). I've > created .cgi and .py simple programs in the www root of apache. > > The problem is the programs just dump the contents to th

symbolic links, aliases, cls clear

2006-03-29 Thread mp
i have a python program which attempts to call 'cls' but fails: sh: line 1: cls: command not found i tried creating an alias from cls to clear in .profile, .cshrc, and /etc/profile, but none of these options seem to work. my conclusion is that a python program that is executing does not use the

Apache and Python and Ubuntu

2006-03-29 Thread msuemnig
I've create an Ubuntu Linux box, which comes pre-installed with Python (I've added the libapache2-mod-python throught the app manager). I've created .cgi and .py simple programs in the www root of apache. The problem is the programs just dump the contents to the browser in plain text. Or, in th

Re: GUI in python

2006-03-29 Thread I. Myself
[EMAIL PROTECTED] wrote: > Hi, > > I am a python newbie and have used it for about a month. I want to make > a simple GUI app in Python ( I take input form user and do processing > and show results). > > Which gui package is good for me. I need to do it quick and I would not > want a long learning

Re: operation complexities of lists and dictionaries

2006-03-29 Thread Steven D'Aprano
On Wed, 29 Mar 2006 09:38:05 -0800, [EMAIL PROTECTED] wrote: > > hi, > i've just a simple question: > what are the time complexities of inserting / removing / checking if an > element is present in 1) a list and 2) a dictionary? > does anybody know? > thanks No no no, that's not the way to ask t

GUI in python

2006-03-29 Thread diffuser78
Hi, I am a python newbie and have used it for about a month. I want to make a simple GUI app in Python ( I take input form user and do processing and show results). Which gui package is good for me. I need to do it quick and I would not want a long learning curve. I was taking look at wxPython,

Re: python challenge question (string manipulation)

2006-03-29 Thread Terry Reedy
"John Salerno" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > John Salerno wrote: > >> It works, but is there a better way to shift the letters of the alphabet >> for 'code'? I remember a method that did this for lists, I think, but I >> can't remember what it was or if it worked f

RELEASED Python 2.4.3, final.

2006-03-29 Thread Anthony Baxter
On behalf of the Python development team and the Python community, I'm happy to announce the release of Python 2.4.3 (final). Python 2.4.3 is a bug-fix release. See the release notes at the website (also available as Misc/NEWS in the source distribution) for details of the more than 50 bugs squis

Re: a hobbyist's dilemma

2006-03-29 Thread Terry Reedy
"John Salerno" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >> Try creating simple games using PyGame. Think of simple things like >> minesweeper. >> > > Actually, PyGame *is* something I am interested in experimenting with. I > definitely want to use it, but I also want to try som

Re: tkinter question

2006-03-29 Thread linuxnooby
Ultimately what I am trying to is create a public computer session manager. 1) User logs in and main application window is withdrawn (easy) 2) After (for example) 55 minutes - a warning window/dialoguebox "session will end in 5 minutes" 3) With 30 seconds to go - a warning window/dialoguebox "ses

Re: python challenge question (string manipulation)

2006-03-29 Thread Felipe Almeida Lessa
Em Qua, 2006-03-29 às 19:34 +, John Salerno escreveu: > alphabet = string.ascii_lowercase > code = string.ascii_lowercase[2:] + string.ascii_lowercase[:2] > > Yet it still seems kind of verbose. But since that's the official > solution, I guess there's no other way to shift the characters in

Re: Python Debugger / IDE ??

2006-03-29 Thread Christoph Zwerschke
Don Taylor wrote: > Is there a free or low-cost version of Delphi for Windows available > anywhere? I don't know (never used Delphi actually). Anyway, you don't need to have Delphi to use PyScripter, and PyScripter is completely free. However, it will only run on Windows because it is developed

is 2.4.3 final?

2006-03-29 Thread John Salerno
I just noticed on one page of the Python website that it said: "We are pleased to announce the release of Python 2.4.3 (final), a bugfix release of Python 2.4, on March 29, 2006." Yet elsewhere it refers to it as a "release candidate" and still refers to 2.4.2 as the "current production version

Re: Command line option -Q (floor division)

2006-03-29 Thread Georg Brandl
Christoph Zwerschke wrote: > Just for the records, Anthony Baxter explained that this is by intent, > because it would be still too disruptive a change. The testsuite does > not even run completely with -Qnew yet. Now it does, thanks for the nudge. ;) > So it will be probably only changed with

Re: No Cookie: how to implement session?

2006-03-29 Thread I V
Sullivan WxPyQtKinter wrote: > As you said, There is no solution? I mean, tracing a real session > without using tricks like hidden field and cookies in CGI script? As people have said, this isn't a limitation of python, it's a feature of HTTP. You might want to consider whether you actually n

Re: Convert Word .doc to Acrobat .pdf files

2006-03-29 Thread kbperry
Wow...thanks again for the replies! I will try both of these out at work tomorrow. (I only work 3 days a week because of school). Thanks, Keith www.301labs.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Free Python IDE ?

2006-03-29 Thread Fabio Zadrozny
On 3/29/06, Jarek Zgoda <[EMAIL PROTECTED]> wrote: Ernesto napisał(a):> I'm looking for a tool that I can use to "step through" python software> (debugging environment).  Is there a good FREE one (or one which is> excellent and moderately priced ) ? Good free: PyDev for Eclipse.Good moderately pric

Re: Try Python!

2006-03-29 Thread BartlebyScrivener
Armin, Mike Meyer already took a crack at this, and his starts right up just by clicking on the link. http://www.mired.org/home/mwm/try_python/ Yours looks prettier, but I don't think novices are going to be able to figure out how to start it. Regards, rick -- http://mail.python.org/mailman/

Re: Free Python IDE ?

2006-03-29 Thread Colin J. Williams
Ernesto wrote: > I'm looking for a tool that I can use to "step through" python software > (debugging environment). Is there a good FREE one (or one which is > excellent and moderately priced ) ? > Ernesto, If you are using Windows then you migt consider PyScripter. http://mmm-experts.com/ Coli

Re: Free Python IDE ?

2006-03-29 Thread Jarek Zgoda
Ernesto napisał(a): > I'm looking for a tool that I can use to "step through" python software > (debugging environment). Is there a good FREE one (or one which is > excellent and moderately priced ) ? Good free: PyDev for Eclipse. Good moderately priced: Komodo. But from my long experience with

Re: python challenge question (string manipulation)

2006-03-29 Thread John Salerno
Caleb Hattingh wrote: > Also, I suspect you meant to say: > alphabet = string.ascii_lowercase code = alphabet[2:] + alphabet[:2] Ah yes, I see what you did there. :) > I actually create a new list here, although since lists are mutable, I > could probably just change items in-place.

Re: python challenge question (string manipulation)

2006-03-29 Thread Caleb Hattingh
John In python, strings are immutable - you have to create a new string no matter what you do. Also, I suspect you meant to say: >>> alphabet = string.ascii_lowercase >>> code = alphabet[2:] + alphabet[:2] I had a similar need recently for a guitar chord generator program I've been working on.

Re: Tkinter and fixed-size frames

2006-03-29 Thread msoulier
> calling pack_propagate(0) on the parent widget should work: Indeed it does. Many thanks. Mike -- http://mail.python.org/mailman/listinfo/python-list

Try Python!

2006-03-29 Thread Armin Ronacher
Hiho, One week ago I came across the nice `Try Ruby!`_ demonstration which features an ajax based ruby console and a 20 minutes ruby tutorial. I really liked that application and so I started to port that to python. Since I got a bit confused by the very complex javascript code I wrote a webconsol

Re: Free Python IDE ?

2006-03-29 Thread Caleb Hattingh
Hi Ernesto SPE, or Stani's python editor is actually a decent IDE that can lauch the winpdb debugger to step through code, with side windows for locals, and watches and so on. It's not exactly integrated debugging a la Delphi, but in general my need for debugging is much less with python; the fe

Re: COM callbacks in Python

2006-03-29 Thread Dan
One final note, The code posted does work. Unfortunately, the event only fires for the ADO connection who actually triggered the event. In my opinion, completely useless event. So the Python worked, The ADO does not do what its name implies. Thanks to all. Dan -- http://mail.python.org/mailman/li

Re: operation complexities of lists and dictionaries

2006-03-29 Thread Caleb Hattingh
Hi Use the "timeit" module, like so: >>> from timeit import Timer >>> t = Timer('[i for i in range(1)]') # The string is code to execute >>> (for timing) >>> print t.timeit(100) # execute it 100 times and print the result 0.222389936447 I would appreciate it if you could present your resul

Re: Creating COM server Events?

2006-03-29 Thread Dan
Here is what little I have so far. I can use clients to call the advise method and store in the mylist set (should be named myset i guess). Now, I want the client to have to implement a callback and register the interface in the AdviseChange method. glcount=0 mylist= set() class TestTTechPycom:

Re: Validating Syntax only with PyParser_SimpleParseString ?

2006-03-29 Thread olsongt
[EMAIL PROTECTED] wrote: > I am seeking for a method to parse single lines of Python code (infact > they are only formulas, so I generate a line like RESULT=). I > do only want to know if the syntax is correct and if there is an error > best would be to know where. > > I did find PyParser_SimplePa

Re: Terminating a subprocess question

2006-03-29 Thread Fredrik Lundh
Ernesto wrote: > > > tn = telnetlib.Telnet("localhost",6000) > > > print tn.read_all() > > > # CRASH > > > > that's an unusual error message. are you sure you didn't get a > > traceback? if so, what did it say? > > I was running it directly in a python shell. After the tn.read_all() > call, the

Re: python challenge question (string manipulation)

2006-03-29 Thread John Salerno
John Salerno wrote: > It works, but is there a better way to shift the letters of the alphabet > for 'code'? I remember a method that did this for lists, I think, but I > can't remember what it was or if it worked for strings. Ah ha! This is cleaner: alphabet = string.ascii_lowercase code = st

Re: a hobbyist's dilemma

2006-03-29 Thread Gerard Flanagan
John Salerno wrote: > Now that I've learned much of Python, I'm sort of stuck with what to do > with it. I'm not a professional programmer, so I don't really have a use > for Python now. But I really want to come up with some neat uses for it > (for fun, and so I don't just start forgetting it rig

python challenge question (string manipulation)

2006-03-29 Thread John Salerno
Ok, for those who have gotten as far as level 2 (don't laugh!), I have a question. I did the translation as such: import string alphabet = string.lowercase[:26] code = string.lowercase[2:26] + 'ab' clue = "g fmnc wms bgblr rpylqjyrc gr zw fylb. rfyrq ufyr amknsrcpq ypc dmp. bmgle gr gl zw fyl

  1   2   3   >