Re: ask for a RE pattern to match TABLE in html

2008-06-26 Thread MRAB
On Jun 26, 7:26 pm, "David C. Ullrich" <[EMAIL PROTECTED]> wrote: > In article <[EMAIL PROTECTED]>, >  Cédric Lucantis <[EMAIL PROTECTED]> wrote: > > > > > Le Thursday 26 June 2008 15:53:06 oyster, vous avez écrit : > > > that is, there is no TABLE tag between a TABLE, for example > > > something w

Need help capturing output of re.search

2008-06-26 Thread joemacbusiness
Hi - I need help capturing the output of a RegEx search. I dont understand why this conditional fails. Here is the code: #= start snip == #!/usr/local/bin/python import os import re dirName = '/home/user/bin/logs' os.chdir(dir

Re: ask for a RE pattern to match TABLE in html

2008-06-26 Thread Jonathan Gardner
On Jun 26, 11:07 am, Grant Edwards <[EMAIL PROTECTED]> wrote: > On 2008-06-26, Stefan Behnel <[EMAIL PROTECTED]> wrote: > > > > Why not use an HTML parser instead? > > > > Stating it differently: in order to correctly recognize HTML > tags, you must use an HTML parser.  Trying to write an HTML > pa

Re: ask for a RE pattern to match TABLE in html

2008-06-26 Thread Jonathan Gardner
On Jun 26, 3:22 pm, MRAB <[EMAIL PROTECTED]> wrote: > Try something like: > > re.compile(r'.*?', re.DOTALL) So you would pick up strings like "foo"? I doubt that is what oyster wants. -- http://mail.python.org/mailman/listinfo/python-list

Re: Adding functions to an existing instance

