Question

2008-10-13 Thread Aditi Meher
-- Forwarded message -- From: Aditi Meher <[EMAIL PROTECTED]> Date: Tue, Oct 14, 2008 at 11:55 AM Subject: Question To: Jonathan Gardner <[EMAIL PROTECTED]> Hello I am using ubuntu operating system,i am using python and self app for DB storage. I hv already mentioned in my quest

Question

2008-10-13 Thread Aditi Meher
-- Forwarded message -- From: Aditi Meher <[EMAIL PROTECTED]> Date: Tue, Oct 14, 2008 at 11:55 AM Subject: Question To: Jonathan Gardner <[EMAIL PROTECTED]> Hello I am using ubuntu operating system,i am using python and self app for DB storage. I hv already mentioned in my quest

Re: Making class attributes non-case-sensitive?

2008-10-13 Thread Rafe
[I posted a version of the following but it contained a broken example. I deleted it through GoogleGroups, but I'm adding this message in case the old version is still visible on the list. If it isn't ignore this.] I really appreciate the replies. I hope you guys will stick with me through one mo

Re: How to set cookie in client machine

2008-10-13 Thread Chris Rebert
See the 'cookie' module: http://www.python.org/doc/2.5.2/lib/module-Cookie.html Also: A. In the future, Google is your friend! That page is the top hit for "python cookie" for Christ's sake; it's not hard to find. B. Please don't post your question again just because it isn't answered fast enough.

Re: Question

2008-10-13 Thread Jonathan Gardner
On Oct 13, 9:31 pm, "Aditi Meher" <[EMAIL PROTECTED]> wrote: > > I am connecting database using python,and i am inserting some data into it. > e.g.name and roll nos(some 100 records are stored) > > My question is "I want to display 10 records at a time and want to > store remaining records into buf

How to set cookie in client machine

2008-10-13 Thread Good Z
Hello, I want to set {name, value} cookie on client machine. My requirement is that when user comes to the website hosted on our server and login into his account, we would like to set user specific information in cookie (on his machine) that will be used later when HTTP request comes in. Is

Re: PIL on windows XP x64 (64-bit)?

2008-10-13 Thread Martin v. Löwis
>> Has anybody here got PIL (the Image lib) working on Windows XP x64 (64- >> bit)? There is no version available for that platform from >> pythonware.com. > > Shouldn't your distro maintainers have it in their repositories? You mean, it might be in Microsoft's Open Source Repository? Worth a try

Re: installing python 3.0rc1 on Linux

2008-10-13 Thread Martin v. Löwis
> It seems that the make process cannot find some of the shared > libraries. Is there some way to change the install process ( make, > config files or whatever) to pick up support for these missing > modules?? Yes. It probably has no problem finding the libraries, but, more likely, problems findin

Re: Upgrading from 2.5 to 2.6

2008-10-13 Thread Martin v. Löwis
> That isn't entirely true. In Windows, python files bound to a > particular version of python in the registry. So, for example, if you > double click on "some_prog.py" to run it, then it will by default > start up using python2.6 once it is installed. Also right-clicking on > a file and selecting

Re: Python IDLE and Access Denied

2008-10-13 Thread W. eWatson
Dennis Lee Bieber wrote: On Mon, 13 Oct 2008 19:07:06 -0700, "W. eWatson" <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: I had just finished working with IDLE, and tried to double-click on a py file. It produced an OK dialog with the path to the file and the msg "access denie

Re: Download CGI

2008-10-13 Thread Gabriel Genellina
En Sun, 12 Oct 2008 06:48:29 -0300, rodmc <[EMAIL PROTECTED]> escribió: I am trying to figure out how to create a Python script which will open a file from a folder outwith the public_html path and serve it directly to the user for downloading. The aim being so that the users cannot see where

Re: gmpy and counting None

2008-10-13 Thread casevh
On Oct 13, 12:43 pm, <[EMAIL PROTECTED]> wrote: > Hi, > > I just stumbled upon the following issue (I am running Debian): > > $ python > Python 2.5.2 (r252:60911, Sep 29 2008, 21:15:13) > [GCC 4.3.2] on linux2 > Type "help", "copyright", "credits" or "license" for more information.>>> [2, > None].

Re: Making class attributes non-case-sensitive?

2008-10-13 Thread Rafe
I'm not sure what went wrong with the formatting in my last post. my code is under 80 characters wide. Here is a more narrow copy and paste... class DelegationWrapper(object): """ This is a new-style base class that allows python to extend, or override attributes of a given X3DObject.

