zipfile module doesn't allow append

2006-06-29 Thread Ritesh Raj Sarraf
Hi, I've got a problem here. def compress_the_file(zip_file_name, files_to_compress, sSourceDir): """ Condenses all the files into one single file for easy transfer """ try: import zipfile except ImportError: sys.stderr.write("Ai! module not found.\n")

Re: how do i make an array global

2006-06-29 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, a wrote: > Traceback (most recent call last): > File "C:\Python24\lib\site-packages\web.py", line 2054, in > run_wsgi_app > result = self.server.app(env, self.wsgi_start_response) > File "C:\Python24\lib\site-packages\web.py", line 1894, in wsgifunc > result = f

Re: Immutability

2006-06-29 Thread Steve Holden
Georg Brandl wrote: > Nick Maclaren wrote: > >>In article <[EMAIL PROTECTED]>, >>"Fredrik Lundh" <[EMAIL PROTECTED]> writes: >>|> >>|> identical? you only applied @property to one of the methods, and then >>you're >>|> surprised that only one of the methods were turned into a property? >> >>I w

Re: Linux info

2006-06-29 Thread Jorgen Grahn
On Tue, 13 Jun 2006 22:06:42 +0800, TheSaint <[EMAIL PROTECTED]> wrote: > Hello there, > > I still learning, but I couldn't find anything which tells me where a > symlink is pointing to. os.readlink() os.lstat() And they are /not/ Linux-specific; expect them to work on most or all Unix-like OSes.

Re: mmap as a sequence behavior

2006-06-29 Thread Lawrence Oluyede
Scott David Daniels <[EMAIL PROTECTED]> wrote: > That is sequence behavior. The convention of -1 for last, -2 for > second-to-last, ... is done before it gets to your C code. I suspect > if you don't define a __len__ method, you'd suppress this. I defined a __len__ method but I get the index "

Import Issue

2006-06-29 Thread praveenkumar . 117
Hi All, What is the difference between import string and from string import * Regards, Praveen -- http://mail.python.org/mailman/listinfo/python-list

Re: Generator naming convention?

2006-06-29 Thread Georg Brandl
[EMAIL PROTECTED] wrote: > I use generators a lot. E.g. > > > def gen_words(text) > ... parse text ... > yield each word in text > > for word in gen_words(text): > print word > > > I don't like the name gen_xxx() very much. Looking for some inspiration > to name generators. Here are some

Re: Import Issue

2006-06-29 Thread Ravi Teja
[EMAIL PROTECTED] wrote: > What is the difference between >import string > and >from string import * Here is an explanation. http://effbot.org/zone/import-confusion.htm -- http://mail.python.org/mailman/listinfo/python-list

Re: Immutability

2006-06-29 Thread Georg Brandl
Steve Holden wrote: > Georg Brandl wrote: >> Nick Maclaren wrote: >> >>>In article <[EMAIL PROTECTED]>, >>>"Fredrik Lundh" <[EMAIL PROTECTED]> writes: >>>|> >>>|> identical? you only applied @property to one of the methods, and then >>>you're >>>|> surprised that only one of the methods were tu

RE: handling unicode data

