Re: Bug reporting impossible

2006-06-29 Thread Fredrik Lundh
Nick Maclaren wrote: > |> Why would you have a file named '' in your current directory? > > Why would Python search for one? :-) > > In both cases, the normal answer is "Someone made a mistake" but, if > you have a script that creates a files of the same names specified in > the current directory,

conecting with a MsAcces DB by dao

2006-06-29 Thread luis
Hi I'm using activestate python 2.4 on win xp 2 ed. and Ms Access 2002 (reading first http://starship.python.net/crew/bwilk/access.html) I have writed the following code def append_from_Access(self): try: import ... conn = win32com.client.Dispatch(r'ADODB.Connection') DSN = "P

Re: XMLLIB

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

Import: Multiple modules with same name

2006-06-29 Thread Amit Khemka
Hello All, I have multiple modules with same name in different directories (well I guess thats may not be a good practise, but i needed it for debugging and working with various versions). Now how do I import a module with specifying a path. Few minutes of googling suggested: import ihooks impor

Re: Reddit broke - should have remained on Lisp?

2006-06-29 Thread Fredrik Lundh
"Alok" wrote: > While posting a comment on http://www.reddit.com I got an error page > with the following curious statement on it. > > "reddit broke (sorry)" > "looks like we shouldn't have stopped using lisp..." > > See screenshot at > http://photos1.blogger.com/blogger/1773/1980/1600/reddit-brok

Re: How to get indices of a two dimensional list

2006-06-29 Thread Simon Forman
[EMAIL PROTECTED] wrote: > I have a list > > x = [0] * 2 > x = x * [2] You're certainly not doing that. >>> x = [0] * 2 >>> x = x * [2] Traceback (most recent call last): File "", line 1, in ? TypeError: can't multiply sequence by non-int And even if you *do* do what it looks like you think y

Re: Reddit broke - should have remained on Lisp?

2006-06-29 Thread Tim X
"Luis M. González" <[EMAIL PROTECTED]> writes: > Alok wrote: >> While posting a comment on http://www.reddit.com I got an error page >> with the following curious statement on it. >> >> "reddit broke (sorry)" >> "looks like we shouldn't have stopped using lisp..." >> >> See screenshot at >> http:/

Re: logging module question

