Re: converting html escape sequences to unicode characters

2004-12-10 Thread Craig Ringer
On Fri, 2004-12-10 at 08:36, harrelson wrote: > I have a list of about 2500 html escape sequences (decimal) that I need > to convert to utf-8. Stuff like: I'm pretty sure this somewhat horrifying code does it, but is probably an example of what not to do: >>> escapeseq = '비' >>> uescape = ("\\u%

Re: converting html escape sequences to unicode characters

2004-12-10 Thread Craig Ringer
On Fri, 2004-12-10 at 16:09, Craig Ringer wrote: > On Fri, 2004-12-10 at 08:36, harrelson wrote: > > I have a list of about 2500 html escape sequences (decimal) that I need > > to convert to utf-8. Stuff like: > > I'm pretty sure this somewhat horrifying code does it, but is probably > an example

Re: threading problem

2004-12-10 Thread Egor Bolonev
On Fri, 10 Dec 2004 00:12:16 GMT, Steven Bethard <[EMAIL PROTECTED]> wrote: I think if you change the call to look like: threading.Thread(target=run, args=(os.path.join('c:\\', path),)).start() oh i see now. thanks s='sdgdfgdfg' s == (s) True s == (s,) False -- http://mail.python.org/mailman/li

Re: exec'ing functions

2004-12-10 Thread Peter Otten
Mel Wilson wrote: > The thing is, that once you drop local-namespace > optimization, the entire function gets slowed down, possibly > by 40%: It's not that bad as most of the extra time is spend on compiling the string. def fib5(n): a, b, i = 0, 1, n while i > 0: a, b = b, a+b

Re: VC++ 6.0 and 2.4

2004-12-10 Thread "Martin v. Löwis"
Jive wrote: Theoretically, if I messed around with the 2.4 project until I got it to build under MS VC++ 6.0, would the python.exe play correctly with version 2.4 .pyd extensions? My initial answer was no, as 2.4 .pyd extensions are build with VC 7.1, and that uses a different CRT. However, as Davi

Re: Python 2.3.5 ?

2004-12-10 Thread Fuzzyman
Hello Peter, Sorry to confuse you. It was actually a reply to Stefans dig about top posting. Regards, Fuzzy -- http://mail.python.org/mailman/listinfo/python-list

Re: building python extensions with .net sdk compiler?

2004-12-10 Thread Zuurcool
Anthony Baxter wrote: I'm trying to build a binary of fastaudio (the wrapper for the PortAudio library, from http://www.freenet.org.nz/python/pyPortAudio/) for Python 2.3. There's a lot of FAQs and the like out there that give some simple directions, involving fetching the .net sdk from MSDN and di

Re: samba/windows shares (with python?)

2004-12-10 Thread Eino Mäkitalo
I.V. Aprameya Rao wrote: hi does anybody know how to access samba/windows shares on a network? is there any module that does this? i am running linux and i thought of using the mount command to mount that remote share and then access it, but i was wondering whether that is the right way? Apram

Re: samba/windows shares

2004-12-10 Thread Martin Franklin
On Thu, 9 Dec 2004 20:03:55 +0530 (IST), I.V. Aprameya Rao <[EMAIL PROTECTED]> wrote: hi does anybody know how to access samba/windows shares on a network? is there any module that does this? i am running linux and i thought of using the mount command to mount that remote share and then access i

Re: PIL for Windows for Python 2.4

2004-12-10 Thread Robin Becker
Fuzzyman wrote: So you've built PIL for windows, Python 2.4 ? Any chance of sharing it ? What compiler have you configured distutils to use ? Regards, Fuzzyman I have compiled 1.1.4's _imaging & _imagingft for 2.4 and have placed them at http://www.reportlab.org/ftp/win32-dlls/2.4 Don't have a dece

Re: Wrapper objects

2004-12-10 Thread Nick Coghlan
Simon Brunning wrote: On 9 Dec 2004 06:11:41 -0800, Egil M?ller <[EMAIL PROTECTED]> wrote: Is there any way to create transparent wrapper objects in Python? This work - ? Only for old-style classes, though. If you inherit from object o

Building Windows debug distribution

2004-12-10 Thread Mark English
I have a Windows build of Python 2.4 core with all the extensions, both debug and release. The release installer is built by msi.py Is there a way to build a debug distribution other than rewriting msi.py ? --- The information co

Re: Rationale behind the deprecation of __getslice__?

