plain text parsing to html (newbie problem)

2009-12-09 Thread João
I apologize for my newbiness but I'm banging my head making this work : ( What change must I made for the tag enforcement being reflected to the 'mail' file? Am I using the WritableObject class correctly? (I'm getting a blank 'mail' file after running the .py script) How can I see the output run in

Re: plain text parsing to html (newbie problem)

2009-12-10 Thread João
Thanks for the output. akean, I've installed ipython and I'm exploring it. Thanks. Terry, from what I've read stringIO allows us to store strings in a 'virtual' file. Can you please write just 2 lines exemplifying a write to and a read from an OS level file? MRAB, that 'mail' object should've bee

Re: plain text parsing to html (newbie problem)

2009-12-10 Thread João
Thanks for the output. akean, I've installed ipython and I'm exploring it. Thanks. Terry, from what I've read stringIO allows us to store strings in a 'virtual' file. Can you please write just 2 lines exemplifying a write to and a read from an OS level file? MRAB, that 'mail' object should've bee

Re: plain text parsing to html (newbie problem)

2009-12-11 Thread João
On Dec 10, 7:55 pm, Lie Ryan wrote: > > and, is there any reason why you're not using the email and > smtplib?http://docs.python.org/library/email-examples.html Mainly because I was unaware of them :( I just read about them and I found all the Subject, From, To classes, but what about Content-T

Re: plain text parsing to html (newbie problem)

2009-12-11 Thread João
On Dec 10, 7:55 pm, Lie Ryan wrote: > > and, is there any reason why you're not using the email and > smtplib?http://docs.python.org/library/email-examples.html Mainly because I was unaware of them :( I just read about them and I found all the Subject, From, To classes, but what about Content-T

Re: plain text parsing to html (newbie problem)

2009-12-11 Thread João
Lie Ryan wrote: > You can set MIME type and encoding from the MIME constructor > email.mime.Text.MIMEText("Bold Text", "html", "utf-8") > > are you importing "import mime" or "import email.mime" or "import > email.MIMEMultipart"? Hi Lie. I was importing as, 'from email.mime.text import MIMEText'

force URLencoding script

2010-01-11 Thread João
Hi. I'm trying to figure out how to force URLencoding in my Python 2.4.3 environment receiving data an input argument but I'm really at a loss here. What am I doing wrong? #!/usr/bin/env python import sys from urllib import urlencode, urlopen from urllib2 import Request import urlparse destinat

Re: force URLencoding script

2010-01-12 Thread João
Someone please? -- http://mail.python.org/mailman/listinfo/python-list

Re: force URLencoding script

2010-01-12 Thread João
On Jan 12, 8:05 pm, r0g wrote: > João wrote: > > Someone please? > > Haven't seen your original post yet mate, usenet can be flaky like that, > might have been a good idea to quote your original post! > > Roger. Thanks Roger. > João wrote: > > Someone pl

Re: force URLencoding script

2010-01-14 Thread João
On Jan 12, 10:07 pm, r0g wrote: > João wrote: > > On Jan 12, 8:05 pm, r0g wrote: > >> João wrote: > >>> Someone please? > >> Haven't seen your original post yet mate, usenet can be flaky like that, > >> might have been a good idea to quote

Re: force URLencoding script

2010-01-15 Thread João
On Jan 14, 5:58 pm, r0g wrote: > João wrote: > > On Jan 12, 10:07 pm, r0g wrote: > >> João wrote: > > > for the following data, > > authentication = "UID=somestring&" > > message = 'PROBLEM severity High: OperatorX Plat1(locationY) glo

Re: force URLencoding script

2010-01-15 Thread João
On Jan 15, 2:38 pm, r0g wrote: > João wrote: > > On Jan 14, 5:58 pm, r0g wrote: > >> João wrote: > >>> On Jan 12, 10:07 pm, r0g wrote: > >>>> João wrote: > >>> for the following data, > >>> authentication = "UID=some

Re: force URLencoding script

2010-01-15 Thread João
EDIT: About the proxy. That's why I'm using the '-P' in the POST call. /usr/bin/POST -P -- http://mail.python.org/mailman/listinfo/python-list

Re: force URLencoding script