Question

2008-10-13 Thread Aditi Meher
Hello I am connecting database using python,and i am inserting some data into it. e.g.name and roll nos(some 100 records are stored) My question is "I want to display 10 records at a time and want to store remaining records into buffer and after displaying 10 records again i want to display next

Re: Making class attributes non-case-sensitive?

2008-10-13 Thread Rafe
I really appreciate the replies. I hope you gyus will stick with me through one more round. super(C, self).__setattr__(attr.lower(), value) Unfortunately, this will not work because an attribute name such as "getObject" is legal (I'll explain the convention in a moment.) I think I would have to l

ziziks- Free

2008-10-13 Thread pdtechnocratdorsey
Click here http://www.nj.com/forums/profile.ssf?nickname=3dhentai qewrqqwerqwer http://www.nj.com/forums/profile.ssf?nickname=3dincest qerqerq http://www.nj.com/forums/profile.ssf?nickname=amateursexv wrtwrtwret http://www.nj.com/forums/profile.ssf?nickname=amyfisherse retyvtvet http://www.nj.com/f

Re: Reg: Installation problems in psycopg2

2008-10-13 Thread Philip Semanchuk
On Oct 13, 2008, at 11:52 PM, [EMAIL PROTECTED] wrote: Hi all, I am not sure whether this is the right place to ask this question. Please let me know if it isn't. The psycopg mailing list would be a better place to ask. I am trying to install psycopg2 in my windows machine for connec

Reg: Installation problems in psycopg2

2008-10-13 Thread raj . indian . 08
Hi all, I am not sure whether this is the right place to ask this question. Please let me know if it isn't. I am trying to install psycopg2 in my windows machine for connecting with the PostgreSQL server. Since there is no binary executable*, I am trying to build my own - and I am faci

Re: Can Python fix vcard files?

2008-10-13 Thread Terry Reedy
Dotan Cohen wrote: 2008/10/14 <[EMAIL PROTECTED]>: Dotan> Can Python go through a directory of files and replace each Dotan> instance of "newline-space" with nothing? Sure. Something like (*completely* untested, so caveat emptor): import glob import os for f in glob.glob('*.v

Re: Suggestion for the PythonDevelopment for next version

2008-10-13 Thread Erik Max Francis
azrael wrote: I know that. enumerate is a great function. But this way it always adds some complexity. That objection doesn't really make sense. Your suggestion is far more complex: It requires that an `index` attribute be added to every element in an iteration. What's the lifetime of th

Re: Transformation with ``parser`` ast

2008-10-13 Thread Benjamin
On Oct 13, 2:39 pm, Malthe Borch <[EMAIL PROTECTED]> wrote: > (Note: repost from python-dev) > > The ``compiler.ast`` module makes parsing Python source-code and AST > manipulation relatively painless and it's straight-forward to implement > a transformer class. > > However, I find that the ``compi

Python IDLE and Access Denied

2008-10-13 Thread W. eWatson
I had just finished working with IDLE, and tried to double-click on a py file. It produced an OK dialog with the path to the file and the msg "access denied." All my py files act that way. I rebooted and the same thing continues. I copied one py program to another computer, and accessed it ther

Re: Can Python fix vcard files?

2008-10-13 Thread Dotan Cohen
2008/10/14 <[EMAIL PROTECTED]>: > Off the top of my head I don't know (and it may well vary by Python > version). Just leave out the dangerous parts of the loop to check: > >for f in glob.glob('*.vcf'): ># corrupt data >uncooked = open(f, 'rb').read() ># fix it >

Re: compile() and comments

2008-10-13 Thread Ed Leafe
On Oct 13, 2008, at 7:20 PM, Terry Reedy wrote: I would prefer more consistent behavior. I have opened a separate doc issue that includes the documentation of this issue. http://bugs.python.org/issue4118 Again, it was not a show-stopper by any means; more of a curiosity. Thanks for verif

ANN: Pythonscope 0.3.1 Release Notes and Funding Request

2008-10-13 Thread Paul Hildebrandt
Pythoscope, the Python unit test generator, is growing and maturing. Over the last three months we've made pretty incredible progress. We've had a full time developer and part time project manager. Where we are: Technical: * Static analysis of code. With this we can generate and maintain unit test

Re: Can Python fix vcard files?

2008-10-13 Thread skip
Dotan> One question, though, is that code unicode-safe in the event that Dotan> there are unicode characters in there? Off the top of my head I don't know (and it may well vary by Python version). Just leave out the dangerous parts of the loop to check: for f in glob.glob('*.vcf'):

Re: Can Python fix vcard files?

2008-10-13 Thread Dotan Cohen
2008/10/14 <[EMAIL PROTECTED]>: > >Dotan> Can Python go through a directory of files and replace each >Dotan> instance of "newline-space" with nothing? > > Sure. Something like (*completely* untested, so caveat emptor): > >import glob >import os > >for f in glob.glob('*.vcf'):

installing python 3.0rc1 on Linux

2008-10-13 Thread bradley . rogers
I have a SUSE 10.3 OS I have the original python 2.5.1 loaded from the suse rpm. I have tried installing Python 3.0rc1 using the standard make technique with the "altinstall" variation. I don't want to replace my 2.5.1. I just want to try out the new Python 3.0. I have successfully installed the

Re: Can Python fix vcard files?

2008-10-13 Thread skip
Dotan> Can Python go through a directory of files and replace each Dotan> instance of "newline-space" with nothing? Sure. Something like (*completely* untested, so caveat emptor): import glob import os for f in glob.glob('*.vcf'): # corrupt data uncooked =

Can Python fix vcard files?

2008-10-13 Thread Dotan Cohen
KDE's Kontact PIM breaks quoted-printable vcard files because it linebreaks in the middle of a word. Take this text for example: NOTE;CHARSET=UTF-8;ENCODING=QUOTED-PRINTABLE:=D7=A9=D7=95=D7=A8=D7=94 =D7=A 8=D7=90=D7=A9=D7=95=D7=A0=D7=94.\n=D7=94=D7=A9=D7=95=D7=A8=D7=94 =D7=94=D7= A9=D7=A0=D7=99=D

Set Environment for java based tools thru python script

2008-10-13 Thread replysonika
Hello, I run a Java app with subprocess from Python script. This python script is called from another Python Wrapper. python = subprocess.Popen(["toolname.sh", "-args", arg1, arg2], stdout=subprocess.PIPE, stderr=subprocess.PIPE) I can run it manually from the

Re: Implementing my own Python interpreter

2008-10-13 Thread Terry Reedy
Ognjen Bezanov wrote: The is a page on the python wiki about CPython intermals. -- http://mail.python.org/mailman/listinfo/python-list

Re: documentation: what is "::="?

2008-10-13 Thread Terry Reedy
Anita Kean wrote: 1) Everywhere in the old and new documentation, the string of characters "::=" is used in "explaining" things - but I can nowhere find any stated meaning of this string. Read Reference manual introductin notation: The descriptions of lexical analysis and syntax use a modifi

Re: Suggestion for the PythonDevelopment for next version

2008-10-13 Thread Terry Reedy
azrael wrote: I know that. enumerate is a great function. Agreed. Enumerate works everywhere an iterable is wanted. Just like other functions that produce iterables. A special trick for for-loops would only work for for-loops. -- http://mail.python.org/mailman/listinfo/python-list

Re: Implementing my own Python interpreter

2008-10-13 Thread Robert Kern
Ognjen Bezanov wrote: Hello All, I am a third year computer science student and I'm the process of selection for my final year project. One option that was thought up was the idea of implement my own version of the python interpreter (I'm referring to CPython here). Either as a process running