2006-06-29 Thread Tim Golden
[Filipe] | I've done some searching and settled for pymssql, but it's | not too late to change yet. Indeed, the good thing about the DBAPI-compatibility of such libraries is that you can often switch and switch about with no cost to you at all. (Believe me, I've done it). Sometimes there is a co

Re: Import Issue

2006-06-29 Thread Duncan Booth
wrote: > Hi All, > > What is the difference between >import string > and >from string import * > > Regards, > Praveen > "import string" is effectively the same as doing: string = sys.modules['string'] "from string import *" is effectively the

Bug reporting impossible

2006-06-29 Thread Nick Maclaren
Currently logins are disabled to sourceforge.net, and (despite the comments) it won't let me report a bug anonymously. Does anyone know whether this is short or long term? I have a bug in 2.5 to report - which has been there for a while and isn't overwhelmingly critical and has been there for a

Amara: Where's my attribute?

2006-06-29 Thread AdSR
Hi, I'm having a problem with the Amara toolkit. Try this: >>> from amara import binderytools >>> raw = 'http://example.com/namespace"; >>> xmlns:pq="http://pq.com/ns2"/>' >>> rwd = binderytools.bind_string(raw) >>> print rwd.xml() http://pq.com/ns2"/> What happened to the xmlns attribute? Doe

Re: Amara: Where's my attribute?

2006-06-29 Thread Fredrik Lundh
"AdSR" wrote: > I'm having a problem with the Amara toolkit. Try this: > from amara import binderytools raw = 'http://example.com/namespace"; xmlns:pq="http://pq.com/ns2"/>' rwd = binderytools.bind_string(raw) print rwd.xml() > > http://pq.com/ns2"/> > > What happened to

Re: Bug reporting impossible

2006-06-29 Thread Georg Brandl
Nick Maclaren wrote: > Currently logins are disabled to sourceforge.net, and (despite the > comments) it won't let me report a bug anonymously. Does anyone > know whether this is short or long term? I have a bug in 2.5 to > report - which has been there for a while and isn't overwhelmingly > crit

Re: New to Python: Do we have the concept of Hash in Python?

2006-06-29 Thread Ten
On Friday 02 June 2006 13:07, Piet van Oostrum wrote: > > "A.M" <[EMAIL PROTECTED]> (AM) wrote: > > > >AM> This is my 1st day that I am seriously diving into Python and I have > >AM> to finish this application by the end of today. > > Are you serious? > -- > Piet van Oostrum <[EMAIL PROTECTED]>

Database access through python using GUI(Tkinter)

2006-06-29 Thread arvind
hi all, i am accessing sql+ database through python 2.4.3. i am using Tkinter to build my screens. how can i pass parameters on the click event of button from one function to the another? how can i run another file from current file? -- http://mail.python.org/mailman/listinfo/python-list

Database access through python using GUI(Tkinter)

2006-06-29 Thread arvind
hi all, i am accessing sql+ database through python 2.4.3. i am using Tkinter to build my screens. how can i pass parameters on the click event of button from one function to the another? how can i run another file from current file? arvind -- http://mail.python.org/mailman/listinfo/pyt

Re: Exchanging data with a C program using shared memory (sysV IPC)

2006-06-29 Thread Al
"slacker" <[EMAIL PROTECTED]> writes: Hello slacker, > Al wrote: > >> I want my python application to communicate with an legacy C program which >> read/write data in a shared memory (Unix Sys V IPC). > > Have you looked at the dl module? Types and portability aside, it > might provide you with

Re: Numeric help!

2006-06-29 Thread Sheldon
Hi Carl, My days as a student is over for the most part. I am learning python on my own and Numeric is not properly documented so I am learning by doing and copying from others. I thought about the problem and a solution another problem given to me earlier using "putmask" is the solution but there

Re: Select in Python

2006-06-29 Thread Lawrence D'Oliveiro
In article <[EMAIL PROTECTED]>, Gary Herron <[EMAIL PROTECTED]> wrote: >If you want select to start blocking again, you must read all bytes from >stdin whenever select says there are bytes to be read. To add to this, it is a good idea to read the select_tut(2) man page, particularly the "SELECT

Re: handling unicode data

2006-06-29 Thread Frank Millman
Filipe wrote: > Hi, > > I've done some searching and settled for pymssql, but it's not too late > to change yet. > I've found these options to connect to a MSSqlServer database: > > Pymssql > http://pymssql.sourceforge.net/ > > ADODB for Python (windows only) > http://phplens.com/lens/adodb/adodb-

Widget access

2006-06-29 Thread arvind
how to make the widgets defined inside the function available outside it without using OOPs concept? -- http://mail.python.org/mailman/listinfo/python-list

Widget access

2006-06-29 Thread arvind
how to make the widgets defined inside the function available outside it without using OOPs concept? -- http://mail.python.org/mailman/listinfo/python-list

Widget access

2006-06-29 Thread arvind
how to make the widgets defined inside the function available outside it without using OOPs concept? -- http://mail.python.org/mailman/listinfo/python-list

Re: Execute Commands on Remote Computers over Network

2006-06-29 Thread Lawrence D'Oliveiro
In article <[EMAIL PROTECTED]>, "dylpkls91" <[EMAIL PROTECTED]> wrote: >Lawrence D'Oliveiro wrote: >> In article <[EMAIL PROTECTED]>, >> "dylpkls91" <[EMAIL PROTECTED]> wrote: >> >> >I have been researching this topic and come up with some code to make >> >it work. It uses SSL and requires the 3

Re: Passing a Cookie with httplib

2006-06-29 Thread Lawrence D'Oliveiro
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: >I would like to >hard code the cookie in the code so it works every time: > >i.e. cookie = 'auth=buster%3A12345678901234567890exZ9rzMqgtxa5A'. > >conn=httplib.HTTPConnection(WP_SERVER) >conn.request('GET',WP_PATH % uservalue)

Python docs bug

2006-06-29 Thread Lawrence D'Oliveiro
One long-standing irritation I have with the table of contents for the Python Library Reference , is that there is one very important section, "String Methods" , which does not appear there. That's because it i

Release of PyPy videos

2006-06-29 Thread Wanja Saatkamp
The PyPy team is happy to announce that the first bunch of PyPy videos can now be downloaded from: http://codespeak.net/pypy/dist/pypy/doc/video-index.html The videos introduce involved people and contain different talks, tutorials and interviews such as: 1. Technical talk on the PyPy architectu

Re: Immutability

2006-06-29 Thread Steve Holden
Georg Brandl wrote: > Steve Holden wrote: [...] > >>Would it make sense, in the single argument case, to default the doc >>value to fget.__doc__ to support that use case, or should we just not >>create read-only properties by using property as a decorator? > > > This is actually already the ca

ftplib.FTP.retrbinary() hangs on completion

2006-06-29 Thread aum
Hi, I've been having some headaches with FTP.retrbinary() hanging on completion. I'm only seeing the symptom when downloading a 700k .bmp file in passive mode. What happens is that after all the data comes in over the data connection, .retrbinary() does 'return self.voidresp()'. This has a call

Running DocTest on Strings

2006-06-29 Thread notanotheridiot
Hi, I have two strings - a docstring containing doctests and a code string containing code to be tested with those doctests. I've been trying for a day now to run the test without concatenating the two strings, adding: import doctest doctest.testmod to the bottom, writing it all to a file and exe

Re: ftplib.FTP.retrbinary() hangs on completion

2006-06-29 Thread Fredrik Lundh
"aum" <[EMAIL PROTECTED]> wrote: > What happens is that after all the data comes in over the data connection, > .retrbinary() does 'return self.voidresp()'. This has a call chain ending > with 'self.file.readline()'. > > To investigate, I overrode the .getline() method with one > which replaces th

Python 2.4 tutorial

2006-06-29 Thread subramanian2003
Hello All, From where I can get the detailed python 2.4 tutorial(other than python.org). Thanks, Subramanian. -- http://mail.python.org/mailman/listinfo/python-list

Python decompiler

2006-06-29 Thread subramanian2003
Hello All, I have some compiled python 2.4 scripts. If anyone has python decompiler, pls send me. Thanks, subramanian. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python decompiler

2006-06-29 Thread Kay Schluehr
subramanian2003 wrote: > Hello All, > > I have some compiled python 2.4 scripts. If anyone has python decompiler, > pls send me. > > Thanks, > subramanian. http://www.python.org/doc//2.4/lib/module-dis.html -- http://mail.python.org/mailman/listinfo/python-list

Re: Passing a Cookie with httplib

2006-06-29 Thread scott
On Thu, 29 Jun 2006 21:42:50 +1200, Lawrence D'Oliveiro <[EMAIL PROTECTED]> wrote: >According to , >you can pass additional "body" and "headers" args to >HTTPConnection.request. How about trying something like this in place of >the last li

Re: Passing a Cookie with httplib

2006-06-29 Thread scott
On Wed, 28 Jun 2006 20:21:37 -, Grant Edwards <[EMAIL PROTECTED]> wrote: >On 2006-06-28, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > >> From a shell script, I have used /usr/bin/curl to access a web site >> and pass a cookie > >I use ClientCookie for that. > >http://wwwsearch.sourceforge.ne

Re: mmap as a sequence behavior

2006-06-29 Thread Lawrence Oluyede
Lawrence Oluyede <[EMAIL PROTECTED]> wrote: > What am I missing from the C API? Found. I edit abstract.c placing some printf here and there and discovered PyObject_GetItem is always called and in turn it call PySequence_GetItem so is there my index is translated. -- Lawrence - http://www.oluyed

Re: locating strings approximately

2006-06-29 Thread Jim Segrave
In article <[EMAIL PROTECTED]>, Irmen de Jong <[EMAIL PROTECTED]> wrote: >BBands wrote: >> I'd like to see if a string exists, even approximately, in another. For >> example if "black" exists in "blakbird" or if "beatles" exists in >> "beatlemania". The application is to look though a long list of

Re: Python decompiler

2006-06-29 Thread Bruno Desthuilliers
subramanian2003 wrote: > Hello All, > > I have some compiled python 2.4 scripts. If anyone has python decompiler, > pls send me. > Do you have the right to decompile them ? Usually, open source softwares - as the name imply - are ditributed with the sources, or have an available source distri

Re: Python 2.4 tutorial

2006-06-29 Thread Martin P. Hellwig
subramanian2003 wrote: > Hello All, > >From where I can get the detailed python 2.4 tutorial(other than > python.org). > > Thanks, > Subramanian. > > If you're willing to pay for it you can read many python books online at: http://safari.oreilly.com Although I like a paper version more (a

Re: Import Issue

2006-06-29 Thread Steve Holden
[EMAIL PROTECTED] wrote: > Hi All, > > What is the difference between >import string > and >from string import * > [EMAIL PROTECTED] ~/Projects/dbimp $ python Python 2.4.1 (#1, May 27 2005, 18:02:40) [GCC 3.3.3 (cygwin special)] on cygwin Type "hel

Re: Icono en wxpython

2006-06-29 Thread Bruno Desthuilliers
Gabriel wrote: > Hola: > He echo un programa en wxpython. Se trata de un programa para > desarrollos con microcontroladores como PIC's etc. en cuanto a > transmisión RS232 se refiere. > > El programa es GNU y quiero publicarlo pronto pero no se como poner el > ícono a la ventana y al archivo en si

Re: New to Python: Do we have the concept of Hash in Python?

2006-06-29 Thread Steve Holden
Ten wrote: > On Friday 02 June 2006 13:07, Piet van Oostrum wrote: > >>>"A.M" <[EMAIL PROTECTED]> (AM) wrote: >>> >>>AM> This is my 1st day that I am seriously diving into Python and I have >>>AM> to finish this application by the end of today. >> >>Are you serious? >>-- >>Piet van Oostrum <[E

Re: Widget access

2006-06-29 Thread Steve Holden
arvind wrote: > how to make the widgets defined inside the function available outside > it without using OOPs concept? > Only ways to have something created in function available outside are a) have function store widget refs in global (poor coupling), b) have mutable function argument into whic

Re: Python 2.4 tutorial

2006-06-29 Thread BartlebyScrivener
Search the group for "tutorial" http://tinyurl.com/h5obg Or look here http://wiki.python.org/moin/BeginnersGuide/NonProgrammers Ask better questions. http://www.catb.org/esr/faqs/smart-questions.html Are you a programmer or a nonprogrammer? rd -- http://mail.python.org/mailman/listinfo/pyt

Re: to py or not to py ?

2006-06-29 Thread Steve Holden
Tom Plunket wrote: > Carl J. Van Arsdall wrote: > > >>Because of the GIL only one thread can actually run at a time. > > > I've recently been wondering about this, since in the work I do, a lot > of time is spent doing disk I/O. So if I want the UI to remain > responsive, I could spawn an IO t

Re: Execute Commands on Remote Computers over Network

2006-06-29 Thread Steve Holden
Lawrence D'Oliveiro wrote: > In article <[EMAIL PROTECTED]>, > "dylpkls91" <[EMAIL PROTECTED]> wrote: > > >>Lawrence D'Oliveiro wrote: >> >>>In article <[EMAIL PROTECTED]>, >>> "dylpkls91" <[EMAIL PROTECTED]> wrote: >>> >>> I have been researching this topic and come up with some code to mak

Re: Amara: Where's my attribute?

2006-06-29 Thread AdSR
Fredrik Lundh wrote: > [cut] > the documents are 100% identical in XML infoset terms, so what's the problem > here ? Looks like the problem is somewere else, after all: Some software relies on these "unused" xmlns attributes, most notably XML Schema tools. Which is unfortunate, because xmlns attr

Event notification system - where to start ?

2006-06-29 Thread geskerrett
We have been asked to develop and application for a client that is a 'notification" system. We would like to use python, but are struggling to find the right starting point. Any suggestions, tips or sample code would be appreciated. Application outline; Machine A is running a "listener" applica

Re: Python in a nutshell - new edition ?

2006-06-29 Thread John Salerno
Alex Martelli wrote: > BartlebyScrivener <[EMAIL PROTECTED]> wrote: > Yep, we're still aiming for OSCON '06 (Portland, end of July). >> Amazon says July 1st. > > Let me assure you that it _won't_ be on paper this coming Saturday (two > days from now). > > > Alex Doh! I had just noticed th

Re: [OT] Prolog and Regular Expressions, Was: Re: perspective on ruby

2006-06-29 Thread Harry George
Kenneth McDonald <[EMAIL PROTECTED]> writes: [snip] > > That said, it'd be nice if there were some easy way to access a Prolog > engine from Python. When Prolog is appropriate, it's _really_ > appropriate. > > > Cheers, > Ken > http://christophe.delord.free.fr/en/pylog/ http://aspn.activestate

RE: Event notification system - where to start ?

2006-06-29 Thread Tim Golden
[EMAIL PROTECTED] | We have been asked to develop and application for a client that is a | 'notification" system. We would like to use python, but are | struggling to find the right starting point. Any suggestions, tips or | sample code would be appreciated. | | Application outline; [... sni

problems with mimify.mime_encode_header

2006-06-29 Thread Egor Duda
I'm trying to use mimify module and have a problem with mime_encode_header function. Below is the testcase #!/usr/bin/python # -*- coding: utf-8 -*- import mimify mimify.CHARSET = 'utf-8' print mimify.mime_encode_header('Subject: тест а.\n'); Тhe output is: Subject: =?utf-8?Q?=D1=82=D0=B5=D1=8

Re: Event notification system - where to start ?

2006-06-29 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: > We have been asked to develop and application for a client that is a > 'notification" system. We would like to use python, but are struggling > to find the right starting point. Any suggestions, tips or sample code > would be appreciated. > We also looked at the a

python for windows internet filter / firewall

2006-06-29 Thread thorley
Greetings, I'm interested in a simple content-based internet firewall/filter, similar to dansguardian (http://dansguardian.org/), but written in python, and for windows. I assumed such a project would already exist, but my searches on freshmeat, and google turned up empty. I would be interested in

Re: python for windows internet filter / firewall

2006-06-29 Thread Diez B. Roggisch
> 2) Is this even reasonable in python and how might I get started? (e.g. > win32 COM?) Don't know much (not to say nothing) about windows firewalling & the interfaces one needs to talk to them. But _what_ I know is: a firewall needs to be fast. The big guys in networking put a lot of effort int