2008-06-26 Thread Allen
[EMAIL PROTECTED] wrote: On 26 juin, 17:18, Allen <[EMAIL PROTECTED]> wrote: I need a way to add a method to an existing instance, but be as close as possible to normal instance methods. def set_method(obj, func, name=None): if not name: name = func.__name__ setattr(obj, name, func.__g

Re: Need help capturing output of re.search

2008-06-26 Thread John Machin
On Jun 27, 8:31 am, [EMAIL PROTECTED] wrote: > Hi - > > I need help capturing the output of a RegEx search. > I dont understand why this conditional fails. > > Here is the code: > > #= start snip > == > #!/usr/local/bin/python > >

Re: sqlite3 alternative option

2008-06-26 Thread Allen
Gandalf wrote: Hi every one I'm looking for a good alternative db to replace sqlite I'm using pySQlite3, And I tried to translate very big database from Mysql to sqlite. I generated through PHP a python script that insert 200,000 records to my sqlite db and took me more then 5 hours and managed

Re: Need help capturing output of re.search

2008-06-26 Thread joemacbusiness
>You may like to read this: http://www.amk.ca/python/howto/regex/ This is a good resource. Thank you. Someone else pointed out that I needed to change the if reCheck == "None": to if reCheck == None: # removed the "s This worked great! Thanks! --JM -- http://mail.python.org/mailman/listin

Re: Help me on Backspace please

2008-06-26 Thread John Machin
On Jun 27, 6:32 am, [EMAIL PROTECTED] wrote: > Hi > I am a beginner on Python and have a problem.. > > I have text file and reading it line by line and there are backspace > characters in it like '\b' or anything you want like "#". I want to > replace these chars. with Backspace action. I mean del

Re: list previous or following list elements

2008-06-26 Thread norseman
Terry Reedy wrote: antar2 wrote: Hello Suppose I have a textfile (text1.txt) with following four words: I see seven. Just say 'list of words' Apple balcony cartridge damned paper bold typewriter and I want to have a python script that prints the words following the word starting with

Re: Need help capturing output of re.search

2008-06-26 Thread John Machin
On Jun 27, 10:01 am, [EMAIL PROTECTED] wrote: > >You may like to read this:http://www.amk.ca/python/howto/regex/ > > This is a good resource. Thank you. > Someone else pointed out that I needed to change the > > if reCheck == "None": > > to > > if reCheck == None: # removed the "s "Somebody els

Re: sqlite3 alternative option

2008-06-26 Thread jay graves
On Jun 26, 6:30 pm, Allen <[EMAIL PROTECTED]> wrote: > Gandalf wrote: > > Hi every one I'm looking for a good alternative db to replace sqlite > > > I'm using pySQlite3, And I tried to translate very big database from > > Mysql to sqlite. > > I generated through  PHP a python script that insert 200

Re: list previous or following list elements

2008-06-26 Thread bearophileHUGS
Terry Reedy: > I believe > wordlist = open('words.txt','r').read().split('\n') > should give you the list in Python. This looks better (but it keeps the newlines too. Untested. Python 2.x): words = open("words.txt").readlines() for i, word in enumerate(words): if word.startswith("b"):

Re: Need help capturing output of re.search

2008-06-26 Thread joemacbusiness
On Jun 26, 5:12 pm, John Machin <[EMAIL PROTECTED]> wrote: > On Jun 27, 10:01 am, [EMAIL PROTECTED] wrote: > > > >You may like to read this:http://www.amk.ca/python/howto/regex/ > > > This is a good resource.  Thank you. > > Someone else pointed out that I needed to change the > > > if reCheck == "

What happened to _tkinter.so?

2008-06-26 Thread akineko
Hello Python developers, I have noticed something curious while I was investigating a problem with the PyInstaller. In my environment, the PyInstaller couldn't find TCL/TK installation path even I have it. I found the PyInstaller uses output from ldd to find the a path to TCL/TK libraries. But n

Re: Need help capturing output of re.search

2008-06-26 Thread John Machin
On Jun 27, 10:45 am, [EMAIL PROTECTED] wrote: > On Jun 26, 5:12 pm, John Machin <[EMAIL PROTECTED]> wrote: > > > > > On Jun 27, 10:01 am, [EMAIL PROTECTED] wrote: > > > > >You may like to read this:http://www.amk.ca/python/howto/regex/ > > > > This is a good resource. Thank you. > > > Someone else

Re: sqlite3 alternative option

2008-06-26 Thread Gandalf
you where right! thank you ! -- http://mail.python.org/mailman/listinfo/python-list

Re: recursion in Class-methods?

2008-06-26 Thread Saul Spatz
defn noob wrote: if start == end: return path if not self.dictionary.has_key(start): if start not in self.dictionnary: return None for node in self.dictionary[start]: if node not in path: newpath = find_path

Design principles and architecture of an information transfer standard based on XML and SOAP

2008-06-26 Thread xkenneth
All, So i'm just about to undertake my first real open source project, and I'm looking for a bit of advice. There's an oilfield standard called WITSML (Wellsite Information Transfer Standard Markup Language - witsml.org), it's basically a collection of XML schemas and a spec for an client-serve

Re: python interface to Firefox and Thunderbird

2008-06-26 Thread Larry Bates
yardennis wrote: Hi, I need python moudles that can auto install python 2.5 (web install or a EXE file) auto download and install Firefox3 and Thunderbird 2 auto import from IE 6, 7 and OE 5,6 and Outlook read contacts and emails from Thunderbird store read Firefox 3 bookmarks, history, cooki

Re: Working with the Windows Registry

2008-06-26 Thread s0suk3
On Jun 26, 4:24 am, teh_sAbEr <[EMAIL PROTECTED]> wrote: > Great! It works properly now but I have one more question, would > anyone know how to get the changes to take effect immediately? Like > some sort of Python way to force the desktop to reload? AFAIK the only > way that'll happen is if I use

warning for unused packages/modules/objects

2008-06-26 Thread Daniel Fetchinson
How difficult would it be to implement a system in python that would warn if there are unnecessarily imported packages/modules/objects in the code? I mean that when developing some code one frequently imports stuff, deletes the import, changes stuff here and there, imports other stuff, later decide

How to "rebind" py2.5.1 to run from comprompt after uninstalling py3.0?

2008-06-26 Thread defn noob
I installed python30 and so command prompt runs all pythonprograms through that which i didnt want so i uninstalled it. now i cant start any pythonprograms through the commandprompt. how do I "rebind" python25 to luanch when claling .py-files from the command prompt? -- http://mail.python.org/mai

Cyclic imports

2008-06-26 Thread James
Hi all, I'm looking for some advice dealing with cyclic, cross-package imports. I've created the following demo file structure: ./a/__init__.py ./a/a.py ./b/__init__.py ./b/b.py ./main.py a.py imports a class from b.py and vice versa, and main.py imports them both. However, because a.py has not

Re: Learning Python in a group

2008-06-26 Thread Mr. Juju
Taygun Kekec wrote: hi guys. I would be glad to join your group because i want to learn deeper python but i am frustrated of isolation too. It would provide stimulation and encourage to study and will boost our desire to learn. So count me in! hello all, I just started studying python myself a

Re: Cyclic imports

2008-06-26 Thread Dan Bishop
On Jun 26, 10:40 pm, James <[EMAIL PROTECTED]> wrote: > Hi all, > I'm looking for some advice dealing with cyclic, cross-package > imports. > > I've created the following demo file structure: > ./a/__init__.py > ./a/a.py > ./b/__init__.py > ./b/b.py > ./main.py > > a.py imports a class from b.py an

Re: Web Crawler - Python or Perl?

2008-06-26 Thread Chuck Rhode
On Sun, 22 Jun 2008 10:47:59 -0700, subeen wrote: > You can avoid the problem using the following code: > import socket > timeout = 300 # seconds > socket.setdefaulttimeout(timeout) Yes, I tried that, too, but I forget what went wrong with it. Perhaps, the socket kept up the handshake even thou

Re: Cyclic imports

2008-06-26 Thread James
> # a.py > import b > # refer to b.b > > # b.py > import a > # refer to a.a Thanks Dan, but that still doesn't work for me I'm afraid... I renamed the modules avoid name overloading -- a.py is now: import b class A(): print('b.b_mod:', b.b_mod) b is now defined, but b.b_mod isn't: File "m

Re: Cyclic imports

2008-06-26 Thread Torsten Bronger
Hallöchen! James writes: >> # a.py >> import b >> # refer to b.b >> >> # b.py >> import a >> # refer to a.a > > Thanks Dan, but that still doesn't work for me I'm afraid... > > I renamed the modules avoid name overloading -- a.py is now: > import b > > class A(): > print('b.b_mod:', b.b_mod)

Re: Windows process ownership trouble

2008-06-26 Thread geoffbache
Tim, I copied your code exactly from my browser and ran it, so I don't think there was a typo. I could upgrade to Python 2.5.2 I suppose to compare and contrast, but I need to support older Python versions anyway so it's a bit academic... Your speculation about garbage collection did set me goin

<    1   2