Re: Django for database driven web application is OK?

2007-10-03 Thread Bruno Desthuilliers
cuongvt a écrit : > Hello > I'm new to both Django and Python. I'm mainly developing on PHP. > I tend to move to Django. But I want to confirm as below: > I heard that Django is mainly used for something like content management, > CMS or something > like that and Rails is mainly for web applica

Having fun with python

2007-10-03 Thread Tzury
def loadResMap(self): self.resMap = [] [[self.resMap.append(str('A2' + sim[0] + '/r' + str(x))) for x in range(1, eval(sim[1])+1)] for sim in [x.split(':') for x in quickViews.smsResList.v.split(",")]] ''' # Confuse

Re: Python and SSL

2007-10-03 Thread Johny
On Oct 3, 7:51 am, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > > a certificate that is signed by OpenSSL's own CA( certification > > authority), that is not recognized in the program's list of root CAs, > > causes an exception to be raised. > > What is "the program"? What programming language i

Re: List Question

2007-10-03 Thread Paul Hankin
On Oct 2, 11:09 pm, Paul McGuire <[EMAIL PROTECTED]> wrote: > On Oct 2, 4:20 pm, Paul Hankin <[EMAIL PROTECTED]> wrote: > > On Oct 2, 10:06 pm, brad <[EMAIL PROTECTED]> wrote: > > > > How is this expressed in Python? > > > > If x is in y more than three times: > > > print x > > > > y is a Pyth

Re: Django for database driven web application is OK?

2007-10-03 Thread Jarek Zgoda
cuongvt napisał(a): > I'm new to both Django and Python. I'm mainly developing on PHP. > I tend to move to Django. But I want to confirm as below: > I heard that Django is mainly used for something like content management, > CMS or something > like that and Rails is mainly for web applications.

Re: random keypress bounce in a terminal

2007-10-03 Thread István
Bjoern Schliessmann írta: > István wrote: > > >> It works fine as long as I hit keys normally, but gives extra >> characterts if I keep pressing some key, e.g. up or down arrow >> keys. It runs on a Linux system. What's the wrong with it? >> > > Nothing. Linux VTs will generate multiple cha

Re: Python and SSL

2007-10-03 Thread Gabriel Genellina
En Wed, 03 Oct 2007 04:32:04 -0300, Johny <[EMAIL PROTECTED]> escribi�: > MyPythonProgram --->Proxy>Server > The proxy is written in Java. I want to use that proxy to see what my > Python program sends to server. > The proxy uses its own certificate and this certificate must be > trusted, I t

Re: I earn $36800 a month with google adsense

2007-10-03 Thread Gabriel Genellina
En Tue, 02 Oct 2007 15:22:57 -0300, Wildemar Wildenburger <[EMAIL PROTECTED]> escribi�: > Dude, you, even as a spammer, can learn a lot from this group. As Diez > pointed out, you will want to quote the site that you're spamvertising > (Bastard!), so your pagerank rises. > Pretty new to the biz,

Re: Having fun with python

2007-10-03 Thread Duncan Booth
Tzury <[EMAIL PROTECTED]> wrote: > def loadResMap(self): > self.resMap = [] > [[self.resMap.append(str('A2' + sim[0] + '/r' + str(x))) > for x in range(1, eval(sim[1])+1)] > for sim in [x.split(':') > for x in quickViews.smsResLis

generating range of numbers

2007-10-03 Thread vimal
hi all, i am new to python. i just want to generate numbers in the form like: 1,2,4,8,16,32.to a maximum of 1024 using a range function -- http://mail.python.org/mailman/listinfo/python-list

Re: Subprocesses on Windows

2007-10-03 Thread Tim Golden
Nachiket Joshi wrote: > Well before I explain my problem, let me tell you all that > I am not a professional programmer and new to python too. Welcome to the world of Python, home to professional and non-professional programmers alike! > I just write some scripts as and when required Same coul

A Must Read!!!

2007-10-03 Thread [EMAIL PROTECTED]
I have found an excellent resource on Object Oriented Programming. http://technical-talk.com/SoftDev/OOP/OOPBASICS.asp -- http://mail.python.org/mailman/listinfo/python-list

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-10-03 Thread Bent C Dalager
In article <[EMAIL PROTECTED]>, Frank Goenninger <[EMAIL PROTECTED]> wrote: > >Well, I didn't start the discussion. So you should ask the OP about the >why. I jumped in when I came across the so often mentioned "hey, it's >all well defined" statement was brought in. I simply said that if that >

Re: generating range of numbers

2007-10-03 Thread Andreas Tawn
>i just want to generate numbers in the form like: > >1,2,4,8,16,32.to a maximum of 1024 >using a range function >>> a = [2**x for x in range(11)] >>> a [1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024] Cheers, Andreas Tawn Lead Technical Artist Ubisoft Reflections -- http://mail.python.org/ma

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-10-03 Thread David Kastrup
[EMAIL PROTECTED] (Bent C Dalager) writes: > In article <[EMAIL PROTECTED]>, > Frank Goenninger <[EMAIL PROTECTED]> wrote: >> >>Well, I didn't start the discussion. So you should ask the OP about the >>why. I jumped in when I came across the so often mentioned "hey, it's >>all well defined" sta

Re: toprettyxml messes up with whitespaces

2007-10-03 Thread Jorgen Bodde
Hi there, Thank you for confirming this, I did manage a work around. When reading back the XML file, I strip it off it's whitespaces before I parse it. Then when writing it back no excessive whitespaces are appended. My best guess is that toprettyxml is not intelligently handling whitespaces that

Re: generating range of numbers

2007-10-03 Thread Amit Khemka
On 10/3/07, vimal <[EMAIL PROTECTED]> wrote: > hi all, > > i am new to python. > i just want to generate numbers in the form like: > > 1,2,4,8,16,32.to a maximum of 1024 > > using a range function [2**i for i in range(11)] This is a list comprehension, for more have a lo

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-10-03 Thread Bent C Dalager
In article <[EMAIL PROTECTED]>, David Kastrup <[EMAIL PROTECTED]> wrote: >[EMAIL PROTECTED] (Bent C Dalager) writes: > >> In article <[EMAIL PROTECTED]>, >> Frank Goenninger <[EMAIL PROTECTED]> wrote: >>> >>>Well, I didn't start the discussion. So you should ask the OP about the >>>why. I jumped

Re: generating range of numbers

2007-10-03 Thread Michael Bentley
On Oct 3, 2007, at 2:18 AM, vimal wrote: > i am new to python. > i just want to generate numbers in the form like: > > 1,2,4,8,16,32.to a maximum of 1024 > > using a range function I don't think it can be done with *only* a range function... import math [pow(2, x) for

Building VTK-5.0.3-1 with Python bindings (VS 8.0)

2007-10-03 Thread Anonymous
I am having problems with CMake. I currently have the ff errors (paths not set - and I am not sure what to set them to): TK_INCLUDE_PATH TK_INTERNAL_PATH TK_XLIB_PATH (I don't know why this is reqd, since I'm running W2k) Has anyone done this before or now how to fix these errors ? -- http://

Re: toprettyxml messes up with whitespaces

2007-10-03 Thread Paul Boddie
On 3 Okt, 11:30, "Jorgen Bodde" <[EMAIL PROTECTED]> wrote: > > Thank you for confirming this, I did manage a work around. When > reading back the XML file, I strip it off it's whitespaces before I > parse it. Then when writing it back no excessive whitespaces are > appended. My best guess is that t

interfacing Python interpreter with a VB6 frontend

2007-10-03 Thread Anonymous
I am trying something which appears (so far), that many other people have not yet tried before - since I can't find any useful related material despite several days of searching various sites/blogs etc. I want to use VB6 as a front end for building a small GUI console that accepts python comman

Re: module confusion

2007-10-03 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Robert Kern wrote: > Lawrence D'Oliveiro wrote: > >> In message <[EMAIL PROTECTED]>, Robert >> Kern wrote: >> >>> Not all of the modules in a package are imported by importing the >>> top-level package. >> >> You can't import packages, only modules. >> >>> os.pat

Re: toprettyxml messes up with whitespaces

2007-10-03 Thread Jorgen Bodde
Hi Paul, > This seems like a reasonable explanation without having looked at the > source code myself. It's by thorough investigation ;-) > Which part of the standard is this? Here's the XML 1.0 specification's > section on whitespace: > > http://www.w3.org/TR/2006/REC-xml-20060816/#sec-white-sp

Re: module confusion

2007-10-03 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Steve Holden wrote: > You *can* import a package ... You're right. I was misremembering the behaviour of PyCrypto, where importing the upper-level packages do little more than give you a list of what algorithms are available. -- http://mail.python.org/mailman/list

Re: python 2.5 and 3gb switch

2007-10-03 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, neil wrote: > The scene is very large requiring me to use a 3gb switch enabled version > of Blender and of course boot into a 3gb XP. Why not just use a proper 64-bit OS? Since Blender is also open-source, there's no requirement that you be hobbled by Dimdows. --

Re: module confusion

2007-10-03 Thread Ben Finney
Lawrence D'Oliveiro <[EMAIL PROTECTED]> writes: > On my Gentoo system: > > >>> import os > >>> os.path > > > It's just a variable that happens to point to the posixpath module. There's no "pointing" going on. It's another name bound to the same object, of equal status to the 'posix

RE: interfacing Python interpreter with a VB6 frontend

2007-10-03 Thread Ryan Ginstrom
> On Behalf Of Anonymous > This requires several steps, but the one I am having most > problem finding info on is the ff: > > 1. using/interacting the Python interpreter from VB6 One way to do this might be by creating a COM server with Python, and having VB feed it lines of text and then collec

Re: interfacing Python interpreter with a VB6 frontend

2007-10-03 Thread Anonymous
Ryan Ginstrom wrote: >>On Behalf Of Anonymous >>This requires several steps, but the one I am having most >>problem finding info on is the ff: >> >>1. using/interacting the Python interpreter from VB6 > > > One way to do this might be by creating a COM server with Python, and having > VB feed

Re: module confusion

2007-10-03 Thread Bruno Desthuilliers
Lawrence D'Oliveiro a écrit : > In message <[EMAIL PROTECTED]>, Robert > Kern wrote: > >> Lawrence D'Oliveiro wrote: >> >>> In message <[EMAIL PROTECTED]>, Robert >>> Kern wrote: >>> Not all of the modules in a package are imported by importing the top-level package. >>> You can't import

Re: A total bullshit (was : A Must Read!!!)

2007-10-03 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : > I have found an excellent resource on Object Oriented Programming. > > (url snipped to protect the innocents) Let's see: "An object has methods, properties and events." Hem... "oriented programming probably existed before the concept of a class came into being b

Re: module confusion

2007-10-03 Thread Gabriel Genellina
En Wed, 03 Oct 2007 07:12:17 -0300, Lawrence D'Oliveiro <[EMAIL PROTECTED]> escribi�: > In message <[EMAIL PROTECTED]>, Robert > Kern wrote: > >> Lawrence D'Oliveiro wrote: >> >>> In message <[EMAIL PROTECTED]>, >>> Robert >>> Kern wrote: >>> Not all of the modules in a package are import

Re: interfacing Python interpreter with a VB6 frontend

2007-10-03 Thread Giles Brown
On 3 Oct, 11:07, Anonymous <[EMAIL PROTECTED]> wrote: > I am trying something which appears (so far), that many other people > have not yet tried before - since I can't find any useful related > material despite several days of searching various sites/blogs etc. > > I want to use VB6 as a front end

Microdom xml file

2007-10-03 Thread Raj kumar
Hi every one, Can any one send me the sample code/links for creating a XML file and adding a tag by using microdom in twisted python. Thank you in advanced. - Now you can chat without downloading messenger. Click here to know how.-- http://mail.python.org/

Re: interfacing Python interpreter with a VB6 frontend

2007-10-03 Thread Gabriel Genellina
En Wed, 03 Oct 2007 07:53:15 -0300, Anonymous <[EMAIL PROTECTED]> escribi�: > Ryan Ginstrom wrote: >> One way to do this might be by creating a COM server with Python, and >> having >> VB feed it lines of text and then collect results of execution for >> display. >> win32com has demos of COM s

Re: setuptools without unexpected downloads

2007-10-03 Thread Max Erickson
"Gabriel Genellina" <[EMAIL PROTECTED]> wrote: ... > This recent blog post contains step-by-step instructions on using > free tools to compile python extensions: > > -- ... The package available here: http://www.develer.com/oss/GccWinB

enumerate overflow

2007-10-03 Thread crwe
Hello all, in python2.4, i read lines from a file with for lineNum, line in enumerate(f): ... However, lineNum soon overflows and starts counting backwards. How do i force enumerate to return long integer? Cheers. -- http://mail.python.org/mailman/listinfo/python-list

Re: interfacing Python interpreter with a VB6 frontend

2007-10-03 Thread Steve Holden
Anonymous wrote: > > Ryan Ginstrom wrote: > >>> On Behalf Of Anonymous >>> This requires several steps, but the one I am having most >>> problem finding info on is the ff: >>> >>> 1. using/interacting the Python interpreter from VB6 >> >> One way to do this might be by creating a COM server with

Re: List Question

2007-10-03 Thread Bjoern Schliessmann
Pablo Ziliani wrote: > > > I always use this full-featured, all-inclusive, rock-solid version > (see the try/except block): > > count = i = 0 > x = 1 > y = [1,2,3,4,5,1,2,3,4,1,2,1] > try: > while count < 3: > if y[i] == x: > count += 1 > i += 1 > except RuntimeE

Re: random keypress bounce in a terminal

2007-10-03 Thread Bjoern Schliessmann
István wrote: > Moreover, I would also state for others: the behavior of this code > is independent of the keyboard repeating rate. Sure, it's not multiple keypresses but a sequence generated by the VT code in the kernel. > But what if it _seems_ to work differently...? > That's the reason of tr

Re: toprettyxml messes up with whitespaces

2007-10-03 Thread Jim
On Oct 3, 6:18 am, "Jorgen Bodde" <[EMAIL PROTECTED]> wrote: > Should I file this as a bug to be solved? I have my workaround now, > but I read online that more people seem to have ran into this. Perhaps it is not a bug in that it does not violate the standard. But I know that I have been annoyed

Re: enumerate overflow

2007-10-03 Thread Diez B. Roggisch
[EMAIL PROTECTED] schrieb: > Hello all, > > in python2.4, i read lines from a file with > > for lineNum, line in enumerate(f): ... > > However, lineNum soon overflows and starts counting backwards. How do > i force enumerate to return long integer? Most probably you can't, because it is a C-wri

Re: A total bullshit (was : A Must Read!!!)

2007-10-03 Thread Diez B. Roggisch
Bruno Desthuilliers schrieb: > [EMAIL PROTECTED] a écrit : >> I have found an excellent resource on Object Oriented Programming. >> >> > (url snipped to protect the innocents) > > Let's see: > > "An object has methods, properties and events." > > Hem... > > "oriented programming probably existe

Re: Python and SSL

2007-10-03 Thread Martin v. Löwis
> It looks like this > > MyPythonProgram --->Proxy>Server > The proxy is written in Java. I want to use that proxy to see what my > Python program sends to server. > The proxy uses its own certificate and this certificate must be > trusted, I think, otherwise I receive an error. What error d

Re: toprettyxml messes up with whitespaces

2007-10-03 Thread Marc 'BlackJack' Rintsch
On Wed, 03 Oct 2007 12:18:45 +0200, Jorgen Bodde wrote: >> Which part of the standard is this? Here's the XML 1.0 specification's >> section on whitespace: >> >> http://www.w3.org/TR/2006/REC-xml-20060816/#sec-white-space > > Well 2.10 if I quote: > > > Such white space is typically not intende

Re: setuptools without unexpected downloads

2007-10-03 Thread kyosohma
On Oct 2, 11:00 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Tue, 02 Oct 2007 10:11:24 -0300, <[EMAIL PROTECTED]> escribi?: > > > Holden indicates that VS2003 is the current compiler used for the > > official Python distribution. Do you know how to use that program to > > compile an exe?

Re: Using fractions instead of floats

2007-10-03 Thread Raymond L. Buvel
Neil Cerutti wrote: >> Another guess could be that real numbers being closed under the >> four arithmetic operations, there is no danger to accidentally >> step into complex numbers. OTOH floats and rationals are two >> (conflicting) ways of extending integers. > > You would have to adopt a few s

Re: enumerate overflow

2007-10-03 Thread Tim Chase
>> in python2.4, i read lines from a file with >> >> for lineNum, line in enumerate(f): ... >> >> However, lineNum soon overflows and starts counting backwards. How do >> i force enumerate to return long integer? > > Most probably you can't, because it is a C-written function I presume. > > But a

Real time plot

2007-10-03 Thread Jean-Francois Canac
I am reading a large amount of data from a COM port (or from a file) at a rate of 20 records per second. It is about positioning of a vehicle on a race track. In each record we have time, position (lat and long) speed, course all from GPS equipment. I would like to Produce a graph in real time wi

gdbm objects not iterable?

2007-10-03 Thread Laszlo Nagy
Hi All, gdbm objects have a "firstkey" and a "nextkey" method. So if I want iterate through the keys (which I often do) then I have to do this: def itergdbmkeys(gdbm_obj): key = gdbm_obj.firstkey() if key is None: raise StopIteration yield key while True: key =

LoopingCall vs internet.TimerService (Twisted)

2007-10-03 Thread sapsi
Hi, I guess this is not the most appropriate forum but i tried the twisted forum to not avail so here goes. I have written a server which accepts connections from clients, takes requests and adds them to a Queue (a python object of Queue.Queue). Now i have two approaches a) At startup, my server

Looking for volunteer to help debug SpamBayes problem

2007-10-03 Thread skip
We've had some reports of a UnicodeDecodeError in SpamBayes by people using its IMAP filter. I'm unable to reproduce it with other SpamBayes applications I use and don't have a suitable IMAP setup in which to test it. This problem is holding up the 1.1 release of SpamBayes. If you always wanted t

Re: Python and SSL

2007-10-03 Thread Johny
On Oct 3, 2:17 pm, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > > It looks like this > > > MyPythonProgram --->Proxy>Server > > The proxy is written in Java. I want to use that proxy to see what my > > Python program sends to server. > > The proxy uses its own certificate and this certificat

Re: Python and SSL

2007-10-03 Thread Martin v. Löwis
> After I added certification, that the proxy uses, among those > Trusted Root Certification Authorities list,as > Gabriel described on Windows, > > I receive > sslerror: (1, 'error:140770FC:SSL > routines:SSL23_GET_SERVER_HELLO:unknown protocol') > > > What does it mean? Technically, it means

Re: gdbm objects not iterable?

2007-10-03 Thread Steve Holden
Laszlo Nagy wrote: > Hi All, > > gdbm objects have a "firstkey" and a "nextkey" method. So if I want > iterate through the keys (which I often do) then I have to do this: > > def itergdbmkeys(gdbm_obj): > key = gdbm_obj.firstkey() > if key is None: > raise StopIteration > y

Re: [Tutor] data from excel spreadsheet to csv and manipulate

2007-10-03 Thread Shawn Milochik
On 10/3/07, sacha rook <[EMAIL PROTECTED]> wrote: > > Hi > > can anyone help with the best way to tackle this? > > I have a spreadsheet ms excel, that has a name column that I want to > extract to csv and manipulate as follows. > > The name column has data in this format > > Name > > Surname F

Re: enumerate overflow

2007-10-03 Thread Steve Holden
[EMAIL PROTECTED] wrote: > Hello all, > > in python2.4, i read lines from a file with > > for lineNum, line in enumerate(f): ... > > However, lineNum soon overflows and starts counting backwards. How do > i force enumerate to return long integer? > Just how "soon" exactly do you read sys.maxint

Re: logging module and trailing newlines

2007-10-03 Thread Russell Warren
Both are very good responses... thanks! I had forgotten the ease of "monkey-patching" in python and the Stream class is certainly cleaner than the way I had been doing it. On Oct 3, 3:15 am, Peter Otten <[EMAIL PROTECTED]> wrote: > Russell Warren wrote: > > All I'm after is the ability to log thi

Re: reliable unit test logging

2007-10-03 Thread Vyacheslav Maslov
Ben Finney wrote: > Vyacheslav Maslov <[EMAIL PROTECTED]> writes: > >> I understand your opinion > > Hopefully you mean "explanation", not "opinion". I gave what appear to > me to be facts, not opinion, about the definition of a unit test. Yes, i meant "explanation". I have one more question rel

Re: enumerate overflow

2007-10-03 Thread Tim Chase
>> for lineNum, line in enumerate(f): ... >> >> However, lineNum soon overflows and starts counting backwards. How do >> i force enumerate to return long integer? >> > Just how "soon" exactly do you read sys.maxint lines from a file? I > should have thought that it would take a significant amount

Re: gdbm objects not iterable?

2007-10-03 Thread Laszlo Nagy
>> >> I know that this is a very small change, but it can make gdbm objects >> look more like dictionaries. >> >> Please make comments. :-) >> >> > What you would need is a method to *create and return* a generator, and > it's the generator that should have the next() method. Otherwise you

Re: enumerate overflow

2007-10-03 Thread Steve Holden
Tim Chase wrote: >>> for lineNum, line in enumerate(f): ... >>> >>> However, lineNum soon overflows and starts counting backwards. How do >>> i force enumerate to return long integer? >>> >> Just how "soon" exactly do you read sys.maxint lines from a file? I >> should have thought that it would ta

Re: [Tutor] data from excel spreadsheet to csv and manipulate

2007-10-03 Thread Neal Becker
look at xlrd module and also csv module. -- http://mail.python.org/mailman/listinfo/python-list

Re: enumerate overflow

2007-10-03 Thread Tim Golden
Steve Holden wrote: > I wouldn't dream of suggesting it's impossible. > I just regard "soon" as less than an hour in > commuter's terms, I suppose. Sadly, speaking as a Londoner, an hour is indeed "soon" in commuter terms. TJG -- http://mail.python.org/mailman/listinfo/python-list

I/O error

2007-10-03 Thread MV
Hi all, I recently started getting the following error: *Can't save config file, I/O error: file() constructor not accessible in restrictive mode * The app I am using is called Nicotine+ ( www.nicotine-plus.org ). According to the developper N+ does not use restrictive mode for anything. Can any

Re: gui toolkits: the real story? (Tkinter, PyGTK, etc.)

2007-10-03 Thread Chris Mellon
On 10/2/07, Grant Edwards <[EMAIL PROTECTED]> wrote: > On 2007-10-02, Chris Mellon <[EMAIL PROTECTED]> wrote: > > > PyGtk has poor cross platform support, a very large footprint (the > > largest of all these libraries) > > It's larger than wxWidgets on top of Gtk? > No, but it's larger than wx on

Re: gui toolkits: the real story? (Tkinter, PyGTK, etc.)

2007-10-03 Thread Chris Mellon
On 10/2/07, bramble <[EMAIL PROTECTED]> wrote: > On Oct 2, 11:07 am, "Chris Mellon" <[EMAIL PROTECTED]> wrote: > > > > PyGtk has poor cross platform support, a very large footprint (the > > largest of all these libraries) as well as a complicated runtime > > environment. > > What's complicated abou

Re: gdbm objects not iterable?

2007-10-03 Thread Steve Holden
[back on-list] Laszlo Nagy wrote: > >> Ir probably would be helpful to add the method, but it might be tricky >> to trap changes to the mapping as iteration proceeded: what kind of >> isolation would you implement? > Probably I would do the same that Python does with dicts: > > >>> d = {1:'a',

migrating to packages

2007-10-03 Thread Gerardo Herzig
Hi all. I have a single file with several classes, wich i want to separate into several packages. The big file is named, say MYCLASES, and contains a class named A(object), and B(A). We have been using this MYCLASES in the from MYCLASES import B syntax, but i cant reproduce this syntax using pa

Duplicate content filter..

2007-10-03 Thread Abandoned
Hi.. I'm working a search engine project now. And i have a problem. My problem is Duplicate Contents.. I can find the percentage of similarity between two pages but i have a 5 millions index and i search 5 million page contents to find one duplicate :( I want to a idea for how can i find duplicat

Re: generating range of numbers

2007-10-03 Thread Wildemar Wildenburger
vimal wrote: > hi all, > > i am new to python. > i just want to generate numbers in the form like: > > 1,2,4,8,16,32.to a maximum of 1024 > > using a range function > Homework? /W -- http://mail.python.org/mailman/listinfo/python-list

Re: toprettyxml messes up with whitespaces

2007-10-03 Thread Martin v. Löwis
> > Such white space is typically not intended for inclusion in the > delivered version of the document. On the other hand, "significant" > white space that should be preserved in the delivered version is > common, for example in poetry and source code. > > > I interpret "significant" whitespace

A question about subprocess

2007-10-03 Thread JD
Hi, I want send my jobs over a whole bunch of machines (using ssh). The jobs will need to be run in the following pattern: (Machine A) (Machine B) (Machine C) Job A1 Job B1Job C1 Job A2 Job B2etc Job A3 etc etc Jobs runing on machi

spam kontrol

2007-10-03 Thread [EMAIL PROTECTED]
hii ı think you know spam page is the most pest for net user.I want distinguish spam page to usefull page if you have a idea whit this problem pleas share to me thank you -- http://mail.python.org/mailman/listinfo/python-list

Re: gui toolkits: the real story? (Tkinter, PyGTK, etc.)

2007-10-03 Thread Grant Edwards
On 2007-10-03, Chris Mellon <[EMAIL PROTECTED]> wrote: > On 10/2/07, Grant Edwards <[EMAIL PROTECTED]> wrote: >> On 2007-10-02, Chris Mellon <[EMAIL PROTECTED]> wrote: >> >> > PyGtk has poor cross platform support, a very large footprint (the >> > largest of all these libraries) >> >> It's larger t

Re: gui toolkits: the real story? (Tkinter, PyGTK, etc.)

2007-10-03 Thread Grant Edwards
On 2007-10-03, Chris Mellon <[EMAIL PROTECTED]> wrote: > On 10/2/07, bramble <[EMAIL PROTECTED]> wrote: >> On Oct 2, 11:07 am, "Chris Mellon" <[EMAIL PROTECTED]> wrote: >> > >> > PyGtk has poor cross platform support, a very large footprint (the >> > largest of all these libraries) as well as a com

Re: enumerate overflow

2007-10-03 Thread Paul Rubin
Tim Chase <[EMAIL PROTECTED]> writes: > I'd consider this a bug: either in the implementation of enumerate(), > or in the documentation > > http://docs.python.org/lib/built-in-funcs.html#l2h-24 2.5 has a patch that causes enumerate() and count() to raise overflow if the count wraps around, which

RE: module confusion

2007-10-03 Thread wang frank
Hi, I am moving from Matlab to Python+numpy+scipy. In Matlab you can use function dec2bin, hex2dec, dec2hex bin2dec functions to convert decimal to binary and heximal etc. Before I try to implement my own function in Python, I want to know whether in Python such functionalities are already t

function to convert data into binary, hex and back.

2007-10-03 Thread wang frank
From: [EMAIL PROTECTED]: [EMAIL PROTECTED]: RE: module confusionDate: Wed, 3 Oct 2007 17:14:19 + Hi, I am moving from Matlab to Python+numpy+scipy. In Matlab you can use function dec2bin, hex2dec, dec2hex bin2dec functions to convert decimal to binary and heximal etc. Before I try to

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-10-03 Thread George Neuner
On Wed, 3 Oct 2007 09:36:40 + (UTC), [EMAIL PROTECTED] (Bent C Dalager) wrote: >In article <[EMAIL PROTECTED]>, David Kastrup <[EMAIL PROTECTED]> wrote: >>[EMAIL PROTECTED] (Bent C Dalager) writes: >> >>> In article <[EMAIL PROTECTED]>, >>> Frank Goenninger <[EMAIL PROTECTED]> wrote: >>

Re: enumerate overflow

2007-10-03 Thread Raymond Hettinger
[Paul Rubin] > I hope in 3.0 there's a real fix, i.e. the count should promote to > long. In Py2.6, I will mostly likely put in an automatic promotion to long for both enumerate() and count(). It took a while to figure-out how to do this without killing the performance for normal cases (ones used

Class design question

2007-10-03 Thread Adam Lanier
Relatively new to python development and I have a general question regarding good class design. Say I have a couple of classes: Class Foo: params = [ ] __init__( self, param ): ... Class Bar: data = None __init__( se

RE: module confusion

2007-10-03 Thread wang frank
Sorry for the wrong title of this email. Please ignore this email. I have resend the question with correct title. Thanks frank From: [EMAIL PROTECTED]: [EMAIL PROTECTED]: RE: module confusionDate: Wed, 3 Oct 2007 17:14:19 + Hi, I am moving from Matlab to Python+numpy+scipy. In Matla

Re: gui toolkits: the real story? (Tkinter, PyGTK, etc.)

2007-10-03 Thread Chris Mellon
On 10/3/07, Grant Edwards <[EMAIL PROTECTED]> wrote: > On 2007-10-03, Chris Mellon <[EMAIL PROTECTED]> wrote: > > On 10/2/07, Grant Edwards <[EMAIL PROTECTED]> wrote: > >> On 2007-10-02, Chris Mellon <[EMAIL PROTECTED]> wrote: > >> > >> > PyGtk has poor cross platform support, a very large footprin

How can I access MySQL Version 4.1.22 from Python 2.2.3 ???

2007-10-03 Thread tavspamnofwd
Hi all, I would like to use Python with MySQL to create a database backend for my website. Therefore I look at the module MySQLdb. However the hosting my organisation uses has: Python 2.2.3 (#1, Dec 21 2006, 18:29:13) [GCC 3.2.3 20030502 (Red Hat Linux 3.2.3-56)] MySQL Version 4.1.22-standard-l

RE: module confusion

2007-10-03 Thread Carsten Haese
On Wed, 2007-10-03 at 17:24 +, wang frank wrote: > Sorry for the wrong title of this email. Please ignore this email. I > have resend the question with correct title. But it's still in the wrong thread. When asking a new question, you should compose a new message instead of replying to an exis

Re: C Source Code Generator For Test Cases

2007-10-03 Thread gamename
> You might want to look at COG (http://www.nedbatchelder.com/code/ > cog/). It might be helpful to you. I really enjoy using it and keep > finding things to use it with. Thanks Mike. I agree. COG looks really promising. -T -- http://mail.python.org/mailman/listinfo/python-list

Re: module confusion

2007-10-03 Thread Robert Kern
Lawrence D'Oliveiro wrote: > In message <[EMAIL PROTECTED]>, Robert > Kern wrote: > >> Lawrence D'Oliveiro wrote: >> >>> In message <[EMAIL PROTECTED]>, Robert >>> Kern wrote: >>> Not all of the modules in a package are imported by importing the top-level package. >>> You can't import pa

python autoconf macro for building ming extension

2007-10-03 Thread Daniel Nogradi
It might be slightly off topic here but couldn't find a more suitable place for this question: I'm trying to build the python binding for ming -- http://ming.sf.net -- but for some reason the python macro for autoconf -- python.m4 -- doesn't seem to detect my python installation correctly. The str

Re: spam kontrol

2007-10-03 Thread George Sakkis
On Oct 3, 12:59 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > hii > ý think you know spam page is the most pest for net user. ...closely followed in the second position by incoherent misspelled posts in silly IM-speak. -- http://mail.python.org/mailman/listinfo/python-list

Re: enumerate overflow

2007-10-03 Thread Paul Rubin
Raymond Hettinger <[EMAIL PROTECTED]> writes: > In Py2.6, I will mostly likely put in an automatic promotion to long > for both enumerate() and count(). It took a while to figure-out how > to do this without killing the performance for normal cases (ones used > in real programs, not examples contr

Re: module confusion

2007-10-03 Thread Michael Spencer
+1 Subject line of the week (SLOTW) rjcarr wrote: > So my question is ... why are they [os.path and logging.handlers] different? [A] wrote: > Because you misspelled it. First, do a dir() on logging: [B] wrote: > No, he didn't... OP: logging is a package and logging.handlers is one module > in t

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-10-03 Thread Bent C Dalager
In article <[EMAIL PROTECTED]>, George Neuner wrote: >On Wed, 3 Oct 2007 09:36:40 + (UTC), [EMAIL PROTECTED] (Bent C >Dalager) wrote: > >> >>Only if you're being exceedingly pedantic and probably not even >>then. Webster 1913 lists, among other meanings, >> >>Free >>(...) >>"Liberated, by arr

Re: gui toolkits: the real story? (Tkinter, PyGTK, etc.)

2007-10-03 Thread bramble
On Oct 3, 1:39 pm, "Chris Mellon" <[EMAIL PROTECTED]> wrote: > On 10/3/07, Grant Edwards <[EMAIL PROTECTED]> wrote: > > > On 2007-10-03, Chris Mellon <[EMAIL PROTECTED]> wrote: > > > On 10/2/07, Grant Edwards <[EMAIL PROTECTED]> wrote: > > >> On 2007-10-02, Chris Mellon <[EMAIL PROTECTED]> wrote: >

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-10-03 Thread David Kastrup
[EMAIL PROTECTED] (Bent C Dalager) writes: > In article <[EMAIL PROTECTED]>, > George Neuner wrote: >>On Wed, 3 Oct 2007 09:36:40 + (UTC), [EMAIL PROTECTED] (Bent C >>Dalager) wrote: >> >>> >>>Only if you're being exceedingly pedantic and probably not even >>>then. Webster 1913 lists, among

Re: Class design question

2007-10-03 Thread George Sakkis
On Oct 3, 1:04 pm, Adam Lanier <[EMAIL PROTECTED]> wrote: > Relatively new to python development and I have a general question > regarding good class design. > > Say I have a couple of classes: > > Class Foo: > params = [ ] > __init__( self, param ): >

Convert on uppercase unaccentent unicode character

2007-10-03 Thread JBJ
Hi, I'am very newbie in Python. For the moment I'am trying to convert an unicode character to his uppercase unaccented character. By example with locale fr_FR: a,A,à,À should return A o,O,ô,Ô should return O œ,Œ should return Œ i,I,î,Î should return I Have you some suggestions ? Thank. -- http:

Re: Python and SSL

2007-10-03 Thread John J. Lee
Johny <[EMAIL PROTECTED]> writes: > On Oct 3, 2:17 pm, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: >> > It looks like this >> >> > MyPythonProgram --->Proxy>Server You want MyPythonProgram being to be proxied by Proxy, using the HTTP CONNECT method? (CONNECT is a way of asking the proxy to j

Re: gui toolkits: the real story? (Tkinter, PyGTK, etc.)

2007-10-03 Thread Chris Mellon
On 10/3/07, bramble <[EMAIL PROTECTED]> wrote: > On Oct 3, 1:39 pm, "Chris Mellon" <[EMAIL PROTECTED]> wrote: > > On 10/3/07, Grant Edwards <[EMAIL PROTECTED]> wrote: > > > > > On 2007-10-03, Chris Mellon <[EMAIL PROTECTED]> wrote: > > > > On 10/2/07, Grant Edwards <[EMAIL PROTECTED]> wrote: > > >

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-10-03 Thread Bent C Dalager
In article <[EMAIL PROTECTED]>, David Kastrup <[EMAIL PROTECTED]> wrote: >[EMAIL PROTECTED] (Bent C Dalager) writes: > >Not as much "been" liberated, but "turned" liberated. I expect that either way you split this hair, using "free" in the sense of "possessing liberty" is still going to be quite

  1   2   >