2010-01-18 Thread João
On Jan 15, 4:46 pm, r0g wrote: > João wrote: > > On Jan 15, 2:38 pm, r0g wrote: > >> João wrote: > >>> On Jan 14, 5:58 pm, r0g wrote: > >>>> João wrote: > >>>>> On Jan 12, 10:07 pm, r0g wrote: > >>>>>>

Re: force URLencoding script

2010-01-18 Thread João
On Jan 15, 4:46 pm, r0g wrote: > João wrote: > > On Jan 15, 2:38 pm, r0g wrote: > >> João wrote: > >>> On Jan 14, 5:58 pm, r0g wrote: > >>>> João wrote: > >>>>> On Jan 12, 10:07 pm, r0g wrote: > >>>>>>

[newbie] - python list into a sql query

2010-03-01 Thread João
Hi. Can someone guide me into getting this to work? It's just really querying a DB of an Autodiscovery tool to have a bunch of updated dns files. (Thought I'm still building the first script steps) I was able to successfully query the DB against a single groupid, but am failing in passing a list o

Re: Python Web Programming - looking for examples of solid high-traffic sites

2007-05-21 Thread João Santos
/about/quotes/ lists many big names > and wonderful examples, be want more details. E.g. our understanding > is that Google uses python mostly for internal web-sites, and > performance is far from perfect their. YouTube is an interesting > example - anybody knows more details about that? > > Your suggestions and comments are highly welcome! > > Best Regards, > Victor. -- João Santos [EMAIL PROTECTED] www.thegoldenaura.com -- http://mail.python.org/mailman/listinfo/python-list

Webservices, SOAP and Python