2004-12-10 Thread Nick Coghlan
Steven Bethard wrote: Carl Banks wrote: Wouldn't it work to have __getslice__ call __getitem__? And, since that would be too much of a performance hit, have it check whether its type is list (or str or tuple), and only call __getitem__ if it is not (i.e., only for subclasses). I don't think that

Re: Rationale behind the deprecation of __getslice__?

2004-12-10 Thread Nick Coghlan
Steven Bethard wrote: Presumably the numarray code has to do quite a bit of type checking to perform all these slicings right (and I didn't even show you what happens when you use another array as an "index"). I'm not necessarily saying that all this type checking is a good thing, but because p

problem with datetime

2004-12-10 Thread bncarper
Relatively new to python. I can get the following to work from the command line: Python 2.3.4 (#2, Aug 18 2004, 21:49:15) [GCC 3.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import datetime >>> d = datetime.datetime.today() >>> d datetime.datetime(2004,

problem with datetime

2004-12-10 Thread Bob
Relatively new to python. I can get the following to work from the command line: Python 2.3.4 (#2, Aug 18 2004, 21:49:15) [GCC 3.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import datetime >>> d = datetime.datetime.today() >>> d datetime.datetime(2004,

Re: problem with datetime

2004-12-10 Thread Gerhard Haering
On Fri, Dec 10, 2004 at 04:19:56AM -0800, [EMAIL PROTECTED] wrote: > Relatively new to python. I can get the following to work from the > command line: > > Python 2.3.4 (#2, Aug 18 2004, 21:49:15) > [GCC 3.2] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>>

Re: Building Windows debug distribution

2004-12-10 Thread Thomas Heller
"Mark English" <[EMAIL PROTECTED]> writes: > I have a Windows build of Python 2.4 core with all the extensions, both > debug and release. The release installer is built by msi.py > Is there a way to build a debug distribution other than rewriting msi.py > ? But rewriting msi.py shouldn't be hard

Re: problem with datetime

2004-12-10 Thread Peter Otten
Bob wrote: > But when I try to run the following small program I get the following > results: > > import datetime > d = datetime.datetime.today() > print d > > Traceback (most recent call last): > File "datetime.py", line 1, in ? > import datetime You are importing your script, not the library

Re: Python 2.3.5 ?

2004-12-10 Thread Peter Hansen
Fuzzyman wrote: Hello Peter, Sorry to confuse you. It was actually a reply to Stefans dig about top posting. Hmm... I don't even see any named Stefan posting in this thread. I hope my newsreader isn't dropping messages... :-( Anyway, not important, never mind. -Peter -- http://mail.python.org/mail

Re: wxPython bug

2004-12-10 Thread Sion Arrowsmith
Jive <[EMAIL PROTECTED]> wrote: >In wxPython 2.5, run the demo, samples/wxProject/wxProject.py > [ ... ] >TypeError: TreeCtrl_GetFirstChild() takes exactly 2 arguments (3 given) GetFirstChild() changed from taking 2 arguments in wxPython 2.4 to (the more sensible) 1 in wxPython 2.5. Clearly wxProj

Re: Python for Palm OS?

2004-12-10 Thread Gustavo Niemeyer
> Is there any news regarding Python on the Palm OS front? As an interesting side effect of the recently announced PalmOS on Linux, porting Python for that platform will become a lot easier, hopefully. If only I could find Tim's time-machine and bring a unit from the future. ;-) -- Gustavo Nieme

Re: collaborative editing

2004-12-10 Thread Robert Kern
Michele Simionato wrote: Suppose I want to write a book with many authors via the Web. The book has a hierarchical structure with chapter, sections, subsections, subsubsections, etc. At each moment it must be possible to print the current version of the book in PDF format. There must be automati

Re: Possible to insert variables into regular expressions?

2004-12-10 Thread Chris Lasher
Robert, Craig, thanks for your replies. I'll only be dealing with alphanumerics for this project, I think, but it's good to be aware of this possible problem for later projects. The re.escape(...) is a handy method to know about. Thanks very much. -- http://mail.python.org/mailman/listinfo/pytho

Re: How to set condition breakpoints?

2004-12-10 Thread Colin J. Williams
Christopher J. Bottaro wrote: I have a script with a class in it: class Class: def f(x, y): # do something I start up the debugger like this: python /usr/lib/python2.3/pdb.py myscript.py I want to set a conditional breakpoint: b Class.f, x == 1 and y == 2 but that doesn'

RE: results of division

2004-12-10 Thread Batista, Facundo
Title: RE: results of division [Paul McGuire] #- Errr?  How come round() is able to understand 1.775 #- correctly, whereas #- string interp is not?  I'm guessing that round() adds some #- small epsilon to #- the value to be rounded, or perhaps even does the brute #- force rounding I #- le

Re: collaborative editing

2004-12-10 Thread Jeremy Jones
Robert Kern wrote: Michele Simionato wrote: Suppose I want to write a book with many authors via the Web. The book has a hierarchical structure with chapter, sections, subsections, subsubsections, etc. At each moment it must be possible to print the current version of the book in PDF format. The

Re: Find Items & Indices In A List...

2004-12-10 Thread Joachim Bauch
Hi Andrea, [EMAIL PROTECTED] wrote: I was wondering if there is a faster/nicer method (than a for loop) that will allow me to find the elements (AND their indices) in a list that verify a certain condition. For example, assuming that I have a list like: mylist = [0, 1, 1, 1, 1, 5, 6, 7, 8, 1,

Re: Parse XML using Python

2004-12-10 Thread Uche Ogbuji
This is a neat solution. You can parse any well-formed general entitity (e.g. Anil's document with multiple root nodes) in 4Suite 1.0a4: from Ft.Xml.Domlette import EntityReader s = """ eggs more eggs """ docfrag = EntityReader.parseString(s, 'http://foo/test/spam.xml') docfrag is now ready for

Re: Find Items & Indices In A List...

2004-12-10 Thread kaerbuhez
<[EMAIL PROTECTED]> a écrit dans le message de news: [EMAIL PROTECTED] > For example, assuming that I have a list like: > > mylist = [0, 1, 1, 1, 1, 5, 6, 7, 8, 1, 10] > > I would like to find the indices of the elements in the list that are > equal > to 1 (in this case, the 1,2,3,4,9 elements ar

MDaemon Warning - virus found: Returned mail: see transcript for details

2004-12-10 Thread clientes
*** WARNING ** Este mensaje ha sido analizado por MDaemon AntiVirus y ha encontrado un fichero anexo(s) infectado(s). Por favor revise el reporte de abajo. AttachmentVirus name Action taken ---

Re: Find Items & Indices In A List...

2004-12-10 Thread Ola Natvig
[EMAIL PROTECTED] wrote: Hello NG, I was wondering if there is a faster/nicer method (than a for loop) that will allow me to find the elements (AND their indices) in a list that verify a certain condition. For example, assuming that I have a list like: mylist = [0, 1, 1, 1, 1, 5, 6, 7, 8, 1,

Re: Find Items & Indices In A List...

2004-12-10 Thread Bengt Richter
On Fri, 10 Dec 2004 16:01:26 +0100, [EMAIL PROTECTED] wrote: >Hello NG, > > I was wondering if there is a faster/nicer method (than a for loop) >that will allow me to find the elements (AND their indices) in a list that >verify a certain condition. For example, assuming that I have a list lik

Re: collaborative editing

2004-12-10 Thread Nick Craig-Wood
Robert Kern <[EMAIL PROTECTED]> wrote: > Personally, I loathe writing at any length inside a Web browser and > prefer to use a real editor at all times. Me too! You need mozex... http://mozex.mozdev.org/ Not sure about Mac support though /OT -- Nick Craig-Wood <[EMAIL PROTECTED]> -- http

Re: Python 2.3.5 ?

2004-12-10 Thread Brad Tilley
Tim Peters wrote: Not everyone is willing and able to switch to a new 2.j release as soon as it appears. The reason I jumped on 2.4 right away was the msi installer for Windows systems. We can do unattended/automated installs... it's really great... a killer feature for Windows users who need to

Re: Help beautify ugly heuristic code

2004-12-10 Thread Stuart D. Gathman
On Thu, 09 Dec 2004 00:01:36 -0800, Lonnie Princehouse wrote: > I believe you can still do this with only compiling a regex once and > then performing a few substitutions on the hostname. Cool idea. Convert ip matches to fixed patterns before matching a fixed regex. The leftovers like shaw cable

style query: function attributes for return codes?

2004-12-10 Thread george young
[python 2.3.3, x86 linux] I recently found myself writing something like: def get_connection(): if tcp_conn(): if server_allows_conn(): return 'good_conn' else: return 'bad_auth' else: return 'no_server' cn = get_connection() if cn == 'good

MySQLdb blob and binary data

2004-12-10 Thread Rune Hansen
I'm storing gzipped data in a MySQL blob field. I can fetch the blob and "wb" write the data to a file. It becomes a file containg gz data. I can't take the same data and do anything sensible with it in python - like say zlib.decompress(data). How can I convert the binary data from the blob fie

Tibia 0.1 DOM-based website editor

2004-12-10 Thread Robert Brewer
Cross-posted here to encourage comments/discussion. I know there's a big feature or two I'm missing out on ;) Suggestions welcome. Tibia is an in-browser editor for web pages. It allows you to quickly and easily modify the content of your web pages. It allows you to directly view, edit, and save f

Re: Find Items & Indices In A List...

2004-12-10 Thread Steven Bethard
[EMAIL PROTECTED] wrote: Hello NG, I was wondering if there is a faster/nicer method (than a for loop) that will allow me to find the elements (AND their indices) in a list that verify a certain condition. For example, assuming that I have a list like: mylist = [0, 1, 1, 1, 1, 5, 6, 7, 8, 1,

thread/queue bug

2004-12-10 Thread phil
I have a very strange bug. A thread in a .pyc stops dead. This program has many threads and queues and has worked great for months. One thread listens for UDP messages from other programs, and puts the messages in listenq. Procmsgs gets from listenq and for a certain kind of message creates anoth

Re: style query: function attributes for return codes?

2004-12-10 Thread Steven Bethard
george young wrote: This is obviously just evil, since a misspelling in the string return is treacherous. I'm considering function attributes: def get_connection(): if tcp_conn(): if server_allows_conn(): return get_connection.GOOD else: return get_conne

Re: style query: function attributes for return codes?

2004-12-10 Thread Steven Bethard
george young wrote: [python 2.3.3, x86 linux] I recently found myself writing something like: def get_connection(): if tcp_conn(): if server_allows_conn(): return 'good_conn' else: return 'bad_auth' else: return 'no_server' cn = get_connection

Re: Python + Newspipe

2004-12-10 Thread kael
Dave Kuhlman wrote: 1. Read about ConfigParser here: http://docs.python.org/lib/module-ConfigParser.html Thank you very for this link. 2. Read the traceback from the bottom up: (1) The exception is raised in ConfigParser.py on line 240 in function/method options. (2) This was called from

Re: How to set condition breakpoints?

2004-12-10 Thread Christopher J. Bottaro
Colin J. Williams wrote: > Christopher J. Bottaro wrote: >> I have a script with a class in it: >> class Class: >> def f(x, y): >> # do something >> >> I start up the debugger like this: >> python /usr/lib/python2.3/pdb.py myscript.py >> >> I want to set a conditional bre

Re: Wrapper objects

2004-12-10 Thread Nick Coghlan
Kent Johnson wrote: Nick Coghlan wrote: Simon Brunning wrote: This work - ? Only for old-style classes, though. If you inherit from object or another builtin, that recipe fails. Could you explain, please? I thought __getattr__ worke

Re: style query: function attributes for return codes?

2004-12-10 Thread Robert Kern
Steven Bethard wrote: Sorry, I also meant to add that the other obvious way of dealing with this kind of thing is to make the results keyword parameters: def get_connection(GOOD=1, BAD_AUTH=2, NO_SERVER=3): if tcp_conn(): if server_allows_conn(): return GOOD else:

Re: Tibia 0.1 DOM-based website editor

2004-12-10 Thread Gabriel Cooper
Robert Brewer wrote: [...] Tibia is an in-browser editor for web pages. It allows you to quickly and easily modify the content of your web pages. [...] I couldn't get it to work using Firefox on Red Hat Fedora Core 2. From what I garnered from the help you're supposed to be able to double-click

Re: Wrapper objects

2004-12-10 Thread redhog
Bengt Richter wrote: > On 9 Dec 2004 06:11:41 -0800, [EMAIL PROTECTED] (Egil M?ller) wrote: > > >Is there any way to create transparent wrapper objects in Python? > > > >I thought implementing __getattribute__ on either the wrapper class or > >its metaclass would do the trick, but it does not work

Re: Tibia 0.1 DOM-based website editor

2004-12-10 Thread Dirkjan Ochtman
Stick the single tibia.tba file on your webserver (assuming Python is installed) and you're off and editing files in the same folder or below. Admins can edit any element; non-admins can edit any element for which admins give them permission. - Stuck in /var/www/localhost/cgi-bin/ - Changed permiss

Re: MySQLdb blob and binary data

2004-12-10 Thread Denis S. Otkidach
On Fri, 10 Dec 2004 16:58:56 +0100 Rune Hansen <[EMAIL PROTECTED]> wrote: > I'm storing gzipped data in a MySQL blob field. I can fetch the blob and > "wb" write the data to a file. It becomes a file containg gz data. > > I can't take the same data and do anything sensible with it in python - >

Re: style query: function attributes for return codes?

2004-12-10 Thread holger krekel
Hi George, [george young Fri, Dec 10, 2004 at 10:45:47AM -0500] > [python 2.3.3, x86 linux] > I recently found myself writing something like: > > def get_connection(): > if tcp_conn(): > if server_allows_conn(): > return 'good_conn' > else: > return 'b

Re: Blank ASP pages

2004-12-10 Thread ElCapitan
I have same exact problem and get the sourcecode right back (asp source code) when i right click page and view source code. Not sure what server they are using this is not in my company. Thanks in advance Gordon McMillan wrote: > Jason S. Nadler wrote: > > > My server is spitting out blank .asp pa

RE: Tibia 0.1 DOM-based website editor

2004-12-10 Thread Robert Brewer
Gabriel Cooper wrote: > Robert Brewer wrote: > > >[...] > >Tibia is an in-browser editor for web pages. It allows you to quickly > >and easily modify the content of your web pages. > >[...] > > > I couldn't get it to work using Firefox on Red Hat Fedora > Core 2. From > what I garnered from the

Compiling Python 2.4 extensions with free VC++ Toolkit

2004-12-10 Thread Burns
Hi all, I've been wondering if there's anything on the drawing board about patching distutils/msvccompiler.py so that it can compile Python extensions using the free Visual C++ toolkit instead of the entire Visual C++ development environment. I know it's possible, because I was able to compile

RE: tibia error in apache2

2004-12-10 Thread Robert Brewer
>From tibia log file: 2004-12-10 16:05:56,322 ERROR None: GET frameset Traceback (most recent call last): File "C:\PYTHON23\lib\site-packages\tibia.py", line 997, in __init__ self.username = self.username.split("\\")[-1] AttributeError: 'NoneType' object has no attribute 'split' 2004-12-10 16

Re: Python + Newspipe

2004-12-10 Thread Peter Hansen
kael wrote: Dave Kuhlman wrote: 3. It's looking for a section named "NewsPipe" in your options/config file. Check your config file. Is that section name misspelled? Is the section missing? Does the NewsPipe documentation tell you where the config file should be and what it's name is

Re: Compiling Python 2.4 extensions with free VC++ Toolkit

2004-12-10 Thread Peter Hansen
Jody Burns > wrote: I've been wondering if there's anything on the drawing board about patching distutils/msvccompiler.py so that it can compile Python extensions using the free Visual C++ toolkit instead of the entire Visual C++ development environment. I know it's possible, because I was able

Re: Python + Newspipe

2004-12-10 Thread kael
Peter Hansen wrote: kael wrote Dave Kuhlman wrote: 3. It's looking for a section named "NewsPipe" in your options/config file. Check your config file. Is that section name misspelled? Is the section missing? Does the NewsPipe documentation tell you where the config file should be and wh

Re: style query: function attributes for return codes?

2004-12-10 Thread Steven Bethard
Robert Kern wrote: Steven Bethard wrote: Sorry, I also meant to add that the other obvious way of dealing with this kind of thing is to make the results keyword parameters: def get_connection(GOOD=1, BAD_AUTH=2, NO_SERVER=3): if tcp_conn(): if server_allows_conn(): return

[Newby] question about modules

2004-12-10 Thread Jon
Hi, The following four lines of code: import sys, os, re sentence = raw_input("Enter a sentence: ") capwords (sentence) print sentence gives me the following error: NameError: name 'capwords' is not defined As far as I can tell from the online docs, "capwords" should be defined in the built-i

Re: Possible to insert variables into regular expressions?

2004-12-10 Thread Terry Hancock
On Thursday 09 December 2004 03:51 pm, Chris Lasher wrote: > Thanks for the reply, Steve! That ought to work quite nicely! For some > reason, I hadn't thought of using %-formatting. I probably should have, > but I'm still learning Python and re-learning programming in general. > This helps a lot, s

Re: thread/queue bug

2004-12-10 Thread Peter Hansen
phil wrote: I have a very strange bug. A thread in a .pyc stops dead. This program has many threads and queues and has worked great for months. One thread listens for UDP messages from other programs, and puts the messages in listenq. Procmsgs gets from listenq and for a certain kind of message cr

RE: Blank ASP pages

2004-12-10 Thread Robert Brewer
ElCapitan wrote: > Gordon McMillan wrote: > > Jason S. Nadler wrote: > > > > > My server is spitting out blank .asp pages which use python. If > Python is > > > not declared, the asp pages work fine. > > > I just yesterday stepped up to Python 1.52 and the new win32all > > > After the install, the

Re: collaborative editing

2004-12-10 Thread A.M. Kuchling
On 10 Dec 2004 05:20:42 -0800, Michele Simionato <[EMAIL PROTECTED]> wrote: > welcome. Does something like that already exists? Alternatively, I would need > some hierarchical Wiki with the ability of printing its contents in an > structured way. At least one book, Eric van der Vlist's R

Yahoo! Auto Response

2004-12-10 Thread plegend2001
THIS IS AN AUTO-RESPONSE SYSTEM FOR PLEGEND2001 We are experiencing an unusual high-volume of e-mail. For questions, please click the link for FAQ page: http://members.ebay.com/ws2/eBayISAPI.dll?ViewUserPage&userid=plegend2001 If you have receive a tracking number, please allow FedEx,UPS,or DHL

Re: Wrapper objects

2004-12-10 Thread Bengt Richter
On 10 Dec 2004 09:33:51 -0800, [EMAIL PROTECTED] wrote: >Bengt Richter wrote: >> On 9 Dec 2004 06:11:41 -0800, [EMAIL PROTECTED] (Egil M?ller) wrote: >> >> >So my naive implementation of a wrapper class, >> > >> > >> >class wrapper(object): >> >def __init__(self, value, otherdata): >> >

Re: 2D array

2004-12-10 Thread Adam DePrince
On Wed, 2004-12-08 at 16:22, Steven Bethard wrote: > Adam DePrince wrote: > > The use of None as the default parameter was on purpose; the lack of > > "magic" in python is often cited in religious wars between python and > > perl aficionados. Use of get(something, None) was on purpose, the level

Re: Fun with Outlook and MAPI

2004-12-10 Thread Will McGugan
Chris wrote: I'm trying to send an e-mail through outlook. So far I've gotten it to work with the mail script at http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/149461 My only problem is that when I call Resolve() and Send(), I get confirmation dialogs. I will be sending out quite a

Re: Find Items & Indices In A List...

2004-12-10 Thread Bengt Richter
On Fri, 10 Dec 2004 16:27:29 GMT, Steven Bethard <[EMAIL PROTECTED]> wrote: >[EMAIL PROTECTED] wrote: >> Hello NG, >> >> I was wondering if there is a faster/nicer method (than a for loop) >> that will allow me to find the elements (AND their indices) in a list that >> verify a certain cond

Re: Possible to insert variables into regular expressions?

2004-12-10 Thread Steven Bethard
Terry Hancock wrote: And hey, you could probably use a regex to modify a regex, if you were really twisted. ;-) Sorry. I really shouldn't have said that. Somebody's going to do it now. :-P Sure, but only 'cause you asked so nicely. =) >>> import re >>> def internationalize(expr, ...

Re: Fun with Outlook and MAPI

2004-12-10 Thread David Fraser
Will McGugan wrote: Chris wrote: I'm trying to send an e-mail through outlook. So far I've gotten it to work with the mail script at http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/149461 My only problem is that when I call Resolve() and Send(), I get confirmation dialogs. I will be

Re: [Newby] question about modules

2004-12-10 Thread James Stroud
Is it in "regex" or "re"? If in "re" then: re.capwords(sentence) If in "regex", then: regex.capwords(sentence) You can also do from re import * then you will not have to prefix. But careful not to clutter your namespace. On Friday 10 December 2004 10:29 am, Jon wrote: > Hi, > > The followin

Re: question about modules

2004-12-10 Thread Jon
Hi Jeff, That makes sense -- thanks. However now when I use "re.capwords (sentence)" I get a different error message: AttributeError: 'module' object has no attribute 'capwords' Each of the other two suggested implimentations produce a similar error message. Is there something even more basic

Re: UrlLib2 Proxy and Https

2004-12-10 Thread Tom
I would like to access an HTTPS site via a proxy The following code is working for HTTP://www.hotmail.com but not for HTTPS I have try with other sites without success l_proxy_info = { 'user' : mylogin, 'pass' : mypassword, 'host' : myproxy, 'port' : 8080 } I have no idea if

thread/queue bug

2004-12-10 Thread phil
> 4. The fact that you have a .pyc file instead of a .py > file very likely has *nothing* to do with any threading > problem you are facing, so I suggest you get past that mental > block and look elsewhere. Well, I tried to make it clear that the ONLY difference between working and not working was

Re: Fun with Outlook and MAPI

2004-12-10 Thread Will McGugan
David Fraser wrote: Alas, I dont think that there is much you can do to prevent the confirmation dialogs with Outlook's MAPI dll. MS added them in a service pack as an anti-virus measure, so no work-around. Not all clients show these anoying dialogs though. Thunderbird definately doesn't. The

Re: Fun with Outlook and MAPI

2004-12-10 Thread Chris
Will McGugan wrote: I'm trying to send an e-mail through outlook. So far I've gotten it to work with the mail script at http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/149461 My only problem is that when I call Resolve() and Send(), I get confirmation dialogs. I will be sending out q

capwords (WAS: [Newby] question about modules)

2004-12-10 Thread Steven Bethard
Jon wrote: As far as I can tell from the online docs, "capwords" should be defined in the built-in "regex" module. Why is it telling me that capwords is not defined? Hmm... are you looking instead for "capwords" from the string module? >>> s = """\ ... Well, he's... ... he's, ah... ... probably pi

Clarification of two concepts (or maybe one?)

2004-12-10 Thread Eddie Parker
Sorry, I’ve tried to search the web on this, but I’m still a little fuzzy. I was hoping a quick e-mail might clear this up. What I’m looking for, is a way to turn a python ‘application’, into a ‘stand-alone’ application. i.e., you don’t need the Python interpreter, libraries, etc, install

sources for DOS-16bit

2004-12-10 Thread McBooCzech
Hi all, before I decided to bother you by e-mail, I spent days (not kidding) searching on the Internet. I am looking for Python binaries for DOS-16bit Not for Win-16bit or DOS-32 which are the only DOS availabele sources on Python official site and on the other sites as well!!! I will prefere

Re: Zip with a list comprehension

2004-12-10 Thread Steven Bethard
Matt Gerrans wrote: This is probably so easy that I'll be embarrassed by the answer. While enhancing and refactoring some old code, I was just changing some map()s to list comprehensions, but I couldn't see any easy way to change a zip() to a list comprehension.Should I just let those slee

Zip with a list comprehension

2004-12-10 Thread Matt Gerrans
This is probably so easy that I'll be embarrassed by the answer. While enhancing and refactoring some old code, I was just changing some map()s to list comprehensions, but I couldn't see any easy way to change a zip() to a list comprehension.Should I just let those sleeping dogs lie? (li

Re: Tibia 0.1 DOM-based website editor

2004-12-10 Thread Gabriel Cooper
Robert Brewer wrote: I assume you're using the demo? My copy of Firefox has an error browser under Tools->Javascript Console. Does the double-click report any error there? Make sure you clear the list before trying, since errors from all other webpages gt dumped in the same list. I was using th

Re: thread/queue bug

2004-12-10 Thread Peter Hansen
phil wrote: You know, I get this all the time on language support groups. All of my Linux support groups, if they don't understand, say why and ask for elaboration. Wow, amazing! Imagine that... asking for elaboration when someone posts unclear confusing questions and extraneous information. Th

Re: Clarification of two concepts (or maybe one?)

2004-12-10 Thread Fredrik Lundh
Eddie Parker wrote: > What I’m looking for, is a way to turn a python ‘application’, into a > ‘stand-alone’ application. i.e., you don’t need the Python interpreter, > libraries, etc, installed on your hard drive. (I’m OK with .py files > existing – I just don’t want to have to bother the user to

Re: Wrapper objects

2004-12-10 Thread redhog
Ah, thanks. I didn't think of the possibility of creating a list of methods that needed wrapping, and wrapping them uppon creation of the wrapper object. Mainly I think, becaus it seems to me as such an uggly workaround for a misdesign in Python. Also, if the wrapped object gets some extra methods/

thread/queue bug

2004-12-10 Thread phil
>Wow, amazing! Imagine that... asking for elaboration when >someone posts unclear confusing questions and extraneous >information. The noive! I would be happy to elaborate. No one asked to me to elaborate. I was simply told I didn't give enough information. I wasn't given an idea of what addition

Re: Wrapper objects

2004-12-10 Thread redhog
As to what I want to use this for, I today have a huge program in which several objects are wrapped up with comments (made up by some DOMish structre) which are displayed to the user at various times. For example, a list of users may be represented as as comment "List of users" and a python list of

Re: sources for DOS-16bit

2004-12-10 Thread Peter Hansen
McBooCzech wrote: I am looking for Python binaries for DOS-16bit Not for Win-16bit or DOS-32 which are the only DOS availabele sources on Python official site and on the other sites as well!!! I will prefere sources for Borland C 3.x. I was trying to use Python 1.0.1 (16python.exe file) for my

Re: collaborative editing

2004-12-10 Thread MMM
Michele Simionato wrote: > Suppose I want to write a book with many authors via the Web. The book has > a hierarchical structure with chapter, sections, subsections, subsubsections, > etc. At each moment it must be possible to print the current version of the > book in PDF format. There must be aut

Re: Distutils vs. Extension header files

2004-12-10 Thread David M. Cooke
Mike Meyer <[EMAIL PROTECTED]> writes: > I've got a package that includes an extension that has a number of > header files in the directory with the extension. They are specified > as "depends = [...]" in the Extension class. However, Distutils > doesn't seem to do anything with them. > > If I do

Re: UrlLib2 Proxy and Https

2004-12-10 Thread j_belbo
I have made some tests with Curl and this proxy setting is correct It's seems that there is a problem with HTTPS and urllib2 + proxy Bye, Jacobo "Tom" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > I would like to access an HTTPS site via a proxy > > The following code is working f

Re: collaborative editing

2004-12-10 Thread Doug Holton
Michele Simionato wrote: Suppose I want to write a book with many authors via the Web. The book has a hierarchical structure with chapter, sections, subsections, subsubsections, etc. At each moment it must be possible to print the current version of the book in PDF format. There must be automati

Re: Help beautify ugly heuristic code

2004-12-10 Thread JanC
Stuart D. Gathman schreef: > I have a function that recognizes PTR records for dynamic IPs. There > is no hard and fast rule for this - every ISP does it differently, and > may change their policy at any time, and use different conventions in > different places. Nevertheless, it is useful to app

request for book-recommendation

2004-12-10 Thread patrick c.d.
hi, does here anyone of ya geeks know a book teaching you how to handle gtk, web-dev with mysql-db-connection and scripting under gnu/linux with phyton? i'm german (hhaarr) but due to my efficiency-course in english (shool) i want to learn english by learning phyton ;-) thx.. -- http://mail.pyt

ANNOUNCE: PyPHP, Python programming using the PHP web framework

2004-12-10 Thread Antony Lesuisse
PyPHP the python php bridge === Download it at http://lesuisse.net/pyphp-0.1.tgz WARNING this is experimental ! Summary: PyPHP enables Python programming in the PHP web framework. PyPHP is not yet another Python Web framework, it is the PHP web framework made av

Re: Compiling Python 2.4 extensions with free VC++ Toolkit

2004-12-10 Thread Mike C. Fletcher
Jody Burns wrote (with Peter): See Mike C. Fletcher's post and http://www.vrplumber.com/programming/mstoolkit/ for a way to do it very easily (you have to be able to use the GNU patch tool, but that's not difficult at all). --Jody ... not been able to get into hacking on the core of Python beca

Re: How do I do this? (eval() on the left hand side)

2004-12-10 Thread Peter Hansen
Carl Banks wrote: It's a bit more honest to set module attributes using setattr than dict access, I would say. Granted. But I think it's also more honest to change a module's dict by using globals() than by using a setattr call. <0.500 wink> -Peter -- http://mail.python.org/mailman/listinfo/pytho

Re: How do I do this? (eval() on the left hand side)

2004-12-10 Thread Carl Banks
> From my point of view, they're basically identical, and > although I find Carl's approach slightly less explicit > and harder to read (mainly the uncommon __import__ call, > but it's not a big deal), I can't see why either of them > would be considered evil. Of course, when I said evil, I didn't

  1   2   >