Re: Implementing my own Python interpreter

2008-10-13 Thread Matt Nordhoff
Ognjen Bezanov wrote: > Hello All, > > I am a third year computer science student and I'm the process of > selection for my final year project. > > One option that was thought up was the idea of implement my own version > of the python interpreter (I'm referring to CPython here). Either as a > pr

Re: compile() and comments

2008-10-13 Thread Terry Reedy
Ed Leafe wrote: On Oct 13, 2008, at 8:35 AM, Fuzzyman wrote: It is certainly an odd restriction, but the docs for compile [1] do explicitly state that the input must be newline terminated. Understood; what I found odd was that if the last non-newline-terminated statement was *not* a com

Re: Deviation from object-relational mapping (pySQLFace)

2008-10-13 Thread sulyokpeti
On okt. 13, 10:33, Bruno Desthuilliers wrote: > [EMAIL PROTECTED] a écrit : > > > I have made a simple python module to handle SQL databases: > >https://fedorahosted.org/pySQLFace/wiki > > Its goal to separate relational database stuff (SQL) from algorythmic > > code (python). A SQLFace is a facad

Re: Implementing my own Python interpreter

2008-10-13 Thread Ognjen Bezanov
Grant Edwards wrote: On 2008-10-13, Ognjen Bezanov <[EMAIL PROTECTED]> wrote: I am a third year computer science student and I'm the process of selection for my final year project. One option that was thought up was the idea of implement my own version of the python interpreter (I'm referring

