[issue14538] HTMLParser: parsing error

2012-04-19 Thread Michel Leunen

Michel Leunen michel.leu...@gmail.com added the comment:

Thanks guys for your comments and for solving this issue. Great work!

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14538
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14538] HTMLParser

2012-04-09 Thread Michel Leunen

New submission from Michel Leunen michel.leu...@gmail.com:

HTMLParser fails to parse this structure of tags: 

'a/ascript/scriptmetameta / body/body'

Parsing stops after the first meta tag ignoring the remainers

from HTMLParser import HTMLParser
parser = process_html()
parser.feed('a/ascript/scriptmetameta / body/body')

Python 2.7.2+ Ubuntu 11.10

--
components: Library (Lib)
messages: 157890
nosy: Michel.Leunen
priority: normal
severity: normal
status: open
title: HTMLParser
type: behavior
versions: Python 2.7

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14538
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14538] HTMLParser: parsing error

2012-04-09 Thread Michel Leunen

Changes by Michel Leunen michel.leu...@gmail.com:


--
title: HTMLParser - HTMLParser: parsing error

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14538
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: destructor not called

2008-09-28 Thread Michel Leunen

Marcin201 a écrit :


class Foo:
def __init__(self):
print Hello
self.f = self.fxn


Maybe self.f = self.fxn() is what you want. Note the '()'.

--
Michel Leunen
http://linux.leunen.com
--
http://mail.python.org/mailman/listinfo/python-list


Re: Python Nautilus script

2008-09-16 Thread Michel Leunen

kaer a écrit :


#! /usr/bin/python
# -*- coding: utf8 -*-

import os, sys

#NAUTILUS_SCRIPT_SELECTED_FILE_PATHS : chemins des fichiers
sélectionnés séparés par des retours à la ligne (newline) (uniquement
pour les fichiers locaux)
#NAUTILUS_SCRIPT_SELECTED_URIS : URIs des fichiers sélectionnés
séparés par des retours à la ligne (newline)
#NAUTILUS_SCRIPT_CURRENT_URI : URI de l'emplacement actuel
#NAUTILUS_SCRIPT_WINDOW_GEOMETRY : position et taille de la fenêtre
actuelle


KEYS=(NAUTILUS_SCRIPT_SELECTED_FILE_PATHS,
NAUTILUS_SCRIPT_SELECTED_URIS, NAUTILUS_SCRIPT_CURRENT_URI,
NAUTILUS_SCRIPT_WINDOW_GEOMETRY)

ft=open(/home/kaer/stupid.txt, w)
for key_value in [(key, os.environ.get(key, 'NOT FOUND')) for key in
KEYS]:
ft.write(env(%s): %s\n % key_value)
file_names=sys.argv[1:]
for index, file_name in enumerate(file_names):
ft.write(%s: [%s]\n % (index, file_name))
if os.path.isfile(file_name): os.rename(file_name, '%03d-%s' %
(index+1, file_name))
ft.close()


Yes, indeed, it works with your code. Thanks for it.
I just have to find out why it doesn't work with mine. The problem is 
that Nautilus scripts are hard to debug.


Thanks for your help,
Michel

--
Michel Leunen
http://linux.leunen.com
--
http://mail.python.org/mailman/listinfo/python-list