Hallo George,
thanks a lot! This is exactly the direction I had in mind.
Your script demonstrates nicely how Beautiful Soup works.
Regards,
Martin.
George Sakkis wrote:
> Francach wrote:
> > Hi George,
> >
> > Firefox lets you group the bookmarks along with other information into
> > directories
James Stroud a écrit :
> [EMAIL PROTECTED] wrote:
> > Hello
> >
> > I am looking for python code that takes as input a list of strings
> > (most similar,
> > but not necessarily, and rather short: say not longer than 50 chars)
> > and that computes and outputs the python regular expression that
>
[EMAIL PROTECTED] wrote:
> I wouldn't be at all surprised if the pysqlite author operated under that
> assumption. That the Python developers didn't pick up on the issue is not
> surprising. I'm not sure how many of them are (py)sqlite users, probably
> relatively few.
>
> Skip
Who has reviewe
Peter Møllerud wrote:
> I'm very new to Python
then you might want to consider using ElementTree or lxml, not necessarily
minidom.
> c = doc.createElement("sometest")
> doc.appendChild(c)
> tmp = doc.createElement("info")
> tmp.setAttribute("vehicle", "car")
> tmp.setAttribute("x-ray ", "100-1")
The most modest way is to use pure Python and interface via CGI with
the web. I would start there.
As you code you will find yourself saying "I wonder if a framework is
out there that already has automated this specific process (say
templating)?", well then you can search and find such a framework
[EMAIL PROTECTED] wrote:
> Thanks for that, Carl. I think that using the loop is probably what
> I'll end up doing. I had no idea that the listcomp thing would be quite
> a complicated as it is appearing. I had it in my mind that I was
> missing some obvious thing which would create a simple solut
ml1n wrote:
> [EMAIL PROTECTED] wrote:
> > This may be what you need:
> >
> > class foo:
> > def __init__(self, a, b):
> > self.a = a
> > self.b = b
> >
> > vars = [1,2,3,4,5,6]
> > objects = [foo(a, 1) for a in vars]
> >
> >
> > Note that in Python the new is expressed wit the () at th
Tim Chase wrote:
>
> I had a hard time comin' up with any words I'd want to call
> "words" where the additional non-word glyph (apostrophe, dash,
> etc) wasn't 'round the middle of the word. :)
>
> Any more crazy examples? :)
>
'ey, 'alf a mo, wot about when 'enry 'n' 'orace drop their aitches?
Diez B. Roggisch wrote:
> [EMAIL PROTECTED] schrieb:
>> Hello
>>
>> I am looking for python code that takes as input a list of strings
>> (most similar,
>> but not necessarily, and rather short: say not longer than 50 chars)
>> and that computes and outputs the python regular expression that
>> mat
"Frederic Wenzel" <[EMAIL PROTECTED]> wrote:
| I wrote a script on Linux that uses pyserial to read status messages
| from a serial line using readlines(). For now, it just displays what
| it gets on stdout:
|
| 17:42 | 0005 | 02 | | 5 |Rack Abs.| - | --210
| 17:42 | 0008 | 02 | | 5 |Ra
<[EMAIL PROTECTED]> wrote in email:
| Hi,and sorry I forget tell you what I want exactly.
|
| My problem is
|
| example:
|
| when I write like you tell me:
|
| >>> idx=lb.curselection()
| >>> StringValue=lb.get(idx) <=== This
|
| THEN,ERROR IS:
|
| Traceback (most recent call last):
In <[EMAIL PROTECTED]>, Benjamin Grant
wrote:
> Hi all,
> I'd greatly appreciate any help. I can configure, make and install
> everything fine. I'm using python 2.4 I have ubuntu dapper drake. I am
> trying to install hplip which requires python. When I do this, this
> also works but while run
Jay wrote:
> Here are some commands to try:
>
> apt-get install ubuntu-standard
> apt-get install ubuntu-desktop
>
> Also, I'd recommend trying Ubuntu's official forums website. I've
> found their community to be extremely helpful.
>
> http://www.ubuntuforums.org/
>
> Plus, why on earth would
Richard Schulman schrieb:
> Sorry to be back at the goodly well so soon, but...
>
> ...when I execute the following -- variable mean_eng_txt being
> utf-16LE and its datatype nvarchar2(79) in Oracle:
>
> cursor.execute("""INSERT INTO mean (mean_id,mean_eng_txt)
> VALUES (:id,:mean)""",id=id
ml1n wrote:
> I'm not really sure how to explain this so maybe some example code is
> best. This code makes a list of objects by taking a list of ints and
> combining them with a constant:
>
> class foo:
> def __init__(self):
> self.a = 0
> self.b = 0
>
> def func(a,b):
> f = new
Kay Schluehr wrote:
>
[Quoting Marc 'BlackJack' Rintsch...]
> > If you are so fond of static typing, why are you using Python in the first
> > place? Just see it as consistency -- dynamically typed language →
> > dynamically typed DB columns. ;-)
>
> I have to admit I find this bogus too. It ha
hi...
i m now updating an sql file
old file contains lines
insert into mobilebill values ('Apr 01, 03', 'OUT', '91804103253', 34,
3.2);
insert into mobilebill values ('Apr 01, 03', 'OUT', '91806392475', 84,
5.2);
insert into mobilebill values ('Apr 01, 03', 'OUT', '918317048193', 76,
7.6);
i want
James Stroud wrote:
> Hello All,
>
> I am interested in setting up a modest invoicing system for some
> consulting I am doing. I like the idea of managing this on the web and
> creating invoices and printing them from a browser. However, I'm not
> really sure where to start. I've played with so
[EMAIL PROTECTED] wrote:
> Paul McNett wrote:
>
>>[EMAIL PROTECTED] wrote:
>>
>>>Do you know what INNER JOIN means?
>>>
>>>Do you know how important it is to a relational database?
>>>
>>>Can you explain how an INNER JOIN can even work, in theory,
>>>with dynamic data types?
>>
>>Let's stop the pi
[EMAIL PROTECTED] wrote:
[...]
>
> Cool ... and damn but you guys are fast with the answers. This appears
> to work find, but in a quick and dirty test it appears that the [list]
> version takes about 2x as long to run as the original loop. Is this
> normal?
>
No hard and fast information, but as
[EMAIL PROTECTED] wrote:
> Carl Banks wrote:
>
>>[EMAIL PROTECTED] wrote:
>>
>>>Paul Rubin wrote:
>>>
[EMAIL PROTECTED] writes:
>print sum( ([i]*n for i,n in enumerate(seq)), [])
Wow, I had no idea you could do that. After all the discussion about
summing strings, I'm as
techie2go wrote:
> i m now updating an sql file
> =
> but the output is just
> 2003-01-04
> and not
>
> insert into mobilebill values ('2003-01-04', 'OUT', '91804103253', 34,
> 3.2);
>
> help me in this regard, what did i do wrong...
You can find out yourself if you throw in so
I recommend Scribes.
http://scribes.sf.net
Flash Demo: http://scribes.sf.net/snippets.htm
GIF Demo: http://www.minds.may.ie/~dez/images/blog/scribes.html
Omar wrote:
> I'd love the perfect editor that would be:
>
> a) free
>
> b) enable me to drag and drop code snippets from a sort of browser i
Hi, Snake Tamers
According to http://www.python.org/doc/2.4.1/lib/typesseq-strings.html (and
next releases):
"""
The conversion types are:
Conversion Meaning Notes
[...]
x Unsigned hexadecimal (lowercase).
"Jason" <[EMAIL PROTECTED]> wrote:
> As far as I can tell, the best way to use super() with an __init__
> function is to stick to a rigid function signiture.
...
> Unfortunately, I don't see a way of avoiding this problem with super().
An easy way to avoid changing the method signature is to use
Hello,
I have installed PIL 1.1.5 on Windows with Python 2.4. I'm unable to open .tiff
images that I can open and view using Windows Explorer. In other words, this
simple test fails:
import Image
im = Image.open('small.tif')
with an 'cannot identify image file' error message. I'm able to open .j
- Mensaje reenviado
De: Mario Lacunza <[EMAIL PROTECTED]>
Para: Lista Python Ing
Asunto: Problems with PyGridTableBase
Fecha: Sat, 09 Sep 2006 00:03:20 -0500
Hello,
I attach two files:frmClientes and frmClientesNE.
frmClientes charge a Grid with resume Costumers data: Name, Com
I would be surprised if it is the naive:
m = 0
s1 = "me"
s2 = "locate me"
s1len = len(s1)
s2len = len(s2)
found = False
while m + s1len <= s2len:
if s1 == s2len[m:m+s1len]:
found = True
break
m += 1
--
http://mail.python.org/mailman/listinfo/python
James Stroud wrote:
> Hello All,
>
> I am interested in setting up a modest invoicing system for some
> consulting I am doing. I like the idea of managing this on the web and
> creating invoices and printing them from a browser. However, I'm not
> really sure where to start. I've played with some C
hello,
I'm using pyparsing and trying to parse something like:
test="""Q(x,y,z):-Bloo(x,"Mitsis",y),Foo(y,z,1243),y>28,x<12,x>3"""
and also have all comparison predicates in a separate list apart from the
parse tree. So my grammar has this line in it:
Comparison_Predicate = Group(variable + one
Andres Corrada-Emmanuel wrote in
news:[EMAIL PROTECTED] in
comp.lang.python:
> I have installed PIL 1.1.5 on Windows with Python 2.4. I'm unable to
> open .tiff images that I can open and view using Windows Explorer. In
> other words, this simple test fails:
>
> import Image
> im = Image.open('s
hg wrote:
> Hi,
>
> I am writing a transaction server (socket-based) under windows.
>
> I use mysqldb to log info into MySQL.
>
> It is all working and I need now to decide whether to use forks
> (CreateProcess I guess) or threads.
>
> I saw in another thread that some db engines did have issue
Tor Erik <[EMAIL PROTECTED]> wrote:
> I would be surprised if it is the naive:
Yep -- it's "a mix between Boyer-Moore and Horspool with a few more
bells and whistles on the top", as documented and implemented in
Objects/stringlib/fastsearch.h in the Python sources and well discussed
and explained
In <[EMAIL PROTECTED]>, Tor Erik wrote:
> I would be surprised if it is the naive:
Why?
I guess it simply calls an appropriate C library function.
Ciao,
Marc 'BlackJack' Rintsch
--
http://mail.python.org/mailman/listinfo/python-list
Alex Martelli wrote:
> Tor Erik <[EMAIL PROTECTED]> wrote:
>
>> I would be surprised if it is the naive:
>
> Yep -- it's "a mix between Boyer-Moore and Horspool with a few more
> bells and whistles on the top", as documented and implemented in
> Objects/stringlib/fastsearch.h in the Python source
Hello,
I am completely new to python and I have question that I unfortunately
could not find in the various documentation online. My best guess is
that the answer should be quitte easy but I have just enterd the learning
phase so that means a hightend chance for stupidity and mistakes on my
part.
Oh.. Sorry about that, then.
Did my suggestions work at all?
Peter Otten wrote:
> Jay wrote:
>
> > Here are some commands to try:
> >
> > apt-get install ubuntu-standard
> > apt-get install ubuntu-desktop
> >
> > Also, I'd recommend trying Ubuntu's official forums website. I've
> > found t
GM wrote:
> Dear all,
>
> The problem that I am facing now is that, when I use poplib to get a
> email message with chinese character set like big5, the character
> string is changed automatically to sth like =B8=D5=ACQ=AAM...the OS I
> am using is red hat ES4 and the python version I am using is
>> Any more crazy examples? :)
>
> 'ey, 'alf a mo, wot about when 'enry 'n' 'orace drop their aitches?
I said "crazy"...not "pathological" :)
If one really wants such a case, one has to omit the standard
practice of nesting quotes:
John replied "Dad told me 'you can't go' but let Judy"
jason schrieb:
> Hello,
>
> I am completely new to python and I have question that I unfortunately
> could not find in the various documentation online. My best guess is
> that the answer should be quitte easy but I have just enterd the learning
> phase so that means a hightend chance for stupidit
jason wrote:
> Hello,
>
> I am completely new to python and I have question that I unfortunately
> could not find in the various documentation online. My best guess is
> that the answer should be quitte easy but I have just enterd the learning
> phase so that means a hightend chance for stupidity
> "Bryan" == Bryan Olson <[EMAIL PROTECTED]> writes:
Bryan> [EMAIL PROTECTED] wrote:
Bryan> Go with your gut. Python threads are reasonably portable, and
Bryan> work well on modern MS-Windows.
>>
>> >> Maybe ignore your gut and read the documentation. ;-)
>>
Bryan
Tim Chase wrote:
> >> Any more crazy examples? :)
> >
> > 'ey, 'alf a mo, wot about when 'enry 'n' 'orace drop their aitches?
>
> I said "crazy"...not "pathological" :)
>
> If one really wants such a case, one has to omit the standard
> practice of nesting quotes:
>
> John replied "Dad told
Tim Roberts schrieb:
>> 0530..058F; Armenian
>> 0590..05FF; Hebrew
>> ...
>
> This is a fabulously useful list, Martin. Did you get this from a web
> page? Can you tell me where?
It's part of the Unicode Consortium's database (UCD, Unicode Character
Database). This specific table is called "cod
EyeDB is a free ODBMS based on the ODMG 3 specification with
programming interfaces for C++ and Java. It is very powerfull, mature,
safe and stable. In fact, it was developed in 1992 for the Genome View
project althought rewritten in 1994, and has been used in a lot of
bioinformatics projects
http
Marc 'BlackJack' Rintsch schrieb:
> Interesting subject line. I think I still have a set of "Win 3.11 for
> workgroups" disks lying around somewhere, but where do I get Windows 2.5? ;-)
IIRC, there was no Windows 2.5 release. There was a Windows 2.1 release;
it was released in May '88, but then t
Igor Kravtchenko schrieb:
> My question is whether that is supposed to be totally impossible.
> Under Win32, we are indeed supposed to have os.name = "nt". Is that value
> hardcoded in Win32 binaries distribution themself? Can it potentially
> change?
I can't test it right now, but I would expec
Kevin D. Smith schrieb:
> Then there is Mike Fletcher's web page
> (http://www.vrplumber.com/programming/mstoolkit/) that describes in
> detail how to build extensions, but most of the links to external
> software are no longer valid. I think it's safe to say that I am
> completely lost, as there
Paul Rubin wrote:
> "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes:
> > > FWIW, the original loop looked perfectly fine and readable and I'd
> > > suggest going with that over these hacked-up listcomp solutions. Don't
> > > use a listcomp just for the sake of using a listcomp.
> >
> > Thanks for
On 9/9/06, Hendrik van Rooyen <[EMAIL PROTECTED]> wrote:
> | I wrote a script on Linux that uses pyserial to read status messages
> | from a serial line using readlines(). For now, it just displays what
> | it gets on stdout:
> | (...)
> | ser = serial.Serial(port=1,
> |
Adam Jones wrote:
> John Henry wrote:
> > Hi folks.
> >
> > I am interested on this topic as well.
> >
> > If my application is not database related, what would be a good choice?
> >
> > I have clients that wish to use my Python applications but I am not
> > willing to give them the code. So, I a
Lex Hider wrote:
> try:
> opts, args = getopt.getopt(sys.argv[1:], "l:",
> ["latest=", "notfound"])
> except getopt.GetoptError:
> sys.exit(2)
> #usage()
>
> for opt, arg in opts:
> if opt in (
Tor Erik <[EMAIL PROTECTED]> wrote:
> Alex Martelli wrote:
> > Tor Erik <[EMAIL PROTECTED]> wrote:
> >
> >> I would be surprised if it is the naive:
> >
> > Yep -- it's "a mix between Boyer-Moore and Horspool with a few more
> > bells and whistles on the top", as documented and implemented in
>
On Sat, 09 Sep 2006 09:00:35 -0700, John Machin wrote:
> jason wrote:
>> Hello,
>>
>> I am completely new to python and I have question that I unfortunately
>> could not find in the various documentation online. My best guess is
>> that the answer should be quitte easy but I have just enterd the
On Thu, 07 Sep 2006 18:36:32 -0700, Paul Rubin wrote:
> Reid Priedhorsky <[EMAIL PROTECTED]> writes:
>> > Wouldn't they need a database password?
>>
>> Well, right now, no. I have Postgres configured to trust the OS on who is
>> who.
>
> You trust the OS on the client machine, but not the clien
"don pasquale" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> hello,
> I'm using pyparsing and trying to parse something like:
> test="""Q(x,y,z):-Bloo(x,"Mitsis",y),Foo(y,z,1243),y>28,x<12,x>3"""
>
> and also have all comparison predicates in a separate list apart from the
> parse
Omar wrote:
> thanks for the suggestions, fellas
>
Would be kind of you to tell us which one you have decided to use and why?
Claudio Grondi
P.S. If you don't like any of already mentioned you can give SciTe a try.
--
http://mail.python.org/mailman/listinfo/python-list
Maric Michaud a écrit :
> Le vendredi 08 septembre 2006 10:15, Bruno Desthuilliers a écrit :
>
>>You
>>mentioned NotImplementedError, which is indeed the usual way to make
>>something "abstract" in Python.
>
>
> Hummm, some more thoughts about this.
>
> I can imagine class hierarchies where the
James Stroud a écrit :
> Hello All,
>
> I am interested in setting up a modest invoicing system for some
> consulting I am doing. I like the idea of managing this on the web and
> creating invoices and printing them from a browser. However, I'm not
> really sure where to start. I've played with
jason a écrit :
Just some more suggestions:
> def parselog(data):
> other = 0
> records = {}
>
> for line in string.split(data, '\n'):
for line in data.split('\n'):
> str = line.strip()
This will shadow the builtin 'str' type. You could reassign to 'line'
instead, or
Karrigell can really be recommended. Simple, but powerful. No need for SQL (though it can), just use the pure Python buzhug, Karrigell services and (Cheetah) templates. Works great.regardsAndre
--
http://mail.python.org/mailman/listinfo/python-list
Benjamin Grant wrote:
> Hi all, I'd greatly appreciate any help. I can configure, make and
> install everything fine. I'm using python 2.4 I have ubuntu dapper
> drake. I am trying to install hplip which requires python. When I do
> this, this also works but while running the following error oc
I'm trying to track down a performance issue in my Windows code, and
hotshot is telling me that the most time and calls are spent in these
methods
ncalls tottime percall cumtime percall filename:lineno(function)
75975 63982.7790.842 124464.4191.638
c:\python24\lib\site-packages\
I still run into my own ignorance a lot with unicode in Python.
Is it possible to define some combination of __repr__, __str__,
and/or __unicode__ so that the unicode() wrapper isn't necessary
in this statement:
>>> print unicode(jp.concepts['adjectives']['BLUE'][0])
(i.e. can I make it so tha
Way off-topic for Python, but can someone tell me what encoding was used in
this web page:
http://www.loppen.dk/side.php?navn=getin
I'm guessing ISO-8859-15, but the page doesn't indicate and it's none of the
ones available in Safari.
Thanks,
Skip
--
http://mail.python.org/mailman/listinf
[EMAIL PROTECTED] wrote:
>Way off-topic for Python, but can someone tell me what encoding was used in
>this web page:
>
>http://www.loppen.dk/side.php?navn=getin
>
>I'm guessing ISO-8859-15, but the page doesn't indicate and it's none of the
>ones available in Safari.
>
>Thanks,
>
>Skip
>
>
[EMAIL PROTECTED] wrote:
> I have tried their online Text-symbol Pattern Discovery
> with these input values:
>
> cpkg-3
> cpkg-31008
> cpkg-3000A
> cpkg-30006
> nsug-300AB
> nsug-300A2
> cpdg-30001
> nsug-300A3
Well, in the realm of sequence analysis, it is trivial to devise a regex
for the
On Sat, 09 Sep 2006 20:46:29 +0300, Paul McGuire
<[EMAIL PROTECTED]> wrote:
> Thanks for posting this test case. This is a bug in pyparsing. I'll
> have a
> fix ready shortly.
>
> -- Paul
Ur welcome, I hope you find the bug and squash it :). I temporalily solved
my problem (in case anyone
I've been using scite the last few days, and have also been
experimenting with ulipad.
thanks, again
--
http://mail.python.org/mailman/listinfo/python-list
Reid Priedhorsky <[EMAIL PROTECTED]> writes:
> B) Work machine. Run by others, many users. I'd like to also run my
> database client (Python) here.
Well, just how much do you distrust that machine? If you think it's
totally pwned by attackers who will stop at nothing to subvert your
client, you s
Martin v. Löwis wrote:
> Igor Kravtchenko schrieb:
>
>>My question is whether that is supposed to be totally impossible.
>>Under Win32, we are indeed supposed to have os.name = "nt". Is that value
>>hardcoded in Win32 binaries distribution themself? Can it potentially
>>change?
>
>
> I can't t
Frederic Wenzel wrote:
> On 9/9/06, Hendrik van Rooyen <[EMAIL PROTECTED]> wrote:
>
>>| I wrote a script on Linux that uses pyserial to read status messages
>>| from a serial line using readlines(). For now, it just displays what
>>| it gets on stdout:
>>| (...)
>>| ser = serial.Serial(port=1,
>>|
> http://www.loppen.dk/side.php?navn=getin
>
> I'm guessing ISO-8859-15, but the page doesn't indicate and it's none of the
> ones available in Safari.
It decodes to the same text using ISO-8859-1, ISO-8859-15, or
Windows-1252. More pages without declarations are produced on Windows so
<[EMAIL PROTECTED]> wrote:
> >> One thing I did find especially annoying though was that none of the
> >> editing keys worked.
>
> Seo> It is a known problem. It is a Mono bug. (ncurses-based colored
> Seo> console is not really complete.) There is a workaround.
>
> Thanks, it wo
[EMAIL PROTECTED] wrote:
> danielx wrote:
>> [EMAIL PROTECTED] wrote:
>>> Here is my script:
>>>
>>> from mechanize import *
>>> from BeautifulSoup import *
>>> import StringIO
>>> b = Browser()
>>> f = b.open("http://www.translate.ru/text.asp?lang=ru";)
>>> b.select_form(nr=0)
>>> b["source"] = "h
Brian Beck wrote:
> I'm happy to announce the first (alpha) release of geopy, a geocoding
> toolbox for Python: http://exogen.case.edu/projects/geopy/
For anyone interested, there is now a mailing list on Google Groups:
http://groups.google.com/group/geopy
geopy also now supports the Virtual Eart
Hi,
I'm trying to attach some attributes to functions and methods, similar
to Java annotations and .NET attributes.
I also want to use a convenient decorator for it, something along the
lines of
@attr(name="xander", age=10)
def foo():
...
Assigning attributes to the function will work, as will
At 01:10 PM 9/8/2006, Doug Stell wrote:
>Try www.TextPad.com. I've used it for years and love it. It
>understands many programming language constructs and can be taught to
>understand python so that things show up in color.
Any tips on how to teach TextPad to understand python?
Thanks,
Dick Moor
oripel:
Maybe this is a silly suggestion, the docstring is already overloaded,
but it may be used for this too:
def foo():
"""
...
...
@ATTR name="Xander"
@ATTR age=10
@ATTR hobby="knitting"
"""
...
(Or somethins similar without the @). Later you can retrive the
a
>> cursor.execute("""INSERT INTO mean (mean_id,mean_eng_txt)
>> VALUES (:id,:mean)""",id=id,mean=mean)
>>...
>> "cx_Oracle.NotSupportedError: Variable_TypeByValue(): unhandled data
>> type unicode"
>>
>> But when I try putting a codecs.BOM_UTF16_LE in various plausible
>> places, I just end
I'm experimenting with pyExcelerator and am reading an XLS file which
contains dates. In Excel on my Mac they look like "09/13/06". After
parsing them out of the .XLS file they are floats, e.g. 38973.0. I assume
that's an offset in days. Doing a little date math I come up with a base
date of ap
skip> Doing a little date math I come up with a base date of
skip> approximately (though not quite) 1900-01-01:
...
Reading the code in BIFFRecords.py I saw this docstring:
This record specifies the base date for displaying date values. All
dates are stored as count o
oripel wrote:
> I'm trying to attach some attributes to functions and methods, similar
> to Java annotations and .NET attributes.
> ...
> Assigning attributes to the function will work, as will assigning keys
> and values to a dictionary in an attribute. But if there are more
> decorators in the wa
[EMAIL PROTECTED] wrote:
> skip> Doing a little date math I come up with a base date of
> skip> approximately (though not quite) 1900-01-01:
> ...
>
> Reading the code in BIFFRecords.py I saw this docstring:
>
> This record specifies the base date for displaying date values. All
>
84 matches
Mail list logo