Re: PyGUI as a standard GUI API for Python?

2008-10-13 Thread David Boddie
On Monday 13 October 2008 11:42, lkcl wrote: > i don't know if it _was_ detached from the layout, but it was > definitely still visible. see > http://pyjs.org/examples/gridtest/output/GridTest.html > for the example i was porting to pyqt4. each time i clicked "Next", a > new set of N,N would be

Re: Implementing my own Python interpreter

2008-10-13 Thread Grant Edwards
On 2008-10-13, Ognjen Bezanov <[EMAIL PROTECTED]> wrote: > I am a third year computer science student and I'm the process of > selection for my final year project. > > One option that was thought up was the idea of implement my > own version of the python interpreter (I'm referring to > CPython he

Re: Deviation from object-relational mapping (pySQLFace)

2008-10-13 Thread sulyokpeti
On okt. 12, 19:54, Paul Boddie <[EMAIL PROTECTED]> wrote: > On 12 Okt, 17:19, [EMAIL PROTECTED] wrote: > > > I have made a simple python module to handle SQL databases: > >https://fedorahosted.org/pySQLFace/wiki > > Its goal to separate relational database stuff (SQL) from algorythmic > > code (pyt

Re: RegExp: "wontmatch"-function

2008-10-13 Thread william tanksley
On Oct 13, 9:40 am, [EMAIL PROTECTED] wrote: > I'm looking for a function which, given a regexp re and  and a string > str, returns whether re won't match any string starting with str. (so > it would always return False if str is "" or if str itself matches re > -- but that are only the easy cases)

Re: docpicture

2008-10-13 Thread Steven D'Aprano
On Mon, 13 Oct 2008 16:41:58 -0500, skip wrote: >>> Nothing. It's just a doc string containing a bunch of hex codes. Doc >>> strings are ignored by the interpreter (AIUI). > > Benjamin> I mean what happens when you type help() into the > interactive Benjamin> console on the command line

Re: gmpy and counting None

2008-10-13 Thread Robert Kern
Mensanator wrote: On Oct 13, 2:43 pm, <[EMAIL PROTECTED]> wrote: Hi, I just stumbled upon the following issue (I am running Debian): $ python Python 2.5.2 (r252:60911, Sep 29 2008, 21:15:13) [GCC 4.3.2] on linux2 Type "help", "copyright", "credits" or "license" for more information.>>> [2, No

Implementing my own Python interpreter

2008-10-13 Thread Ognjen Bezanov
Hello All, I am a third year computer science student and I'm the process of selection for my final year project. One option that was thought up was the idea of implement my own version of the python interpreter (I'm referring to CPython here). Either as a process running on another OS or as a p

Re: PyGUI as a standard GUI API for Python?

2008-10-13 Thread Orestis Markou
Just want to say, thank you for a very enlightening writeup. You should really post this somewhere that we can link to. -- [EMAIL PROTECTED] http://orestis.gr/ On 11 Oct 2008, at 10:19, lkcl wrote: On Sep 3, 4:34 pm, Michael Palmer <[EMAIL PROTECTED]> wrote: So far, development of PyGUI

Re: documentation: what is "::="?

2008-10-13 Thread George Sakkis
On Oct 13, 5:33 pm, Anita Kean <[EMAIL PROTECTED]> wrote: > Hello > > I just downloaded the new python2.6 documentation, > full of hopes it would solve some basic mysteries for me. > I'm new to python, so please forgive my ignorance. > I've two questions. > > 1) Everywhere in the old and new docum

ANN: PySmell v0.6 released

2008-10-13 Thread Orestis Markou
I'm happy to announce PySmell v0.6, an autocompletion library for Python and Vim (other editors pending). New features include: * Import statement completion * Support for multiple TAGS files (that means external libraries) * Support for analysing Python 2.4-2.5 stdlib. Plus many bugfixes

Re: Selecting random elements from a list.

