BeautifulSoup
On Sun, Aug 8, 2010 at 8:12 AM, Steven W. Orr wrote:
> I'm ok in python but I haven't done too much with web pages. I have a web
> page
> that is hand written in html that has about 1000 entries in a table and I
> want
> to convert the table from entries like this
>
>
> S
On Aug 7, 8:18 pm, Dennis Lee Bieber wrote:
> On Sat, 7 Aug 2010 13:02:56 -0700 (PDT), Carl Banks
> declaimed the following in
> gmane.comp.python.general:
>
>
>
> > Not really. Very few people call int(), float(), and company "type
> > casts". They aren't type casts at all, they are constructo
On Aug 7, 7:42 pm, "Steven W. Orr" wrote:
> I'm ok in python but I haven't done too much with web pages. I have a web page
> that is hand written in html that has about 1000 entries in a table and I want
> to convert the table from entries like this
>
>
> Some Date String
> Som
On 8 Αύγ, 05:56, John S wrote:
>"How can I use RE string replacement to find PHP tags and convert them
>to Django template tags?"
No, not at all John, at least not yet!
I have only 1 week that i'm learnign python(changing from php & perl)
so i'm very fresh at this beautifull and straighforwrd la
On 8 Αύγ, 05:42, John S wrote:
> If the 500 web pages are PHP only in the sense that there is only one
> pair of tags in each file, surrounding the entire content, then
> what you ask for is doable.
First of all, thank you very much John for your BIG effort to help
me(i'm still readign your post
Even though I just replied above, in reading over the OP's message, I
think the OP might be asking:
"How can I use RE string replacement to find PHP tags and convert them
to Django template tags?"
Instead of saying
source_contents = source_contents.replace(...)
say this instead:
import re
de
On Aug 7, 8:42 pm, MRAB wrote:
> That should be:
>
> data = data.replace(' data = data.replace('?>', '')
Yes, Thanks MRAB. I did forget that important detail.
> Strings don't have an 'insert' method!
*facepalm*! I really must stop Usenet-ing whilst consuming large
volumes of alcoholic be
On Aug 7, 8:20 pm, Νίκος wrote:
> Hello dear Pythoneers,
>
> I have over 500 .php web pages in various subfolders under 'data'
> folder that i have to rename to .html and and ditch the ''
> tages from within and also insert a very first line of
> where id must be an identification unique number o
I'm ok in python but I haven't done too much with web pages. I have a web page
that is hand written in html that has about 1000 entries in a table and I want
to convert the table from entries like this
Some Date String
SomeTag
A Title
htt
In article
<7f3c505c-4002-427e-a969-6d735307e...@z10g2000yqb.googlegroups.com>,
CM wrote:
> > Apparently, the Japanese used to (before they started adopting western
> > conventions). I.e. ages were given as "in his tenth year" (meaning nine
> > years old).
With apologies to Paul Simon...
One
# rename ALL php files to html in every subfolder of the folder 'data'
os.rename('*.php', '*.html') # how to tell python to
rename ALL php files to html to ALL subfolder under 'data' ?
# current path of the file to be processed
path = './data' # this must be somehow in a
On Sat, Aug 7, 2010 at 1:14 PM, John Nagle wrote:
> FORTRAN, MATLAB, and Octave all use 1-based subscripts.
>
> The languages which have real multidimensional arrays, rather
> than arrays of arrays, tend to use 1-based subscripts. That
> reflects standard practice in mathematics.
I propose t
rantingrick wrote:
On Aug 7, 7:20 pm, Νίκος wrote:
Hello dear Pythoneers,
I prefer Pythonista, but anywho..
I have over 500 .php web pages in various subfolders under 'data'
folder that i have to rename to .html
import os
os.rename(old, new)
and and ditch the '' tages from within
path
> Apparently, the Japanese used to (before they started adopting western
> conventions). I.e. ages were given as "in his tenth year" (meaning nine
> years old).
Koreans still do this. The day a child is born it is "one". Even
odder to me, the next birthday is not on the next anniversary of the
On 8/7/2010 4:45 PM, Martin v. Loewis wrote:
To add to the msg I just sent to M. Torrie. We are given the msi
programs for Python, PIL,matplotlib, and numpy. The question of how to
uninstall and re-install a different version remains.
I'd claim that this is not the real question. The real quest
On Aug 7, 7:20 pm, Νίκος wrote:
> Hello dear Pythoneers,
I prefer Pythonista, but anywho..
> I have over 500 .php web pages in various subfolders under 'data'
> folder that i have to rename to .html
import os
os.rename(old, new)
> and and ditch the '' tages from within
path = 'some/valid/path
Hello dear Pythoneers,
I have over 500 .php web pages in various subfolders under 'data'
folder that i have to rename to .html and and ditch the ''
tages from within and also insert a very first line of
where id must be an identification unique number of every page for
counter tracking purposes.
On Aug 7, 5:26 pm, GZ wrote:
> I am wondering if there is a module that can persist a stream of
> objects without having to load everything into memory. (For this
> reason, I think Pickle is out, too, because it needs everything to be
> in memory.)
>From the pickle docs it looks like you could do
> To add to the msg I just sent to M. Torrie. We are given the msi
> programs for Python, PIL,matplotlib, and numpy. The question of how to
> uninstall and re-install a different version remains.
I'd claim that this is not the real question. The real question is,
instead: "What specific error did
"W. eWatson" writes:
> Yes, code reversal programs have been around for many, many decades.
> Try one on MS Word or Adobe Acrobat. :-)
Interesting examples. What “important stuff” from those programs has not
been “ripped off”, to use your terms?
Is there anything remaining in those programs whi
On 2010-08-07, Gelonida wrote:
> I'm using g?vim and its c-scope plugin for browsing C-code.
> What would be a good way of navigating larger python projects with vim?
ctags:
http://ctags.sourceforge.net/
--
http://mail.python.org/mailman/listinfo/python-list
"D'Arcy J.M. Cain" writes:
> No. You are giving me math and logic but the subject was common
> sense.
Common sense is often unhelpful, and in such cases the best way to teach
something is to plainly contradict that common sense.
Common sense, for example, would have the Earth as a flat surface
On 8/7/2010 2:26 PM, Martin v. Loewis wrote:
Am 07.08.2010 23:01, schrieb Michael Torrie:
On 08/07/2010 01:17 PM, W. eWatson wrote:
Presumably I have him somehow delete the numpy site-package, the numpy
1.2.0 package? Just drill his way dow from the .../lib/site_packages?
Then install 1.2.0. He
Steven D'Aprano writes:
> It didn't take me long to get used to thinking in zero-based indexes,
> but years later, I still find it hard to *talk* in zero-based indexes.
> It's bad enough saying that the first element in a list in the zeroth
> element, but that the second element is the first make
On 8/7/2010 2:01 PM, Michael Torrie wrote:
On 08/07/2010 01:17 PM, W. eWatson wrote:
Presumably I have him somehow delete the numpy site-package, the numpy
1.2.0 package? Just drill his way dow from the .../lib/site_packages?
Then install 1.2.0. He's missed the boat on that before by not followi
On Sat, Aug 7, 2010 at 4:06 PM, Hexamorph wrote:
> rantingrick wrote:
>
>> Well not if you are referring to how people "say" things. But what
>> people "say" and the facts of reality are some times two different
>> things. Heck we even have a few folks in this group who overuse the
>> expression "
Peter Pearson writes:
> Hey, that's a cute example, but . . . what a trap! Is it possible to
> document the use-the-object-not-the-string requirement loudly enough
> that people won't get caught?
Don't use strings for such values. The data isn't going to be used, so
there's no sense using a sema
rantingrick wrote:
Well not if you are referring to how people "say" things. But what
people "say" and the facts of reality are some times two different
things. Heck we even have a few folks in this group who overuse the
expression "used to" quite frequently in place of the more correct
term "pr
rantingrick wrote:
On Aug 7, 9:10 am, Steven D'Aprano wrote:
On Sat, 07 Aug 2010 08:54:28 -0400, D'Arcy J.M. Cain wrote:
On Sat, 07 Aug 2010 13:48:32 +0200
News123 wrote:
It makes sense in assembly language and even in many byte code
languages. It makes sense if you look at the internal repr
Albert van der Horst writes:
> We had a similar discussion on comp.lang.forth.
Heh, fancy meeting you here ;-)
> The bottom line is that to implement a programming language
> you want to use a simpler programming language, not a more
> complicated one.
Nah, gas is written in C, and nobody impl
On Aug 7, 9:10 am, Steven D'Aprano wrote:
> On Sat, 07 Aug 2010 08:54:28 -0400, D'Arcy J.M. Cain wrote:
> > On Sat, 07 Aug 2010 13:48:32 +0200
> > News123 wrote:
> >> It makes sense in assembly language and even in many byte code
> >> languages. It makes sense if you look at the internal represen
In article ,
Louis Theran wrote:
>
>Is there a standard recipe for getting distutils to built universal .so
>files for modules that have C/C++ source?
You should check the archives of
http://mail.python.org/mailman/listinfo/pythonmac-sig
--
Aahz (a...@pythoncraft.com) <*> http
Roland Hedberg, 30.07.2010 15:21:
I have the following XML snippet:
http://www.w3.org/2001/XMLSchema-instance";
xmlns:fed="http://docs.oasis-open.org/wsfed/federation/200706";
xsi:type="fed:SecurityTokenServiceType">
This part after parsing with Elementtree gives me an Elem
Am 07.08.2010 23:01, schrieb Michael Torrie:
> On 08/07/2010 01:17 PM, W. eWatson wrote:
>> Presumably I have him somehow delete the numpy site-package, the numpy
>> 1.2.0 package? Just drill his way dow from the .../lib/site_packages?
>> Then install 1.2.0. He's missed the boat on that before by
On 08/07/2010 01:17 PM, W. eWatson wrote:
> Presumably I have him somehow delete the numpy site-package, the numpy
> 1.2.0 package? Just drill his way dow from the .../lib/site_packages?
> Then install 1.2.0. He's missed the boat on that before by not following
> instructions.
Wait. I'm confus
On 7 Αύγ, 22:52, Thomas Jollans wrote:
> On 08/07/2010 09:36 PM, Νίκος wrote:
>
> > cookie.has_key('visitor') != 'nikos'
>
> This is always True. has_key returns a bool, which is never equal to any
> string, even 'nikos'.
if cookie.has_key('visitor') or re.search('cyta', host) is None:
adresses
Thomas Jollans wrote:
On 08/07/2010 09:36 PM, Νίκος wrote:
cookie.has_key('visitor') != 'nikos'
This is always True. has_key returns a bool, which is never equal to any
string, even 'nikos'.
I missed that bit! :-)
Anyway, the OP said "the 'stuff' never gets executed". Kinda puzzling...
--
h
On Aug 7, 6:54 am, Albert van der Horst
wrote:
> In article <1pm7i7-473@satorlaser.homedns.org>,
> Ulrich Eckhardt wrote:
>
>
>
> >Steven D'Aprano wrote:
> >> Perhaps I have been misinformed, but my understanding of C type-casts is
> >> that (where possible), a cast like `int(var)` merely te
> As an example, my inexperienced Python partner 30 miles away has gotten
> out of step somehow. I think by installing a different version of numpy
> than I use. I gave him a program we both use months ago, and he had no
> trouble. (We both use IDLE on 2.5). I made a one character change to it
> an
On 08/07/2010 09:36 PM, Νίκος wrote:
> cookie.has_key('visitor') != 'nikos'
This is always True. has_key returns a bool, which is never equal to any
string, even 'nikos'.
--
http://mail.python.org/mailman/listinfo/python-list
On 7 Αύγ, 22:17, MRAB wrote:
> Νίκος wrote:
> > On 7 Αύγ, 21:24, MRAB wrote:
>
> >> Use group capture:
>
> >> found = re.match(r'', firstline).group(1)
> >> print(page_id)
>
> > Worked like a charm! Thanks a lot!
>
> > So match method here not only searched for the string representation
On 7 Αύγ, 22:07, MRAB wrote:
> re.search('cyta', host) will return None if there's no match, but you
> said "Yes it does contain it", so there _is_ a match, therefore:
>
> hostmatch is None
>
> is False.
The code block inside the if structure must be executes ONLY if the
'visitor' cookie is
On 8/6/2010 2:23 AM, Lawrence D'Oliveiro wrote:
In message, W. eWatson wrote:
I made a one character change to it and sent him the new py file. He can't
execute it.
What exactly was the problem?
I put a minus sign in front of a variable. I had him use the shell to
check his version numpy, w
On 8/7/2010 5:00 AM, Thomas Jollans wrote:
On 08/07/2010 05:05 AM, Default User wrote:
> From "the emperor's new clothes" department:
1) Why do Python lists start with element [0], instead of element [1]?
"Common sense" would seem to suggest that lists should start with [1].
As others have p
Νίκος wrote:
On 7 Αύγ, 21:24, MRAB wrote:
Use group capture:
found = re.match(r'', firstline).group(1)
print(page_id)
Worked like a charm! Thanks a lot!
So match method here not only searched for the string representation
of the number but also convert it to integer as well?
r s
Νίκος wrote:
On 7 Αύγ, 21:27, MRAB wrote:
Νίκος wrote:
i also dont know what wrong with this line:
host = socket.gethostbyaddr( os.environ['REMOTE_ADDR'] )[0]
hostmatch = re.search('cyta', host)
if cookie.has_key('visitor') != 'nikos' or hostmatch is None:
# do stuff
the 'stuff' never get
On 08/07/2010 08:51 PM, Νίκος wrote:
> On 7 Αύγ, 21:24, MRAB wrote:
>
>> Use group capture:
>>
>> found = re.match(r'', firstline).group(1)
>> print(page_id)
>
> Worked like a charm! Thanks a lot!
>
> So match method here not only searched for the string representation
> of the number
On Sat, Aug 7, 2010 at 5:04 AM, siva moorthy wrote:
> hi all,
> i wish to code for translation in python
>
> i want to parse a python program itself and make some keyword changes
> (replacement)
> tell me any library to parse python source code
Depending on you needs, one of:
http://docs.python.o
On 7 Αύγ, 21:24, MRAB wrote:
> Use group capture:
>
> found = re.match(r'', firstline).group(1)
> print(page_id)
Worked like a charm! Thanks a lot!
So match method here not only searched for the string representation
of the number but also convert it to integer as well?
r stand for r
On 7 Αύγ, 21:27, MRAB wrote:
> Νίκος wrote:
> > i also dont know what wrong with this line:
>
> > host = socket.gethostbyaddr( os.environ['REMOTE_ADDR'] )[0]
>
> > hostmatch = re.search('cyta', host)
>
> > if cookie.has_key('visitor') != 'nikos' or hostmatch is None:
> > # do stuff
>
> > the
Νίκος wrote:
i also dont know what wrong with this line:
host = socket.gethostbyaddr( os.environ['REMOTE_ADDR'] )[0]
hostmatch = re.search('cyta', host)
if cookie.has_key('visitor') != 'nikos' or hostmatch is None:
# do stuff
the 'stuff' never gets executed, while i ant them to be as lon
Νίκος wrote:
Hello guys! Need your precious help again!
In every html file i have in the very first line a page_id fro counetr
countign purpsoes like in a format of a comment like this:
and so on. every html file has its one page_id
How can i grab that string representaion of a number from
Peng Yu wrote:
Hi,
Suppose that I have strings like the following
test(a b)a b
test(xy uv)xy uv
...
I want to change them to
test(a)a test(b)b
test(xy)xy test(uv)uv
...
The problem is that I don't know how to capture pattern that repeat
itself (like 'a' and 'xy' in the example). I could use
Roald de Vries wrote:
Hi all,
I have a list that I'm iterating over, and during the iteration items
are appended. Moreover, it is iterated over in two nested loops. If the
inner loop comes to the end, I want the outer loop to append an item. Is
there a way to do this? Because once an iterato
Hi,
I'm using g?vim and its c-scope plugin for browsing C-code.
What would be a good way of navigating larger python projects with vim?
thanks for any suggestions
--
http://mail.python.org/mailman/listinfo/python-list
>>> Does any one about any implementation of classical Smith Waterman
>>> local alignment algorithm and it's variants for aligning natural
>>> language text?
>>>
>>
>> Please see http://tinyurl.com/2wy43fh
>>
>>
> Every one of the first 20 entries is either the OP questions or your reply.
And you
i also dont know what wrong with this line:
host = socket.gethostbyaddr( os.environ['REMOTE_ADDR'] )[0]
hostmatch = re.search('cyta', host)
if cookie.has_key('visitor') != 'nikos' or hostmatch is None:
# do stuff
the 'stuff' never gets executed, while i ant them to be as long as i
dont hav
Hello guys! Need your precious help again!
In every html file i have in the very first line a page_id fro counetr
countign purpsoes like in a format of a comment like this:
and so on. every html file has its one page_id
How can i grab that string representaion of a number from inside
the .ht
On 08/07/10 01:45, Νικόλαος Κούρας wrote:
# variant B
for row in dataset:
host, hits, dt = row
# rest of your code here
So, row is a tuple comprising of 3 fields, and host, hist, dt
are variables assigned each one of row's tuple values by
breaking it to it's elements.
But what
In article <4c5178ae$0$11091$c3e8...@news.astraweb.com>,
Steven D'Aprano wrote:
>On Thu, 29 Jul 2010 14:42:58 +0200, Matteo Landi wrote:
>
>> This should be enough
>>
>import time
>tic = time.time()
>function()
>toc = time.time()
>print toc - tic
>
>You're typing that in the i
Hi All,
I need to store a large number of large objects to file and then
access them sequentially. I am talking about a few thousands of
objects and each with size of a few hundred kilobytes, and total file
size a few gigabytes. I tried shelve, but it is not good at
sequentially accessing the dat
On Aug 7, 4:48 pm, Peng Yu wrote:
> The problem is that I don't know how to capture pattern that repeat
> itself (like 'a' and 'xy' in the example). I could use 'test\((\w+)
> (\w+)\)(\w) (\w)', but it will capture something like 'test(a b)x y',
> which I don't want to.
>
> I'm wondering if there
On 8/6/2010 7:18 PM, Philip Semanchuk wrote:
On Aug 6, 2010, at 3:14 PM, W. eWatson wrote:
I must be missing something. I tried this. (Windows, IDLE, Python 2.5)
Yes, as Benjamin Kaplan pointed out and as I said in the email where I
posted this code snippet, "dependencies is a list of custom
Hi,
Suppose that I have strings like the following
test(a b)a b
test(xy uv)xy uv
...
I want to change them to
test(a)a test(b)b
test(xy)xy test(uv)uv
...
The problem is that I don't know how to capture pattern that repeat
itself (like 'a' and 'xy' in the example). I could use 'test\((\w+)
(\w
On Aug 7, 2010, at 5:24 PM, Nobody wrote:
On Sat, 07 Aug 2010 13:48:32 +0200, News123 wrote:
"Common sense" is wrong. There are many compelling advantages to
numbering from zero instead of one:
http://lambda-the-ultimate.org/node/1950
It makes sense in assembly language and even in many by
On Sat, 07 Aug 2010 13:48:32 +0200, News123 wrote:
>> "Common sense" is wrong. There are many compelling advantages to
>> numbering from zero instead of one:
>>
>> http://lambda-the-ultimate.org/node/1950
>
> It makes sense in assembly language and even in many byte code languages.
> It makes
On Sat, 07 Aug 2010 09:53:48 -0400, D'Arcy J.M. Cain wrote:
>> A new born baby is in his/her first year. It's year 1 of his/her life.
>> For this reason, also "the year 0" doesn't exist. From the fact that a
>> baby can be half a year old, you derive that arrays should have floats
>> as indi
On Fri, 06 Aug 2010 18:39:27 -0700, dmtr wrote:
> Steven, thank you for answering. See my comments inline. Perhaps I
> should have formulated my question a bit differently: Are there any
> *compact* high performance containers for unicode()/str() objects in
> Python? By *compact* I don't mean comp
In <4c5d4ad9$0$28666$c3e8...@news.astraweb.com> Steven D'Aprano
writes:
>On Sat, 07 Aug 2010 19:28:56 +1200, Gregory Ewing wrote:
>> Steven D'Aprano wrote:
>>> "No memory? No disk space? No problem! Just a flesh wound!" What's
>>> the point of that?
>>
>> +1 QOTW
>While I'm always happy to
On 08/07/2010 03:38 PM, Steven D'Aprano wrote:
> On Sat, 07 Aug 2010 14:00:59 +0200, Thomas Jollans wrote:
>
>> On 08/07/2010 05:05 AM, Default User wrote:
>>> >From "the emperor's new clothes" department:
>>>
>>> 1) Why do Python lists start with element [0], instead of element [1]?
>>> "Common
On Sat, 07 Aug 2010 08:54:28 -0400, D'Arcy J.M. Cain wrote:
> On Sat, 07 Aug 2010 13:48:32 +0200
> News123 wrote:
>> It makes sense in assembly language and even in many byte code
>> languages. It makes sense if you look at the internal representation of
>> unsigned numbers (which might become an
In article ,
Roy Smith wrote:
>In article ,
> Lawrence D'Oliveiro wrote:
>
>> In message , Roy Smith wrote:
>>
>> > C++, for all its flaws, had one powerful feature which made it very
>> > popular. It is a superset of C.
>>
>> Actually, it never was.
>
>Yes, there are a few corner cases where v
In article ,
Roy Smith wrote:
>In article <4c55fe82$0$9111$426a3...@news.free.fr>,
> candide wrote:
>
>> Python is an object oriented langage (OOL). The Python main
>> implementation is written in pure and "old" C90. Is it for historical
>> reasons?
>>
>> C is not an OOL and C++ strongly is. I w
On Aug 7, 2010, at 3:53 PM, D'Arcy J.M. Cain wrote:
On Sat, 7 Aug 2010 15:37:23 +0200
Roald de Vries wrote:
Would said beginner also be surprised that a newborn baby is zero
years
old or would it be more natural to call them a one year old? Zero
based counting is perfectly natural.
A new bor
Hi all,
I have a list that I'm iterating over, and during the iteration items
are appended. Moreover, it is iterated over in two nested loops. If
the inner loop comes to the end, I want the outer loop to append an
item. Is there a way to do this? Because once an iterator has raised a
Sto
On Sat, 7 Aug 2010 15:37:23 +0200
Roald de Vries wrote:
> > Would said beginner also be surprised that a newborn baby is zero
> > years
> > old or would it be more natural to call them a one year old? Zero
> > based counting is perfectly natural.
>
> A new born baby is in his/her first year. I
On Sat, 07 Aug 2010 14:00:59 +0200, Thomas Jollans wrote:
> On 08/07/2010 05:05 AM, Default User wrote:
>>>From "the emperor's new clothes" department:
>>
>> 1) Why do Python lists start with element [0], instead of element [1]?
>> "Common sense" would seem to suggest that lists should start wit
On Aug 7, 2010, at 2:54 PM, D'Arcy J.M. Cain wrote:
On Sat, 07 Aug 2010 13:48:32 +0200
News123 wrote:
It makes sense in assembly language and even in many byte code
languages.
It makes sense if you look at the internal representation of unsigned
numbers (which might become an index)
For a co
In article <1pm7i7-473@satorlaser.homedns.org>,
Ulrich Eckhardt wrote:
>Steven D'Aprano wrote:
>> Perhaps I have been misinformed, but my understanding of C type-casts is
>> that (where possible), a cast like `int(var)` merely tells the compiler
>> to temporarily disregard the type of var and
Ian wrote:
> On 06/08/2010 17:54, Daniel Fetchinson wrote:
>>> Does any one about any implementation of classical Smith Waterman
>>> local alignment algorithm and it's variants for aligning natural
>>> language text?
>>>
>>
>> Please see http://tinyurl.com/2wy43fh
>>
>>
> Every one of th
On Sat, 07 Aug 2010 13:48:32 +0200
News123 wrote:
> It makes sense in assembly language and even in many byte code languages.
> It makes sense if you look at the internal representation of unsigned
> numbers (which might become an index)
>
> For a complete beginner common sense dictates different
On 06/08/2010 17:54, Daniel Fetchinson wrote:
Does any one about any implementation of classical Smith Waterman
local alignment algorithm and it's variants for aligning natural
language text?
Please see http://tinyurl.com/2wy43fh
Every one of the first 20 entries is either the OP qu
On 08/07/2010 09:44 AM, Gabriel Genellina wrote:
> En Sat, 07 Aug 2010 04:04:06 -0300, Stefan Schwarzer
> escribió:
>> On 2010-08-07 00:28, Steven D'Aprano wrote:
>
>>> Actually, yes, equality is implemented with a short-cut
> that checks for
>>> identity first. That makes something like:
>>> [..
On Sat, 07 Aug 2010 14:28:19 +1000, Ben Finney wrote:
> Steven D'Aprano writes:
>
>> On Thu, 05 Aug 2010 12:07:53 -0400, wheres pythonmonks wrote:
>>
>> > P.S. Sorry for the top-post -- is there a way to not do top posts
>> > from gmail? I haven't used usenet since tin.
>>
>> Er, surely you can
hi all,
i wish to code for translation in python
i want to parse a python program itself and make some keyword changes
(replacement)
tell me any library to parse python source code and another library to
change some words phonetically to other language
thanks in advance
Siva
--
http://mail.py
On 08/07/2010 05:05 AM, Default User wrote:
>>From "the emperor's new clothes" department:
>
> 1) Why do Python lists start with element [0], instead of element [1]?
> "Common sense" would seem to suggest that lists should start with [1].
As others have pointed out, there is a nice argument to
Tim Chase wrote:
> On 08/06/10 15:37, James Mills wrote:
>> On Sat, Aug 7, 2010 at 6:28 AM, geremy condra wrote:
>>> If I had to wait 5 minutes while a candidate tried to solve this
>>> problem I would not hire them.
>>
>> Yes you do raise a valid point. It should really only take
>> you a mere f
On 08/07/2010 05:36 AM, Ryan Kelly wrote:
> On Fri, 2010-08-06 at 22:05 -0500, Default User wrote:
>> >From "the emperor's new clothes" department:
>>
>> 1) Why do Python lists start with element [0], instead of element
>> [1]? "Common sense" would seem to suggest that lists should start
>> with
On 08/07/2010 01:10 PM, Shambhu Sharma wrote:
> Hi,
>
> I am new to Python. I was trying to use os.unlink function in
> windows. But i am getting error:
> OSError: [Errno 2] No such file or directory:
> 'C:\\SHAMBHU\\tmp\\text_delete.txt'
>
> Input file to os.unlink is: 'C:\SHAMBHU\tmp\te
On Aug 7, 2010, at 1:30 AM, Dennis Lee Bieber wrote:
> On Fri, 06 Aug 2010 22:37:26 -0500, Chris Hare
> declaimed the following in gmane.comp.python.general:
>
>
>>print str(s.queue())
>>
> I don't find a queue method defined for scheduler objects in the
> documentation for my vers
Hi,
I am new to Python. I was trying to use os.unlink function in
windows. But i am getting error:
OSError: [Errno 2] No such file or directory:
'C:\\SHAMBHU\\tmp\\text_delete.txt'
Input file to os.unlink is: 'C:\SHAMBHU\tmp\text_delete.txt'. But os.unlink
is adding extra backslash with p
Hi,
On Aug 5, 9:32 pm, Nobody wrote:
> errtype = CFUNCTYPE(c_int, POINTER(c_char), POINTER(c_int))
> errfunc = errtype(print_error)
> G_set_error_routine(errfunc)
the problem occurs when restype is not None, but c_int. E.g.
if hasattr(_libs['grass_gis'], 'G_set_error_rou
On 2010-07-31 05:47, Steven D'Aprano wrote:
> On Fri, 30 Jul 2010 08:34:52 -0400, wheres pythonmonks wrote:
> It does re-use the same underlying data.
>
> >>> from collections import defaultdict as dd
> >>> x = dd(list)
> >>> x[1].append(1)
> >>> x
> defaultdict(, {1: [1]})
> >>> y = dict(x)
> >>>
On Sat, Aug 7, 2010 at 12:32, Sohail wrote:
> Hi,
>
> Is there any sequence matching library in (apart from difflib) to
> compare sequences of natural text?
>
> thanks
> --
> http://mail.python.org/mailman/listinfo/python-list
>
Are you aware of NLTK? It has a lot of sub-libraries for almost any
DarkBlue wrote:
On Aug 5, 7:06 pm, Chris Withers wrote:
Peter Otten wrote:
locale.setlocale(locale.LC_ALL, ("en_US", "UTF-8"))
'en_US.UTF8'
print locale.currency(13535, grouping=True)
$13,535.00
Okay, so if I'm writing a wsgi app, and I want to format depending on
the choices of the curren
On Aug 7, 2010, at 5:46 AM, Vito 'ZeD' De Tullio wrote:
Default User wrote:
From "the emperor's new clothes" department:
1) Why do Python lists start with element [0], instead of element
[1]?
"Common sense" would seem to suggest that lists should start with
[1].
http://userweb.cs.utexa
On Aug 5, 12:33 pm, John Nagle wrote:
> There's got to be a better way to do this:
>
> def editmoney(n) :
> return((",".join(reduce(lambda lst, item : (lst + [item]) if
> item else lst,
> re.split(r'(\d\d\d)',str(n)[::-1]),[])))[::-1])
>
> >>> editmoney(0)
> '0'
> >>> edit
Hi,
Is there any sequence matching library in (apart from difflib) to
compare sequences of natural text?
thanks
--
http://mail.python.org/mailman/listinfo/python-list
>
> Is the file, which you claim is UTF-8 encoded, actually UTF-8 encoded?
> If you're not sure, explicitly tell your text editor to save the file as
> UTF-8, and then try again.
I feel like an idiot... haven't used Python for some time... my editor was
set for utf-8 on PHP projects and other...
I guess with the actual dataset I'll be able to improve the memory
usage a bit, with BioPython::trie. That would probably be enough
optimization to continue working with some comfort. On this test code
BioPython::trie gives a bit of improvement in terms of memory. Not
much though...
>>> d = dict()
1 - 100 of 110 matches
Mail list logo