Re: Freeze problem with Regular Expression

2008-06-25 Thread cirfu
On 25 Juni, 17:20, Kirk [EMAIL PROTECTED] wrote: Hi All, the following regular expression matching seems to enter in a infinite loop: import re text = ' MSX INTERNATIONAL HOLDINGS ITALIA srl (di seguito MSX ITALIA) una '

NameError: name 'maketrans' is not defined, pythonchallenge

2008-06-24 Thread cirfu
im doing the python challenge and well, i solved this problem with ruby :) phrase = g fmnc wms bgblr rpylqjyrc gr zw fylb. rfyrq ufyr amknsrcpq ypc dmp. bmgle gr gl zw fylb gq glcddgagclr ylb rfyr'q ufw rfgq rcvr gq qm jmle. sqgle qrpgle.kyicrpylq() gq pcamkkclbcb. lmu ynnjw ml rfc spj. puts

Re: NameError: name 'maketrans' is not defined, pythonchallenge

2008-06-24 Thread cirfu
from string import maketrans ok but how can i write: pattern = maketrans('A-XY-Za-xy-z', 'C-ZA-Bc-za-b') pattern = maketrans('A-Za-z', 'C-Bc-b') none works -- http://mail.python.org/mailman/listinfo/python-list

Re: NameError: name 'maketrans' is not defined, pythonchallenge

2008-06-24 Thread cirfu
import string text = g fmnc wms bgblr rpylqjyrc gr zw fylb. rfyrq ufyr amknsrcpq ypc dmp. bmgle gr gl zw fylb gq glcddgagclr ylb rfyr'q ufw rfgq rcvr gq qm jmle. sqgle qrpgle.kyicrpylq() gq pcamkkclbcb. lmu ynnjw ml rfc spj. table = string.maketrans(string.ascii_lowercase,

shorten this: if char in ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz:

2008-06-24 Thread cirfu
if char in ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz: cant i write something like: if char in [A-Za-z]: ? -- http://mail.python.org/mailman/listinfo/python-list

IDE on the level of Eclipse or DEVc++?

2008-06-23 Thread cirfu
is there an IDE for python of the same quality as Eclipse or DEVC++? I am currently using the editor that coems iwth python and it is all fine but for bigger projects it would be nice to have some way to easier browse the projectfiles for example. --

installed 3.0, rebind winprompt to 2.5?

2008-06-23 Thread cirfu
i installed python 3.0. now when im laucnhing from the dos prompt in win vista it searches in python3.0 i want to rebind it to 2.5, what do i need to change? -- http://mail.python.org/mailman/listinfo/python-list

Re: IDE on the level of Eclipse or DEVc++?

2008-06-23 Thread cirfu
i downloaded the extension for eclipse, nice. any opinions of netbeans vs eclipse for python? -- http://mail.python.org/mailman/listinfo/python-list

socket error: connection refused?

2008-06-23 Thread cirfu
The first time i start the shell it always works. But often after closing it and restarting it I get: Two windows pops up and the shell, after clicking the windows the shell just closes by itself. socket error: connection refused IDLE's subprocess didnt make connection. im using python 2.5.1

Re: socket error: connection refused?

2008-06-23 Thread cirfu
On 23 Juni, 20:55, [EMAIL PROTECTED] wrote: It's a security conflict. You should be able to run it again and have it work. Our company's cisco does the same thing (even after we approve the app) doesnt work but i found out i should open the task manager and kill all the python processes, then

regexp: match only if previous matched?

2008-06-23 Thread cirfu
I need to extract prices froma html-document. [0-9]*\$ matches 112$ 45$ etc but also just a $. why that shouldnt really matter and it is unlikely anyway to appear a $sign with no price attahced to it I still want to prevent it. How do I avoid matching $? It has to be nbr$. --

rightclick-copy in IDLE?

2008-06-22 Thread cirfu
when i rightclick in python idle i get set breakpoint or something. n options i dont find a way to change to the normal copy/paste options. -- http://mail.python.org/mailman/listinfo/python-list

listcomprehension, add elements?

2008-06-22 Thread cirfu
[a+b for a,b in zip(xrange(1,51), xrange(50,0,-1))] [51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51] i want to add all the elemtns a s well. can

Installing Python 3.0 no probs running 2.5 at the same time?

2008-06-19 Thread cirfu
Can I install 3.0 without breaking 2.5? Meaning does it overwrite some bindings or something or it just installs 3.0 in a different folder as a completely separate program? -- http://mail.python.org/mailman/listinfo/python-list

Re: Google-like Did you mean... ? search algorithm

2008-06-19 Thread cirfu
On 20 Juni, 00:14, [EMAIL PROTECTED] wrote: This is a wee bit OT, but I am looking for algorithms to implement search suggestions, similar to Google's Did you mean... ? feature. Can anyone point me to web pages, journal articles, implementations (preferably in Python!), or any other resources

advanced listcomprehenions?

2008-06-18 Thread cirfu
I am wondering if it is possible to write advanced listcomprehensions. For example: Write a program that prints the numbers from 1 to 100. But for multiples of three print Fizz instead of the number and for the multiples of five print Buzz. For numbers which are multiples of both three and five

weird iteration/assignment problem

2008-06-13 Thread cirfu
for i in xrange(0, len(texts)): texts[i] = yes for i in texts: i = no why is the first one working but not the second. i mean i see why the firts one works but i dont udnerstand why the second doesnt. -- http://mail.python.org/mailman/listinfo/python-list

web2py forum or mailing list?

2008-06-11 Thread cirfu
i cant find a web2py mailing list or forum, not by googling and not on the web2py homepage. (yes thats right im asking about web2py not webpy). this framework seems great and i installed and it seems like all i wished for. easy to install, easy to use, fast, etc. just an overall better,

Re: web2py forum or mailing list?

2008-06-11 Thread cirfu
web2py django mailing list: http://groups.google.com/group/web2py -- http://mail.python.org/mailman/listinfo/python-list

Re: catastrophic regexp, help!

2008-06-11 Thread cirfu
On 11 Juni, 17:04, TheSaint [EMAIL PROTECTED] wrote: On 12:20, mercoledì 11 giugno 2008 cirfu wrote: patzln = re.compile((\w* *)* zlatan ibrahimovic (\w* *)*) I think that I shouldn't put anything around the phrase you want to find. patzln = re.compile(r'.*(zlatan ibrahimovic){1,1

Re: catastrophic regexp, help!

2008-06-11 Thread cirfu
On 11 Juni, 10:25, Chris [EMAIL PROTECTED] wrote: On Jun 11, 6:20 am, cirfu [EMAIL PROTECTED] wrote: pat = re.compile((\w* *)*) this matches all sentences. if fed the string are you crazy? i am it will return are you crazy. i want to find a in a big string a sentence containing Zlatan

catastrophic regexp, help!

2008-06-10 Thread cirfu
pat = re.compile((\w* *)*) this matches all sentences. if fed the string are you crazy? i am it will return are you crazy. i want to find a in a big string a sentence containing Zlatan Ibrahimovic and some other text. ie return the first sentence containing the name Zlatan Ibrahimovic. patzln =

Re: Webpy vs Django?

2008-06-03 Thread cirfu
wow now i have django running. now i see... -- http://mail.python.org/mailman/listinfo/python-list