sorry keep bugging you guys, but this is somehow a wield problem that
I am eager to solve.
I checked the permission and it looks fine to me:
lrwxrwxrwx 1 root root 26 Nov 28 04:06 /usr/lib/libgtk-x11-2.0.so.0
-> libgtk-x11-2.0.so.0.400.13
-rwxr-xr-x 1 root root 2862900 Oct 15 14:23
/usr/lib/l
I wrote a function with a list as its parameter. And the function has
to perform different operations based on the datatypes of the elements.
How can I decide whether an object is, say, a list or a string?
Thanks.
--
http://mail.python.org/mailman/listinfo/python-list
That helps. Thank you guys.
--
http://mail.python.org/mailman/listinfo/python-list
I use a HTTP proxy to connect to Internet. When I run ulropen command I
get HTTP Error 407: Proxy authorization required. Could anybody tell me
how to resolve this? Thanks!
--
http://mail.python.org/mailman/listinfo/python-list
I wanna use nested lists as an array, but here's the problem:
>>> a = [[0]*3]*3
>>> a
[[0, 0, 0], [0, 0, 0], [0, 0, 0]]
>>> a[0][0] = 1
>>> a
[[1, 0, 0], [1, 0, 0], [1, 0, 0]]
Could anybody please explain to me why three values were change? I'm
bewildered. Thanks!
--
http://mail.python.org/mail
Dennis Lee Bieber wrote:
> On 26 Apr 2006 01:13:20 -0700, "Licheng Fang" <[EMAIL PROTECTED]>
> declaimed the following in comp.lang.python:
>
>
> >
> > Could anybody please explain to me why three values were change? I'm
> > bewildered. Thank
Hi,
I am writing code to sort the columns according to the sum of each
column. The dataset is huge (50k rows x 300k cols), so i need to read
line by line and do the summation to avoid the out-of-memory problem.
But I don't know why it runs very slow, and part of the code is as
follows. I suspect i
Hi will,Thanks for your reply. The simplified code is as follows, and
you can run it if you like. It takes 7 seconds to process 1000 rows,
which is tolerable, but I wonder why it takes so long, because I also
did one for loop through all of the same rows without accessing array,
which only takes 1
Hi, I'm learning STL and I wrote some simple code to compare the
efficiency of python and STL.
//C++
#include
#include
#include
#include
#include
using namespace std;
int main(){
vector a;
for (long int i=0; i<1 ; ++i){
a.push_back("What do you know?");
Marc 'BlackJack' Rintsch wrote:
> In <[EMAIL PROTECTED]>, Licheng Fang
> wrote:
>
> > Hi, I'm learning STL and I wrote some simple code to compare the
> > efficiency of python and STL.
> >
> > //C++
> > #include
> > #include
MrBlueSky wrote:
> I wonder if someone could clarify how Python "knows" where modules are
> - or at least point to some documentation that might help me? Here's
> what I've been trying:
>
> I've installed Python 2.4 Windows, and have also installed tkinter,
> pmw, cx_Oracle, mssql and pytz (phew!
Basically, the problem is this:
>>> p = re.compile("do|dolittle")
>>> p.match("dolittle").group()
'do'
Python's NFA regexp engine trys only the first option, and happily
rests on that. There's another example:
>>> p = re.compile("one(self)?(selfsufficient)?")
>>> p.match("oneselfsufficient").gro
MonkeeSage wrote:
> Licheng Fang wrote:
> > Basically, the problem is this:
> >
> > >>> p = re.compile("do|dolittle")
> > >>> p.match("dolittle").group()
> > 'do'
>
> >From what I understand, this isn'
Oh, please do have a look at the second link I've posted. There's a
table comparing the regexp engines. The engines you've tested probably
all use an NFA implementation.
MonkeeSage wrote:
> Licheng Fang wrote:
> > Hi, according to these regexp engine discussions, it'
Thank you very much, Tim and Monkee.
In fact, what I'm doing is handle a lot of regular expressions. I
wanted to build VERY LONG regexps part by part and put them all into a
file for easy modification and maintenance. The idea is like this:
(*INT) = \d+
(*DECIMAL) = (*INT)\.(*INT)
(*FACTION) = (*
Bryan Olson wrote:
> Licheng Fang wrote:
> > Oh, please do have a look at the second link I've posted. There's a
> > table comparing the regexp engines. The engines you've tested probably
> > all use an NFA implementation.
>
> Unfortunately, the stuff a
[EMAIL PROTECTED] wrote:
> kondal wrote:
>
> > This is the way the regexp works python doesn't has anything to do with
> > it. It starts parsing the data with the pattern given. It returns the
> > matched string acording the pattern and doesn't go back to find the
> > other combinations.
>
> I've
Thank you guys. I've written a CYK parser and realized this is the
right direction. It gives every possible interpretation of the string
and I can retrieve whatever I want.
--
http://mail.python.org/mailman/listinfo/python-list
18 matches
Mail list logo