2006-06-29 Thread Martin Jürgens
Am Thu, 29 Jun 2006 20:22:28 -0700 schrieb ss2003: > hi > i have defined a function > def logger(logfile,msg): > import logging > > logging.basicConfig(level=logging.DEBUG, >format='%(asctime)s %(levelname)-8s > %(message)s', >

Re: Event notification system - where to start ?

2006-06-29 Thread grahamd
[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. > > Application outline; > > M

No error while sending via TCP Socket

2006-06-29 Thread Martin Bürkle
Hi NG, I have writen a programm using TCP sockets. After i get the connection to another socket I cut the Ethernet cable. Then I send a message. The program doesnt raise any exception. Can somebody tell me why and give me a hint how to get an exception Thanks for your help. Martin -- http://m

How to get indices of a two dimensional list

2006-06-29 Thread sramaswamy
I have a list x = [0] * 2 x = x * [2] x[1,1] = 7 This gives me the x value [[0,0] [0,0] [0,0] [0,7]] I want to get the indices of the value 7. i.e. something like i = a.index(max(a)) gives me '1' This only gives me the index in one dimension. Is there any method by which I can get (1,1) as the

Re: decimal by default

2006-06-29 Thread Alex Martelli
Daniel <[EMAIL PROTECTED]> wrote: > Alex Martelli wrote: > > What about: > > > > c = compile(thestring, thestring, '') > > > > cc = new.code( ...all args from c's attributes, except the 5th > > one, constants, which should instead be: > > decimal

logging module question

2006-06-29 Thread s99999999s2003
hi i have defined a function def logger(logfile,msg): import logging logging.basicConfig(level=logging.DEBUG, format='%(asctime)s %(levelname)-8s %(message)s', datefmt='%a, %d %b %Y %H:%M:%S',

Re: Icono en wxpython

2006-06-29 Thread Philippe Martin
Try Sourceforge. (si j'ai bien compris) Regards, Philippe Bruno Desthuilliers wrote: > 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 program

Re: Reddit broke - should have remained on Lisp?

2006-06-29 Thread Ken Tilton
Luis M. González wrote: > Alok wrote: > >>While posting a comment on http://www.reddit.com I got an error page >>with the following curious statement on it. >> >>"reddit broke (sorry)" >>"looks like we shouldn't have stopped using lisp..." >> >>See screenshot at >>http://photos1.blogger.com/blog

Re: decimal by default

2006-06-29 Thread Daniel
Alex Martelli wrote: > What about: > > c = compile(thestring, thestring, '') > > cc = new.code( ...all args from c's attributes, except the 5th > one, constants, which should instead be: > decimalize(c.co_consts)...) Wow, what an elegant solution

Re: Reddit broke - should have remained on Lisp?

2006-06-29 Thread Luis M. González
K.S.Sreeram wrote: > Have people lost all sense of humor?? Its just reddit's attempt at > humor! I've rarely seen any server errors on reddit, but even when I do > see one.. its funny! > > Here's another one: > http://www.flickr.com/photos/pvera/sets/72057594050280833/ > > Check out their testimon

Re: Reddit broke - should have remained on Lisp?

2006-06-29 Thread Tin Gherdanarra
Luis M. González wrote: > Alok wrote: > >>I was merely describing my experience and inviting others' response >>about theirs. > > > That's exactly what I'm doing. > > >>Please don't misconstrue that as a blame on any language. > > > I think it can be interpreted in many ways. > Now if you're

Re: Reddit broke - should have remained on Lisp?

2006-06-29 Thread Luis M. González
Alok wrote: > I was merely describing my experience and inviting others' response > about theirs. That's exactly what I'm doing. > Please don't misconstrue that as a blame on any language. I think it can be interpreted in many ways. Now if you're not ready to read other people's oppinions, don'

Re: Reddit broke - should have remained on Lisp?

2006-06-29 Thread K.S.Sreeram
Luis M. González wrote: > Alok wrote: >> While posting a comment on http://www.reddit.com I got an error page >> with the following curious statement on it. >> >> "reddit broke (sorry)" >> "looks like we shouldn't have stopped using lisp..." > > I don't know if this is true or not, but blaming a l

Re: Reddit broke - should have remained on Lisp?

2006-06-29 Thread Alok
Luis M. González wrote: > Alok wrote: > > While posting a comment on http://www.reddit.com I got an error page > > with the following curious statement on it. > > > > "reddit broke (sorry)" > > "looks like we shouldn't have stopped using lisp..." > > > > See screenshot at > > http://photos1.blogge

Re: Reddit broke - should have remained on Lisp?

2006-06-29 Thread Luis M. González
Alok wrote: > While posting a comment on http://www.reddit.com I got an error page > with the following curious statement on it. > > "reddit broke (sorry)" > "looks like we shouldn't have stopped using lisp..." > > See screenshot at > http://photos1.blogger.com/blogger/1773/1980/1600/reddit-broke.

Reddit broke - should have remained on Lisp?

2006-06-29 Thread Alok
While posting a comment on http://www.reddit.com I got an error page with the following curious statement on it. "reddit broke (sorry)" "looks like we shouldn't have stopped using lisp..." See screenshot at http://photos1.blogger.com/blogger/1773/1980/1600/reddit-broke.jpg Whether they truly rep

Re: locating strings approximately

2006-06-29 Thread John Machin
On 29/06/2006 10:52 AM, John Machin wrote: > On 29/06/2006 10:07 AM, BBands wrote: >> On 6/28/06, John Machin <[EMAIL PROTECTED]> wrote: >>> On 29/06/2006 9:28 AM, BBands wrote: >>> > I'd like to see if a string exists, even approximately, in another. >>> For >>> > example if "black" exists in "bl

Re: Bug reporting impossible

2006-06-29 Thread Grant Edwards
On 2006-06-29, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > 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),

Re: style question

2006-06-29 Thread Scott David Daniels
Jorgen Grahn wrote: > On Mon, 26 Jun 2006 11:47:21 +0200, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > ... >> assuming fixed-pitch fonts isn't very Pythonic, though; to get reliable >> indentation >> no matter what font you're using, you can write [...] > > Since when? I've always coded, in all la

Re: zipfile module doesn't allow append

2006-06-29 Thread Roger Miller
Ritesh Raj Sarraf wrote: > The line > filename = zipfile.ZipFile(zip_file_name, "a") > throws an exception if the given filename is not present already. > Shouldn't it create a file (in case one is not there) since it is > "append" mode ?? Perhaps it would be nicer that way, but it is working as

Re: Passing a Cookie with httplib

2006-06-29 Thread John J. Lee
Grant Edwards <[EMAIL PROTECTED]> writes: > 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.net/ClientCookie/ Note that

Re: Leo 4.4.1 beta 3 released

2006-06-29 Thread aum
On Thu, 29 Jun 2006 11:39:08 -0500, Edward K. Ream wrote: > 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. (snip) The aut

Re: Is it safe to shre a reg exp object among threads?

2006-06-29 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > Let's say I construct a regular expression object r by: > > r = re.compile("some pattern") > > Is it safe to let multiple threads to use r concurrently (use r.search > on different strings, etc.)? yes. -- http://mail.python.org/mailman/listinfo/python-list

Re: style question

2006-06-29 Thread Fredrik Lundh
Jorgen Grahn wrote: >> assuming fixed-pitch fonts isn't very Pythonic, though; to get reliable >> indentation >> no matter what font you're using, you can write [...] > > Since when? I've always coded, in all languages I've ever used[1], under the > assumption that the reader will view it with

Re: What is Expressiveness in a Computer Language [correction]

2006-06-29 Thread rossberg
Joe Marshall wrote: > Andreas Rossberg wrote: > > > > Which is why this actually is a very bad example to chose for dynamic > > typing advocacy... ;-) > > Actually, this seems a *good* example. The problem seems to be that > you end up throwing the baby out with the bathwater: your static type >

Re: pyGoogle - restrict by country doesn't seem to work

2006-06-29 Thread dananrg
This worked for me: data = google.doGoogleSearch(searchTerm, restrict = 'countryUS') How does restrict results by country at Google.com? -- http://mail.python.org/mailman/listinfo/python-list

Is it safe to shre a reg exp object among threads?

2006-06-29 Thread overly . crazy . steve
Let's say I construct a regular expression object r by: r = re.compile("some pattern") Is it safe to let multiple threads to use r concurrently (use r.search on different strings, etc.)? Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem with sets and Unicode strings

2006-06-29 Thread Fredrik Lundh
Dennis Benzinger wrote: >>> shadows the error of not setting sys.defaultencoding()? >> >> You can't set the default encoding. If you could, then scripts that run >> on your machine wouldn't run on mine. >> [...] > > As Serge Orlov wrote in one of his posts you _can_ set the default > encoding

pyGoogle - restrict by country doesn't seem to work

2006-06-29 Thread dananrg
If I want to restrict search results by country, what precisely do I need to include in searchTerm variable below? I've tried: searchTerm = 'restrict:countryUS blah blah' searchTerm = ' countryUS blah blah' Neither work. What am I doing wrong? import google data = google.doGoogleSearch(searchTe

Re: sum fonction in gadfly

2006-06-29 Thread aaronwmail-usenet
Robert Hicks wrote: > I haven't been keeping up. Is Gadfly still in development? I always find this question a little irritating -- gadfly is perfect the way it is :). If it ain't broke don't fix it. At least until the python guys make another non-backwards-compatible change that makes a patch

Re: style question

2006-06-29 Thread Jorgen Grahn
On Mon, 26 Jun 2006 11:47:21 +0200, Fredrik Lundh <[EMAIL PROTECTED]> wrote: ... > assuming fixed-pitch fonts isn't very Pythonic, though; to get reliable > indentation > no matter what font you're using, you can write [...] Since when? I've always coded, in all languages I've ever used[1], unde

Re: Interprocess communication on multi-user machine

2006-06-29 Thread Martin v. Löwis
Michael Butscher wrote: > 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 communication of programs of another user.

Re: Bug reporting impossible

2006-06-29 Thread olsongt
> > I usually refrain from posting if I don't have anything to add to the > discussion, but that struck me as perverse and I was curious. > I certainly have no objection to having that bug fixed. : ) > If you find that sort of perversity strangely exciting, I would like to refer you to pages 67-

Re: Running DocTest on Strings

2006-06-29 Thread André
Paddy wrote: > notanotheridiot wrote: > > 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 doctes

Re: handling unicode data

2006-06-29 Thread Martin v. Löwis
Filipe wrote: >> Also, it appears that DB-Library (the API used by pymssql) always >> returns CP_ACP characters (unless ANSI-to-OEM conversion is enabled); >> so the "right" encoding to use is "mbcs". > > do you mean using something like the following line? > term = unicode(row[1], "mbcs") Correc

Re: Problem with sets and Unicode strings

2006-06-29 Thread Jean-Paul Calderone
On Thu, 29 Jun 2006 21:19:30 +0200, Dennis Benzinger <[EMAIL PROTECTED]> wrote: >Robert Kern wrote: >> Dennis Benzinger wrote: >>> Ok, I understand. >>> But isn't it a (minor) problem that using a set like this: >>> >>> # -*- coding: UTF-8 -*- >>> >>> FIELDS_SET = set(("Fächer", )) >>> >>> print u"

Re: Python in a nutshell - new edition ?

2006-06-29 Thread John Salerno
Alex Martelli wrote: > End of July is our aggressive but still-achievable target: everything > was scheduled from the start to hit OSCON '06 (and the release of Python > 2.5 -- whether 2.5 final will be out at OSCON is still uncertain, > though). I guess we can be patient a little longer. :) I ha

Re: Problem with sets and Unicode strings

2006-06-29 Thread Robert Kern
Dennis Benzinger wrote: > Robert Kern wrote: >> Dennis Benzinger wrote: >>> Ok, I understand. >>> But isn't it a (minor) problem that using a set like this: >>> >>> # -*- coding: UTF-8 -*- >>> >>> FIELDS_SET = set(("Fächer", )) >>> >>> print u"Fächer" in FIELDS_SET >>> print u"Fächer" == "Fächer" >

small inaccuracy in the logging module documentation (Python Library Reference)

2006-06-29 Thread Petr Jakeš
Hi, I have found some inaccuracy in the Python Library Reference 6.29.5.4 TimedRotatingFileHandler (http://docs.python.org/lib/node349.html) 1) it is not really obvious from the documentation the "when" value has to be in the format "w0", "w1" ... "w6" if "Type of interval" is defined as a "week

Re: struct.unpack on 64-bit platforms

2006-06-29 Thread Jorgen Grahn
On 22 Jun 2006 09:30:26 -0700, Nadav Samet <[EMAIL PROTECTED]> wrote: ... > But apparently, on 64-bit platforms it tries to read 64-bit unsigned > integer (since > that's what the C Type unsigned long means on 64-bit platforms). On /some/ 64-bit platforms. Others let unsigned long be 32-bit and in

Re: Running DocTest on Strings

2006-06-29 Thread Paddy
notanotheridiot wrote: > 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 th

Re: Problem with sets and Unicode strings

2006-06-29 Thread Dennis Benzinger
Robert Kern wrote: > Dennis Benzinger wrote: >> Ok, I understand. >> But isn't it a (minor) problem that using a set like this: >> >> # -*- coding: UTF-8 -*- >> >> FIELDS_SET = set(("Fächer", )) >> >> print u"Fächer" in FIELDS_SET >> print u"Fächer" == "Fächer" >> >> shadows the error of not settin

Re: Database access through python using GUI(Tkinter)

2006-06-29 Thread Russell E. Owen
In article <[EMAIL PROTECTED]>, "arvind" <[EMAIL PROTECTED]> wrote: > 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? What do you mean by this? If

Re: Problem with sets and Unicode strings

2006-06-29 Thread Robert Kern
Dennis Benzinger wrote: > Ok, I understand. > But isn't it a (minor) problem that using a set like this: > > # -*- coding: UTF-8 -*- > > FIELDS_SET = set(("Fächer", )) > > print u"Fächer" in FIELDS_SET > print u"Fächer" == "Fächer" > > shadows the error of not setting sys.defaultencoding()? Yo

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

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: 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

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: 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

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

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

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" >>>

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: 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: 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: 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: 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: 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: 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: [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: 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: 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: 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: 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: 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 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: 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/

list comprehension

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

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

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

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 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 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: 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

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: 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

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

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: 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? >> >> >>

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 > >

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 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

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: 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 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 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 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

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: 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

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 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

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: 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

  1   2   >