2008-10-13 Thread Timothy Grant
On Mon, Oct 13, 2008 at 2:29 PM, aditya shukla <[EMAIL PROTECTED]> wrote: > Hello folks, > > i have a list say list1=[a,b,c,...z] ie 26 elements i have to take 5 > elements from it randomly and save in another list.Please explain how to do > this? > > > Aditya > > -- > http://mail.python.org/mailma

Re: documentation: what is "::="?

2008-10-13 Thread Diez B. Roggisch
Anita Kean schrieb: Hello I just downloaded the new python2.6 documentation, full of hopes it would solve some basic mysteries for me. I'm new to python, so please forgive my ignorance. I've two questions. 1) Everywhere in the old and new documentation, the string of characters "::=" is used i

Re: Selecting random elements from a list.

2008-10-13 Thread Benjamin Kaplan
On Mon, Oct 13, 2008 at 5:29 PM, aditya shukla <[EMAIL PROTECTED]>wrote: > Hello folks, > > i have a list say list1=[a,b,c,...z] ie 26 elements i have to take 5 > elements from it randomly and save in another list.Please explain how to do > this? > > > Aditya > http://docs.python.org/library/ran

Re: docpicture

2008-10-13 Thread skip
>> Nothing. It's just a doc string containing a bunch of hex codes. Doc >> strings are ignored by the interpreter (AIUI). Benjamin> I mean what happens when you type help() into the interactive Benjamin> console on the command line? You will see the docstrings, and Benjamin>

documentation: what is "::="?

2008-10-13 Thread Anita Kean
Hello I just downloaded the new python2.6 documentation, full of hopes it would solve some basic mysteries for me. I'm new to python, so please forgive my ignorance. I've two questions. 1) Everywhere in the old and new documentation, the string of characters "::=" is used in "explaining" things

Selecting random elements from a list.

2008-10-13 Thread aditya shukla
Hello folks, i have a list say list1=[a,b,c,...z] ie 26 elements i have to take 5 elements from it randomly and save in another list.Please explain how to do this? Aditya -- http://mail.python.org/mailman/listinfo/python-list

Re: gmpy and counting None

2008-10-13 Thread Mensanator
On Oct 13, 2:43 pm, <[EMAIL PROTECTED]> wrote: > Hi, > > I just stumbled upon the following issue (I am running Debian): > > $ python > Python 2.5.2 (r252:60911, Sep 29 2008, 21:15:13) > [GCC 4.3.2] on linux2 > Type "help", "copyright", "credits" or "license" for more information.>>> [2, > None].c

Re: PyGUI as a standard GUI API for Python?

2008-10-13 Thread Terry Reedy
Propad wrote: the bottom line is: if you want a windows version of pywebkitgtk, i'm happy to assist and advise anyone of the process- it should be quite straightforward _if_ you have MSVC and follow the standard procedure, but i'm not about to spend my own time and effort on providing a win32 por

Re: PyGUI as a standard GUI API for Python?

2008-10-13 Thread Terry Reedy
lkcl wrote: On Oct 11, 11:17 pm, Terry Reedy <[EMAIL PROTECTED]> wrote: lkcl wrote: I got the impression that there is currently no Windows binary available. Correct? If not, perhaps someone trustworthy will someday donate one. sorry, terry, you deleted a bit too much context :) I was ref

Re: docpicture

2008-10-13 Thread Joe Strout
On Oct 13, 2008, at 2:43 PM, Benjamin Kaplan wrote: I mean what happens when you type help() into the interactive console on the command line? You will see the docstrings, and there will be a whole bunch of random hex characters there. Good point. It might be better put in a specially-tag

Re: docpicture

2008-10-13 Thread Benjamin Kaplan
On Mon, Oct 13, 2008 at 2:48 PM, Joe Strout <[EMAIL PROTECTED]> wrote: > On Oct 13, 2008, at 12:09 PM, Benjamin Kaplan wrote: > > Heck, if you go to the point of including a docpicture module, might as >> well >> just support the feature in IDLE... Other IDEs would probably pick up the >> featur

Re: Quality control in open source development

2008-10-13 Thread Steve Holden
Dave wrote: > With the open source licenses that allow redistribution of modified > code, how do you keep someone unaffiliated with the Python community > from creating his or her own version of python, and declaring it to be > Python 2.6, or maybe Python 2.7 without any approval of anyone at the >

Re: docpicture

2008-10-13 Thread skip
Benjamin> So, the IDEs will support it. what happens when you run the Benjamin> interpreter from the command line? Probably get ignored. What else would you propose? It's not executable code anyway, just a special comment or portion of a docstring. S -- http://mail.python.org/mailman/l