2007-11-02 Thread João Rodrigues
Hello all, I'm trying to build a webserver client and I'm having quite the trouble. I ended up using ZSI (since it's the only one that I could actually install on my Linux system) but I wonder: is there any other software for this purpose? I read about SOAPpy and PyXML but since both are discontin

Checking processes running under Windows

2008-03-27 Thread João Rodrigues
Hello all! I'm trying to write a script that needs to check which processes are running under Windows (XP Pro, Home, whatever). The method I'm using is: >>> process_list = os.popen('TASKLIST').read() However, XP Home doesn't have the tasklist.exe tool so, this is kind of useless in that OS. Do yo

[no subject]

2009-02-11 Thread João Rabelo
-- http://mail.python.org/mailman/listinfo/python-list

Network game using mysql

2009-04-14 Thread João Abrantes
Good evening, I am making an online game that stores its data in a mysql database. The thing is that I can't allow the players to interact directly with the important tables of database (they could cheat if I give them access) so I only allow them to write on a table named commands and then a

mod_python + apache at windows

2008-05-30 Thread João Mello
Hi... Ane one can give me an example to install mod_python in apache at windows? Hug, Mello. -- http://mail.python.org/mailman/listinfo/python-list

Rationale for read-only property of co_code

2008-04-02 Thread João Neves
ange a function at runtime, he could do so at his own risk. If there is a higher reason behind the read-only property of co_code, I definitely fail to see it, and would like to know what it is. If not, why aren't we allowed to write into it? Thanks in advance, João Neves -- http://mail.python.org/mailman/listinfo/python-list

Re: wsdl (soap) without code generation

2008-04-02 Thread João Neves
On Apr 2, 3:06 pm, Thomas Guettler <[EMAIL PROTECTED]> wrote: > Hi, > > I looked for a solution to talk to a web service which > offers its signature with a wsdl file. > > I googled for 'wsdl python' and found ZSI. > > This project uses code generation. That's something > I don't like. > > The book

Re: Rationale for read-only property of co_code

2008-04-02 Thread João Neves
of this moment, I get a TypeError exception, because co_code is read-only. The thing I've been wondering is why _is_ it read-only? In what circumstances having write access to co_code would break the language or do some other nasty stuff? João Neves -- http://mail.python.org/mailman/listinfo/python-list

Re: Rationale for read-only property of co_code

2008-04-02 Thread João Neves
On Apr 2, 5:41 pm, "Dan Upton" <[EMAIL PROTECTED]> wrote: > > The thing I've been wondering is why _is_ it read-only? In what > > circumstances having write access to co_code would break the language > > or do some other nasty stuff? > >

Re: Rationale for read-only property of co_code

2008-04-02 Thread João Neves
On 2 Abr, 21:38, "Chris Mellon" <[EMAIL PROTECTED]> wrote: > On Wed, Apr 2, 2008 at 2:33 PM, João Neves <[EMAIL PROTECTED]> wrote: > > On Apr 2, 5:41 pm, "Dan Upton" <[EMAIL PROTECTED]> wrote: > > > > The thing I've been wondering

Re: Rationale for read-only property of co_code

2008-04-03 Thread João Neves
is. Now I get it, it makes perfect sense. Looks like I'll have to stick to the usual mechanisms! Thanks everyone! --- João Neves -- http://mail.python.org/mailman/listinfo/python-list

Orientation on MySql using python

2008-09-09 Thread João Abrantes
Hello everyone, I want to make a program in python that uses Mysql aswell.. I don't know anything about mysql can you tell me some good books/tutorials where I can read something about mysql using python? Thanks. _ Invite your mail

Re: No trees in the stdlib?

2009-06-25 Thread João Valverde
Aahz wrote: In article , Tom Reed wrote: Why no trees in the standard library, if not as a built in? I searched the archive but couldn't find a relevant discussion. Seems like a glaring omission considering the batteries included philosophy, particularly balanced binary search trees. No i

Re: No trees in the stdlib?

2009-06-25 Thread João Valverde
João Valverde wrote: Aahz wrote: In article , Tom Reed wrote: Why no trees in the standard library, if not as a built in? I searched the archive but couldn't find a relevant discussion. Seems like a glaring omission considering the batteries included philosophy, particularly bal

Re: No trees in the stdlib?

2009-06-25 Thread João Valverde
João Valverde wrote: Aahz wrote: In article , Tom Reed wrote: Why no trees in the standard library, if not as a built in? I searched the archive but couldn't find a relevant discussion. Seems like a glaring omission considering the batteries included philosophy, particularly bal

Re: No trees in the stdlib?

2009-06-26 Thread João Valverde
João Valverde wrote: Aahz wrote: In article , Tom Reed wrote: Why no trees in the standard library, if not as a built in? I searched the archive but couldn't find a relevant discussion. Seems like a glaring omission considering the batteries included philosophy, particularly bal

Re: No trees in the stdlib?

2009-06-26 Thread João Valverde
Jason Scheirer wrote: On Jun 25, 10:32 pm, a...@pythoncraft.com (Aahz) wrote: In article , Tom Reed wrote: Why no trees in the standard library, if not as a built in? I searched the archive but couldn't find a relevant discussion. Seems like a glaring omission considering the batte

Re: No trees in the stdlib?

2009-06-26 Thread João Valverde
Stefan Behnel wrote: João Valverde wrote: Besides some interface glitches, like returning None on delete if I recall correctly. That's actually not /that/ uncommon. Operations that change an object are not (side-effect free) functions, so it's just purity if they do not hav

Re: No trees in the stdlib?

2009-06-26 Thread João Valverde
João Valverde wrote: Stefan Behnel wrote: João Valverde wrote: Besides some interface glitches, like returning None on delete if I recall correctly. That's actually not /that/ uncommon. Operations that change an object are not (side-effect free) functions, so it's just puri

Re: No trees in the stdlib?

2009-06-26 Thread João Valverde
João Valverde wrote: João Valverde wrote: Aahz wrote: In article , Tom Reed wrote: Why no trees in the standard library, if not as a built in? I searched the archive but couldn't find a relevant discussion. Seems like a glaring omission considering the batteries included philo

Re: No trees in the stdlib?

2009-06-26 Thread João Valverde
Aahz wrote: In article <006078f0$0$9721$c3e8...@news.astraweb.com>, Steven D'Aprano wrote: Hash tables (dicts) are useful for many of the same things that trees are useful for, but they are different data structures with different strengths and weaknesses, and different uses. To argue that

Re: No trees in the stdlib?

2009-06-26 Thread João Valverde
greg wrote: João Valverde wrote: What's lacking is an associative array that preserves ordering, doesn't require a hash function and has fast insertions and deletions in O(log(n)). Careful here -- you can't get away from the need for hashability just by using a tree. Even if

Re: No trees in the stdlib?

2009-06-26 Thread João Valverde
João Valverde wrote: greg wrote: João Valverde wrote: What's lacking is an associative array that preserves ordering, doesn't require a hash function and has fast insertions and deletions in O(log(n)). Careful here -- you can't get away from the need for hashability just

Re: No trees in the stdlib?

2009-06-26 Thread João Valverde
Aahz wrote: In article , =?ISO-8859-1?Q?Jo=E3o_Valverde?= wrote: What's lacking is an associative array that preserves ordering, doesn't require a hash function and has fast insertions and deletions in O(log(n)). The particular algorithm to achieve this is a secondary issue. It's a BST fo

Re: No trees in the stdlib?

2009-06-26 Thread João Valverde
João Valverde wrote: Aahz wrote: In article , =?ISO-8859-1?Q?Jo=E3o_Valverde?= wrote: Anyway, I'm *not* trying to discourage you, just explain some of the roadblocks to acceptance that likely are why it hasn't already happened. If you're serious about pushing this throug

Re: No trees in the stdlib?

2009-06-27 Thread João Valverde
alex23 wrote: João Valverde wrote: Currently I don't have a strong need for this. And clearly neither has anyone else, hence the absence from the stdlib. As others have pointed out, there are alternative approaches, and plenty of recipes on ActiveState, which seem to have scra

Re: No trees in the stdlib?

2009-06-27 Thread João Valverde
Miles Kaufmann wrote: João Valverde wrote: To answer the question of what I need the BSTs for, without getting into too many boring details it is to merge and sort IP blocklists, that is, large datasets of ranges in the form of (IP address, IP address, string). Originally I was also

Re: No trees in the stdlib?

2009-06-28 Thread João Valverde
Paul Rubin wrote: a...@pythoncraft.com (Aahz) writes: (In particular, WRT the bisect module, although insertion and deletion are O(N), the constant factor for doing a simple memory move at C speed swamps bytecode until N gets very large -- and we already have collections.deque() for some othe

Re: No trees in the stdlib?

2009-06-28 Thread João Valverde
Paul Rubin wrote: João Valverde writes: Could you clarify what you mean by immutable? As in... not mutable? As in without supporting insertions and deletions? Correct. That's has the same performance as using binary search on a sorted list. What's the point of us

Re: No trees in the stdlib?

2009-06-28 Thread João Valverde
João Valverde wrote: Paul Rubin wrote: João Valverde writes: Could you clarify what you mean by immutable? As in... not mutable? As in without supporting insertions and deletions? Correct. That's has the same performance as using binary search on a sorted list. What's

Re: No trees in the stdlib?

2009-06-28 Thread João Valverde
Paul Rubin wrote: João Valverde writes: Interesting, thanks. The concept is not difficult to understand but I'm not sure it would be preferable. A copy operation should have the same cost as a "snapshot", You mean a deep-copy? That is unnecessarily expensive; wi

Re: No trees in the stdlib?

2009-06-28 Thread João Valverde
João Valverde wrote: Paul Rubin wrote: João Valverde writes: Interesting, thanks. The concept is not difficult to understand but I'm not sure it would be preferable. A copy operation should have the same cost as a "snapshot", You mean a deep-copy? That is unnecess

Re: No trees in the stdlib?

2009-06-29 Thread João Valverde
João Valverde wrote: Paul Rubin wrote: João Valverde writes: Interesting, thanks. The concept is not difficult to understand but I'm not sure it would be preferable. A copy operation should have the same cost as a "snapshot", You mean a deep-copy? That is unnecess

Re: No trees in the stdlib?

2009-06-29 Thread João Valverde
alex23 wrote: João Valverde wrote: Currently I don't have a strong need for this. And clearly neither has anyone else, hence the absence from the stdlib. As others have pointed out, there are alternative approaches, and plenty of recipes on ActiveState, which seem to have scra

Re: No trees in the stdlib?

2009-07-01 Thread João Valverde
Lawrence D'Oliveiro wrote: In message , João Valverde wrote: Simple example usage case: Insert string into data structure in sorted order if it doesn't exist, else retrieve it. the_set = set( ... ) if str in the_set : ... "retrieval&quo

Re: ISO library ref in printed form

2009-07-08 Thread João Valverde
kj wrote: Does anyone know where I can buy the Python library reference in printed form? (I'd rather not print the whole 1200+-page tome myself.) I'm interested in both/either 2.6 and 3.0. TIA! kj Why not download the documentation, take it to a local copy shop and have it printed and bou