Re: Numeric help!

2006-06-29 Thread Carl Banks
Sheldon wrote: >Carl Banks wrote: >> I'm not sufficiently sure this isn't a homework problem, so here's a >> partial answer. [snip] > > My days as a student is over for the most part. I am learning python on > my own and Numeric is not properly documented so I am learning by doing > and copying fro

Re: python for windows internet filter / firewall

2006-06-29 Thread thorley
I thought speed might be an issue. At this point I'm not interested in much more than toying around, so *if* there's a way to do it, I'd like to explore the options. -- matthew Diez B. Roggisch wrote: > > 2) Is this even reasonable in python and how might I get started? (e.g. > > win32 COM?) > >

Re: Numeric help!

2006-06-29 Thread Alan Isaac
On Thu, 29 Jun 2006 05:25:25 -0400, Sheldon <[EMAIL PROTECTED]> wrote: > I am learning python on > my own and Numeric is not properly documented 1. Use NumPy (Numeric's successor): http://www.numpy.org/ 2. Documentation is excellent: http://www.tramy.us/ (Also see http://www.scipy.org/Cookbook

Re: Python docs bug

2006-06-29 Thread John Roth
Lawrence D'Oliveiro wrote: > One long-standing irritation I have with the table of contents for the > Python Library Reference , is that > there is one very important section, "String Methods" > , which does not a

Re: Python docs bug

2006-06-29 Thread skip
>> One long-standing irritation I have with the table of contents for >> the Python Library Reference , >> is that there is one very important section, "String Methods" >> , which does not >> a

Pydev 1.2.1 Released

2006-06-29 Thread Fabio Zadrozny
Hi All, Pydev and Pydev Extensions 1.2.1 have been released Details on Pydev Extensions: http://www.fabioz.com/pydev Details on Pydev: http://pydev.sf.net Details on its development: http://pydev.blogspot.com Important 1. This release is still not available in the sourc

Re: Python in a nutshell - new edition ?

2006-06-29 Thread Alex Martelli
John Salerno <[EMAIL PROTECTED]> wrote: > Alex Martelli wrote: > > BartlebyScrivener <[EMAIL PROTECTED]> wrote: > > > Yep, we're still aiming for OSCON '06 (Portland, end of July). > >> Amazon says July 1st. > > > > Let me assure you that it _won't_ be on paper this coming Saturday (two > >

Re: Immutability

2006-06-29 Thread Georg Brandl
Steve Holden wrote: > Georg Brandl wrote: >> Steve Holden wrote: > [...] >> >>>Would it make sense, in the single argument case, to default the doc >>>value to fget.__doc__ to support that use case, or should we just not >>>create read-only properties by using property as a decorator? >> >> >>

slow non-blocking reads

2006-06-29 Thread Mark Dufour
hello all, I am trying to fire up a child process using os.popen2, and have the parent and child communicate in a non-blocking fashion. it works, but somehow it's unbearably slow. the following simulates a blocking readline: import os, fcntl fi, fo = os.popen2('./child') fcntl.fcntl(fo.fileno(),

Re: How to disable tk inclusion in py build

2006-06-29 Thread venkatbo
> I'd like to disable the inclusion of tk graphics lib in my py build. > Looked around but couldn't find a clear answer. Which one of > the following would I need to use in the configure step: > --disable-tkbuild > --without-tk In case anyone is intereted, as it turns out, one way of achieving

Re: Bug reporting impossible

2006-06-29 Thread Simon Forman
Nick Maclaren wrote: ... > Create a file called '' in your current directory containing > 'print "Oh, yeah?\n"' and then import a module that doesn't exist. > Don't include the single quotes. Why would you have a file named '' in your current directory? ~Simon -- http://mail.python.org/mailman

Leo 4.4.1 beta 3 released

2006-06-29 Thread Edward K. Ream
Leo 4.4.1 beta 3 is now available at: http://sourceforge.net/project/showfiles.php?group_id=3458&package_id=29106 This release corrects several long-standing bugs and adds optional flashing of matching brackets. Leo is a text editor, data organizer, project manager and much more. See: http://web

Re: Immutability

2006-06-29 Thread Kay Schluehr
Nick Maclaren wrote: > In article <[EMAIL PROTECTED]>, > Robert Kern <[EMAIL PROTECTED]> writes: > |> Nick Maclaren wrote: > |> > The way that I read it, Python allows only values (and hence types) > |> > to be immutable, and not class members. The nearest approach to the > |> > latter is to use

Re: Bug reporting impossible

2006-06-29 Thread Grant Edwards
On 2006-06-29, Nick Maclaren <[EMAIL PROTECTED]> wrote: > Currently logins are disabled to sourceforge.net, and (despite the > comments) it won't let me report a bug anonymously. Does anyone > know whether this is short or long term? I have a bug in 2.5 to > report - which has been there for a w

Re: Bug reporting impossible

2006-06-29 Thread Grant Edwards
On 2006-06-29, Simon Forman <[EMAIL PROTECTED]> wrote: > Nick Maclaren wrote: > ... >> Create a file called '' in your current directory >> containing 'print "Oh, yeah?\n"' and then import a module that >> doesn't exist. Don't include the single quotes. > > Why would you have a file named '' in you

Re: Bug reporting impossible

2006-06-29 Thread Nick Maclaren
In article <[EMAIL PROTECTED]>, "Simon Forman" <[EMAIL PROTECTED]> writes: |> Nick Maclaren wrote: |> ... |> > Create a file called '' in your current directory containing |> > 'print "Oh, yeah?\n"' and then import a module that doesn't exist. |> > Don't include the single quotes. |> |> Why would

Re: Bug reporting impossible

2006-06-29 Thread Nick Maclaren
In article <[EMAIL PROTECTED]>, Georg Brandl <[EMAIL PROTECTED]> writes: |> |> You should have said what the bug is. Well, maybe, but it is more amusing than serious. I have now reported it properly, as Sourceforge is back up. |> The problem is that Python does not know whether a file name is

what do you guys prefer for ajax?

2006-06-29 Thread a
what do you guys prefer for ajax? dojo mochikit prototype or somehting else/ -- http://mail.python.org/mailman/listinfo/python-list

list comprehension

2006-06-29 Thread a
can someone tell me how to use them thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: Bug reporting impossible

2006-06-29 Thread Fredrik Lundh
Nick Maclaren wrote: > It's definitely worth fixing, but not as a high priority. Invoking a > file spuriously is potentially serious, with very low probability. the traceback printer is reading the file (using a very robust reader), it's not "invoking" it. -- http://mail.python.org/mailman/

Re: how do i make an array global

2006-06-29 Thread a
i understand index error but there is no index error in my code that is the problem! Marc 'BlackJack' Rintsch wrote: > In <[EMAIL PROTECTED]>, a wrote: > > > Traceback (most recent call last): > > File "C:\Python24\lib\site-packages\web.py", line 2054, in > > run_wsgi_app > > result = self.se

Re: Python database access

2006-06-29 Thread vasudevram
Yes, Steve is right. Sorry for the mistake. In my case, I don't use Active Python, I use the vanilla Python for Windows (the .msi installer from python.org) and then immediately install the win32all package, link to which is usually on the same page as the MSI. I do this as a routine, whenever I u

Re: how do i make an array global

2006-06-29 Thread Fredrik Lundh
a wrote: > i understand index error > but there is no index error in my code that is the problem! so who wrote the "c:\mark\web1\code.py" file ? > > File "c:\mark\web1\code.py", line 64, in GET > > l_code.append( len(d_list_code[i]['entries']) ) > > IndexError: list index out of range m

Re: Bug reporting impossible

2006-06-29 Thread Simon Forman
Nick Maclaren wrote: > In article <[EMAIL PROTECTED]>, > "Simon Forman" <[EMAIL PROTECTED]> writes: > |> Nick Maclaren wrote: > |> ... > |> > Create a file called '' in your current directory containing > |> > 'print "Oh, yeah?\n"' and then import a module that doesn't exist. > |> > Don't include t

Re: compiling python (or ironpython) to .exe or .dll for or not for .NET

2006-06-29 Thread josiah . carlson
per9000 wrote: > Update: > > I have found a holy handgrenade. > > I found something that seems to work fine for me - I've only tried it > for 5 minutes but seems to work very smoothly. Open-source, Mozilla > license, you know the drill... > > http://www.py2exe.org/ > > py2exe (the name makes me fa

Re: Python 2.4 tutorial

2006-06-29 Thread vasudevram
Try: Dive into Python (for experienced programmers): http://diveintopython.org A Byte of Python (for beginning programmers): http://www.byteofpython.info/ Both are good. Vasudev --- Vasudev Ram http://www.geocities.com/vasudevram PDF conversion toolkit (written in Python) http://sourceforge.ne

Re: [Pyrex] pyrex functions to replace a method (Re: replace a method in class: how?)

2006-06-29 Thread Dieter Maurer
Greg Ewing <[EMAIL PROTECTED]> writes on Wed, 28 Jun 2006 11:56:55 +1200: >... > I have suggested that builtin functions should be > given the same method-binding behaviour as interpreted > functions. The idea wasn't rejected out of hand, but > I don't think anything has been done about it yet. Yo

Re: list comprehension

2006-06-29 Thread Simon Forman
a wrote: > can someone tell me how to use them > thanks basically, a list comprehension is just like a for loop, if you wrote it out the "long way" it would be something like this: results = [] for var in some_iterable: if some condition: results.append(some expression) The list co

Re: what do you guys prefer for ajax?

2006-06-29 Thread Ravi Teja
a wrote: > what do you guys prefer for ajax? > dojo > mochikit > prototype > or somehting else/ I am using OpenLaszlo for a project with a Karrigell (Python) ReST backend. Now strictly speaking, this is not AJAX at the moment. It uses Flash but has the same "asynchronous updates from the server"

Re: Bug reporting impossible

2006-06-29 Thread Nick Maclaren
In article <[EMAIL PROTECTED]>, Fredrik Lundh <[EMAIL PROTECTED]> writes: |> Nick Maclaren wrote: |> |> > It's definitely worth fixing, but not as a high priority. Invoking a |> > file spuriously is potentially serious, with very low probability. |> |> the traceback printer is reading the file

Re: list comprehension

2006-06-29 Thread tac-tics
a wrote: > can someone tell me how to use them > thanks sigh... You do a google on them: http://docs.python.org/tut/node7.html#SECTION00714 They are the program equivalent of set builder notation in math: {x | x in S} would be written [x for x in S] in python. -- http://

Re: list comprehension

2006-06-29 Thread utabintarbo
Simon Forman wrote: > results = [] > for var in some_iterable: > if some condition: > results.append(some expression) > > > The list comprehension version: > > results = [some expression for var in some_iterable if some condition] > > > There's more to it, but that's the basic idea. E

Re: code is data

2006-06-29 Thread Ravi Teja
I missed this reply earlier. Fredrik Lundh wrote: > there might be cognitive theories that argue that the length of the > symbols used to describe something is more important than the symbols > you use and how they can be "chunked" by the brain Expert communication is known to work differently. F

Re: logging error with RotatingFileHandler

2006-06-29 Thread Vinay Sajip
flupke wrote: > If this bug is fixed, where will i find a fixed version and how do i > install it? > Also, more important to me, what am i doing wrong to get this error > message in the first place? You're not doing anything particularly wrong, though it's not exactly good practice to call fileCo

Re: Python docs bug

2006-06-29 Thread Terry Reedy
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > >>> One long-standing irritation I have with the table of contents for >>> the Python Library Reference , >>> is that there is one very important section, "String Methods" >>>

XMLLIB

2006-06-29 Thread Heavy
hi, I need to know if the 'xmllib' module have some method able to transform a data structure in a xml file and viceversa, thanks -- http://mail.python.org/mailman/listinfo/python-list

Interprocess communication on multi-user machine

2006-06-29 Thread Michael Butscher
Hi, this is not really Python-specific but I need it for Python. I'm wanting a method for interprocess communication which is OS- independent (sockets would be the normal way to go), but which works if multiple users use the machine at the same time so that one user has no access to the communi

Re: XML validationg against XSD file in Python

2006-06-29 Thread Jarek Zgoda
[EMAIL PROTECTED] napisał(a): > I have tried searching for tips or tutorials on validating an XML file > against and XSD file in python but I haven't had any luck. Can someone > point me in the right direction to how this would be achieved. I've > read that Python has built in libraries for DTD va

Re: Problem with sets and Unicode strings

2006-06-29 Thread Dennis Benzinger
Diez B. Roggisch wrote: >> But I'd say that it's not intuitive that for sets x in y can be false >> (without raising an exception!) while the doing the same with a tuple >> raises an exception. Where is this difference documented? > > 2.3.7 Set Types -- set, frozenset > > ... > > Set elements ar

Re: problems with mimify.mime_encode_header

2006-06-29 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Egor Duda wrote: > #!/usr/bin/python > # -*- coding: utf-8 -*- > > import mimify > > mimify.CHARSET = 'utf-8' > > print mimify.mime_encode_header('Subject: тест а.\n'); > > Тhe output is: > Subject: =?utf-8?Q?=D1=82=D0=B5=D1=81=D1=82?= а. > > Please note that the last

Regular Expression - old regex module vs. re module

2006-06-29 Thread Steve
Hi All, I'm having a tough time converting the following regex.compile patterns into the new re.compile format. There is also a differences in the regsub.sub() vs. re.sub() Could anyone lend a hand? import regsub import regex import re# << need conversion to this module """Conv

Re: to py or not to py ?

2006-06-29 Thread Carl J. Van Arsdall
Tom Plunket wrote: > Carl J. Van Arsdall wrote: > > >> Because of the GIL only one thread can actually run at a time. >> > > I've recently been wondering about this, since in the work I do, a lot > of time is spent doing disk I/O. So if I want the UI to remain > responsive, I could spawn a

  1   2   >