Re: how to start thread by group?

2008-10-13 Thread [EMAIL PROTECTED]
On Oct 13, 6:54 am, Lawrence D'Oliveiro <[EMAIL PROTECTED] central.gen.new_zealand> wrote: > In message <[EMAIL PROTECTED]>, Gabriel > > > > Genellina wrote: > > En Tue, 07 Oct 2008 13:25:01 -0300, Terry Reedy <[EMAIL PROTECTED]> > > escribió: > > >> Lawrence D'Oliveiro wrote: > > >>> In message <[

Transformation with ``parser`` ast

2008-10-13 Thread Malthe Borch
(Note: repost from python-dev) The ``compiler.ast`` module makes parsing Python source-code and AST manipulation relatively painless and it's straight-forward to implement a transformer class. However, I find that the ``compiler.pycodegen`` module imposes a hard limit on the length of functi

gmpy and counting None

2008-10-13 Thread mmanns
Hi, I just stumbled upon the following issue (I am running Debian): $ python Python 2.5.2 (r252:60911, Sep 29 2008, 21:15:13) [GCC 4.3.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> [2, None].count(None) 1 >>> from gmpy import mpz >>> [mpz(2), None].count

Sending multi-part MIME package via HTTP-POST

2008-10-13 Thread [EMAIL PROTECTED]
This has got me somewhat stumped, so I'll throw it up here in hopes that someone has ran into this before. I'm trying to send a MIME package to Esko Backstage. I'm a bit confused as to how to send this to the server in a manner that it'll be able to get and de-code the MIME package in a valid way.

Re: please solve

2008-10-13 Thread harijay
On Oct 12, 12:15 pm, Raymond Cote <[EMAIL PROTECTED]> wrote: > shweta mani wrote: > > hi folks, > > i have been assigned a project on Python. i need to execute a remote > > shell script file from a windows machine through SSH twisted or > > paramiko. if it is a normal file then directly with the co

Re: Mail reader & spam

2008-10-13 Thread Cousin Stanley
> I'm hesitating to change news readers > You might try the python-based XPN news client at http://xpn.altervista.org/index-en.html I've used it for the past few years and like it very much -- Stanley C. Kitching Human Being Phoenix, Arizona -- htt

Re: Upgrading from 2.5 to 2.6

2008-10-13 Thread Matimus
> Python 2.5 and 2.6 can coexist, so there isn't any need for some > kind of upgrade procedure. Installing 2.6 will not affect your > 2.5 installation. That isn't entirely true. In Windows, python files bound to a particular version of python in the registry. So, for example, if you double click o

Re: SIGALRM problem

2008-10-13 Thread Paul Rubin
Mike Driscoll <[EMAIL PROTECTED]> writes: > http://mail.python.org/pipermail/python-list/2003-August/217530.html > It's old, but it looks ok... Thanks. Maybe I did a dumb thing by overloading IOError and os.popen is actually catching that exception for purposes of its own. I'll try making a new

Re: how to set the time of a directory?

2008-10-13 Thread MRAB
On Oct 13, 2:40 pm, oyster <[EMAIL PROTECTED]> wrote: > so, let alone the 'bad' os.utime, is there any way to set the time of > directory in windows within official python release? can ctypes be > helpful, and how ? > This appears to work: import pywintypes import win32file import time def set_di

Re: RegExp: "wontmatch"-function

2008-10-13 Thread Kirk Strauser
At 2008-10-13T16:40:07Z, [EMAIL PROTECTED] writes: def nomatch(value): return not(value == '' or pattern.match(value)) -- Kirk Strauser The Day Companies -- http://mail.python.org/mailman/listinfo/python-list

Re: Safe eval of insecure strings containing Python data structures?

2008-10-13 Thread George Sakkis
On Oct 13, 8:36 am, lkcl <[EMAIL PROTECTED]> wrote: > On Oct 9, 4:32 am, "James Mills" <[EMAIL PROTECTED]> wrote: > > > On Thu, Oct 9, 2008 at 2:26 PM, Warren DeLano <[EMAIL PROTECTED]> wrote: > > > JSON rocks! Thanks everyone. > > > Yes it does :) > > > > Ben wrote: > > > >>More generally, you sh

Re: docpicture

2008-10-13 Thread Benjamin Kaplan
On Mon, Oct 13, 2008 at 1:43 PM, <[EMAIL PROTECTED]> wrote: > >Steven> I can't imagine Python having direct syntactic support for it, >Steven> but I don't see any reason why the standard library couldn't >Steven> some day grow a "docpicture" module, complete with a tiny (?) >Steven

Re: Question

2008-10-13 Thread Bruno Desthuilliers
Aditi Meher a écrit : Hello How to write code to store data into buffer using python? A text/code editor might be useful. -- http://mail.python.org/mailman/listinfo/python-list

Re: docpicture

2008-10-13 Thread skip
Steven> I can't imagine Python having direct syntactic support for it, Steven> but I don't see any reason why the standard library couldn't Steven> some day grow a "docpicture" module, complete with a tiny (?) Steven> Tkinter app to display the diagram when requested. Heck, if you

Re: SIGALRM problem

2008-10-13 Thread Mike Driscoll
On Oct 13, 11:45 am, Paul Rubin wrote: > I'm trying to run a command on a remote host, something like: > >    result = os.popen('ssh otherhost mycommand').read() > > It is possible that the other host is down, in which case the ssh > command hangs, so I want my script to

Re: Question

2008-10-13 Thread Chris Rebert
To be a bit less sarcastic than the other replies, your question is *much* *much* too vague to be answered. Unless you give us more specific information and ask a more precise question, it's impossible help you. See the link someone already replied with for some good advice on how to do that. Also

Re: Making class attributes non-case-sensitive?

2008-10-13 Thread Matimus
On Oct 13, 4:08 am, Rafe <[EMAIL PROTECTED]> wrote: > Just so I don't hijack my own thread, the issue is 'how to wrap an > object which is not case sensitive'. > > The reason I am stuck dealing with this?... The application's API is > accessed through COM, so I don't know if I can do anything but r

Re: Suggestion for the PythonDevelopment for next version

2008-10-13 Thread azrael
case closed -- http://mail.python.org/mailman/listinfo/python-list

Re: Python syntax question

2008-10-13 Thread Daniel
On Oct 8, 1:19 pm, "Blubaugh, David A." <[EMAIL PROTECTED]> wrote: > Sir, > > I was just wondering that the module that you are utilizing (Rpyc) is a > remote process call module for python?  Is this what you are developing with > at this time? > > Thanks, > > David Blubaugh > > -Original Mes

Re: docpicture

2008-10-13 Thread Steven D'Aprano
On Mon, 13 Oct 2008 08:34:03 -0700, bearophileHUGS wrote: > So in this situation I have sometimes created a quite small image (1 > bit/pixel) that encoded in png image format may require just few hundred > bytes. With Python I encode is binary data string in base64, and I paste > that as a string

SIGALRM problem

2008-10-13 Thread Paul Rubin
I'm trying to run a command on a remote host, something like: result = os.popen('ssh otherhost mycommand').read() It is possible that the other host is down, in which case the ssh command hangs, so I want my script to time out if this happens: def timeout(*x): raise IOError, 'timeout

RegExp: "wontmatch"-function

2008-10-13 Thread pjacobi . de
Dear All, I'm looking for a function which, given a regexp re and and a string str, returns whether re won't match any string starting with str. (so it would always return False if str is "" or if str itself matches re -- but that are only the easy cases). I have the vague feeling that the inter

Question

2008-10-13 Thread Aditi Meher
Hello How to write code to store data into buffer using python? Please reply. -- http://mail.python.org/mailman/listinfo/python-list

Re: Question

2008-10-13 Thread Steven D'Aprano
On Mon, 13 Oct 2008 19:45:46 +0530, Aditi Meher wrote: > Hello > > How to write code to store data into buffer using python? > > Please Reply With a keyboard. Although if you're really keen, you could use a magnetized needle and edit the sectors on the hard disk directly. -- Steven -- http

Re: Suggestion for the PythonDevelopment for next version

2008-10-13 Thread Kirk Strauser
At 2008-10-13T16:11:26Z, azrael <[EMAIL PROTECTED]> writes: > I know that. enumerate is a great function. But this way it always > adds some complexity. I think that it is more better to give a man a > better tool then to let him play with a not so good one. People like > Python because of his sim

Re: Making class attributes non-case-sensitive?

2008-10-13 Thread Peter Pearson
On Mon, 13 Oct 2008 04:08:03 -0700 (PDT), Rafe <[EMAIL PROTECTED]> wrote: > Just so I don't hijack my own thread, the issue is 'how to wrap an > object which is not case sensitive'. > > The reason I am stuck dealing with this?... The application's API is > accessed through COM, [snip] > XSI allows

Re: Suggestion for the PythonDevelopment for next version

2008-10-13 Thread Diez B. Roggisch
azrael wrote: > I know that. enumerate is a great function. But this way it always > adds some complexity. I think that it is more better to give a man a > better tool then to let him play with a not so good one. People like > Python because of his simplicity in comparison with c++. Maybe People >

Re: Suggestion for the PythonDevelopment for next version

2008-10-13 Thread azrael
I know that. enumerate is a great function. But this way it always adds some complexity. I think that it is more better to give a man a better tool then to let him play with a not so good one. People like Python because of his simplicity in comparison with c++. Maybe People would like him even more

Re: Split entries from LDAP

2008-10-13 Thread Michael Ströder
Lars wrote: > I'm trying > to create a script that creates a variable list (just a txt file to be > included in bash scripts) with hosts from LDAP. What exactly do you want to do? I'd recommend against passing a custom text format around. Use either LDIF or CSV with decent modules. > The file wil

Re: PyGUI as a standard GUI API for Python?

2008-10-13 Thread Propad
> the bottom line is: if you want a windows version of pywebkitgtk, i'm > happy to assist and advise anyone of the process- it should be quite > straightforward _if_ you have MSVC and follow the standard procedure, > but i'm not about to spend my own time and effort on providing a win32 > port usin

Re: Suggestion for s/the PythonDevelopment for next version/azrael

2008-10-13 Thread Bruno Desthuilliers
azrael a écrit : You know, sometimes it annoys me to write a for loop in Python. If we use a list a=[1,2,3,4], and want to loop through it, Python offers the next option for i in a: print i 1 2 3 4 I love this. So simple and smooth. But what happens if we need also the position of an object

Re: Suggestion for the PythonDevelopment for next version

2008-10-13 Thread Jean-Paul Calderone
On Mon, 13 Oct 2008 08:56:34 -0700 (PDT), azrael <[EMAIL PROTECTED]> wrote: You know, sometimes it annoys me to write a for loop in Python. If we use a list a=[1,2,3,4], and want to loop through it, Python offers the next option for i in a: print i 1 2 3 4 I love this. So simple and smooth.

Re: Suggestion for the PythonDevelopment for next version

2008-10-13 Thread Diez B. Roggisch
azrael wrote: > You know, sometimes it annoys me to write a for loop in Python. If we > use a list a=[1,2,3,4], and want to loop through it, Python offers the > next option for i in a: print i > 1 > 2 > 3 > 4 > > I love this. So simple and smooth. But what happens if we need also >

Re: subprocess.Popen(..., cwd=...) and Makefile $(PWD) don't play nice

2008-10-13 Thread Miki
> The problem is, he is not printing the name of the current working > directory; he is printing the value of the variable $PWD.  That is > likely set from the environment by the shell he started the Python > program from, but Python does *not* update to reflect changes to > the working directory.

Suggestion for the PythonDevelopment for next version

2008-10-13 Thread azrael
You know, sometimes it annoys me to write a for loop in Python. If we use a list a=[1,2,3,4], and want to loop through it, Python offers the next option >>>for i in a: >>> print i >>> 1 2 3 4 I love this. So simple and smooth. But what happens if we need also the position of an object in a list.

docpicture

2008-10-13 Thread bearophileHUGS
In Python code that processes some geometrical data I want to explain what each variable like w1, w2, h2, h3, etc, means in the geometrical objects. In such situation I don't use longer and more clear variable names because in geometry I'm used to use short vertex/line/length names, finding them mo

Re: Append a new value to dict

2008-10-13 Thread pruebauno
On Oct 13, 9:41 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > On Mon, 13 Oct 2008 14:10:43 +0200, Mathias Frey wrote: > > However incrementing a non-existing key throws an exception. So you > > either have to use a workaround: > > > >>> try: > > ... counter['B'] += 1 > > ... except K

Re: Where/how to propose an addition to a standard module?

2008-10-13 Thread pruebauno
On Oct 10, 3:10 pm, Joe Strout <[EMAIL PROTECTED]> wrote: > I would like to propose a new method for the string.Template class. > What's the proper procedure for doing this? I've joined the python- > ideas list, but that seems to be only for proposed language changes, > and my idea doesn't require

  1   2   >