Re: can python do some kernel stuff?

2008-05-23 Thread Diez B. Roggisch
Jimmy schrieb: On May 23, 11:14 pm, Jimmy <[EMAIL PROTECTED]> wrote: On May 23, 5:53 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: Jimmy schrieb: On May 23, 3:05 pm, Andrew Lee <[EMAIL PROTECTED]> wrote: Jimmy wrote: Hi to all python now has grown to a versatile language that can acco

Re: call f(a, *b) with f(*a, **b) ?

2008-05-23 Thread bukzor
On May 23, 3:29 am, "inhahe" <[EMAIL PROTECTED]> wrote: > "inhahe" <[EMAIL PROTECTED]> wrote in message > > news:[EMAIL PROTECTED] > > > if we assume the constraints are that: > > 1.he has list, l > > 2.he has a dictionary, d > > 3.he wants the function to print the values in the dictionary accordi

webspider, regexp not working, why?

2008-05-23 Thread notnorwegian
url = re.compile(r"^((ht|f)tp(s?)\:\/\/|~/|/)?([\w]+:\w+@)?([a-zA-Z] {1} ([\w\-]+\.)+ ([\w]{2,5}))(:[\d]{1,5})?((/?\w+/)+|/?)(\w+\.[\w]{3,4})?((\?\w+=\w+)? (& \w+=\w+)*)?") why isnt this url catching something like: http://www.showmedo.com/latestVideoFeed/rss2.0? tag=python" /> site = urllib.url

Re: Another Question

2008-05-23 Thread Gandalf
On May 23, 6:25 pm, Mike Driscoll <[EMAIL PROTECTED]> wrote: > On May 23, 10:45 am, Gandalf <[EMAIL PROTECTED]> wrote: > > > How can i bind function that handle the mouse clicking window X event > > or clicking alt+F4 > > > thanks > > You really need to learn to ask good questions. Unless people d

Re: Shell-independent *nix setup script

2008-05-23 Thread scott . hafeman
On May 22, 5:29 pm, brad <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > Hi, > > Is it worthwhile maintaining a production application setup script in > > Python as opposed to shell-script?   > > I do not think so. Perhaps 'in conjunction with', but not 'opposed > to'... sh is the lowest

array of 64-bit ints?

2008-05-23 Thread Stephen Vavasis
Is it possible to have an array of 64-bit-ints using the standard Python array module? On my 64-bit architecture (AMD64, MSVC), both "int" and "long int" are 32 bit integers. To declare 64-bit ints, one needs either "long long int" or "size_t". However, according to the Python array document

Re: Another Question

2008-05-23 Thread Mike Driscoll
On May 23, 12:02 pm, Gandalf <[EMAIL PROTECTED]> wrote: > On May 23, 6:25 pm, Mike Driscoll <[EMAIL PROTECTED]> wrote: > > > > > On May 23, 10:45 am, Gandalf <[EMAIL PROTECTED]> wrote: > > > > How can i bind function that handle the mouse clicking  window X event > > > or clicking alt+F4 > > > > th

Re: Relationship between GUI and logic?

2008-05-23 Thread Matthew Woodcraft
John Salerno <[EMAIL PROTECTED]> wrote: > Basically, the question is this: can you write the logic behind a > program (whether it be a game, an email client, a text editor, etc.) > without having any idea of how you will implement the GUI? You probably could, but it's best not to unless you're

RE: webspider, regexp not working, why?

2008-05-23 Thread Reedick, Andrew
> -Original Message- > From: [EMAIL PROTECTED] [mailto:python- > [EMAIL PROTECTED] On Behalf Of > [EMAIL PROTECTED] > Sent: Friday, May 23, 2008 12:43 PM > To: python-list@python.org > Subject: webspider, regexp not working, why? > > url = re.compile(r"^((ht|f)tp(s?)\:\/\/|~/|/)?([\w]+:\

Re: array of 64-bit ints?

2008-05-23 Thread Martin v. Löwis
> Is it possible to have an array of 64-bit-ints using the standard Python > array module? On my 64-bit architecture (AMD64, MSVC), both "int" and > "long int" are 32 bit integers. To declare 64-bit ints, one needs either > "long long int" or "size_t". However, according to the Python array

Re: Database Query Contains Old Data

2008-05-23 Thread Paul Boddie
On 23 Mai, 17:18, John Nagle <[EMAIL PROTECTED]> wrote: > > Exactly. Although it seems counterintutive, it's not enough > to do a COMMIT after UPDATE and INSERT operations. You also have to > do a COMMIT after a SELECT if you're going to reuse the database handle > and do another SELECT. Ot

Re: Python is slow

2008-05-23 Thread Aaron Lance
Troll much? -- http://mail.python.org/mailman/listinfo/python-list

Re: Segmentation fault on updating a BYTEA field [psycopg2]

2008-05-23 Thread George Sakkis
On May 21, 6:32 pm, George Sakkis <[EMAIL PROTECTED]> wrote: > I have a simple DB table that stores md5 signature pairs: > >Table "public.duplicate" > Column | Type | Modifiers > --+---+--- > sig | bytea | not null > orig_sig | bytea | not null > Indexes: > "

Re: How to print a sorted list as a multi-column table

2008-05-23 Thread Mensanator
On May 23, 10:30 am, Sverker Nilsson <[EMAIL PROTECTED]> wrote: > Hi all, > > I would like to ask about opinions about the best way to format sorted > tables of items for interactive use. I have begun to add interactive > help to Guppy/Heapy (http://guppy-pe.sourceforge.net) because it lacks > the

Re: Python is slow

2008-05-23 Thread Andrii V. Mishkovskyi
2008/5/22 cm_gui <[EMAIL PROTECTED]>: > Python is slow.Almost all of the web applications written in > Python are slow. Zope/Plone is slow, sloow, so very slooow. Even > Google Apps is not faster. Neither is Youtube. > Facebook and Wikipedia (Mediawiki), written in PHP, are so much faster

Re: Using MySQLdb to select into the local file

2008-05-23 Thread Nikhil
John Nagle wrote: Nikhil wrote: I am using the MySQLdb python module. I have a table named 'testing' with few columns, under the 'test' database, what is hosted on a remote mysql server. I want to run the following query to get a comma-separated information from the table LOCK TABLES foo

Re: can python do some kernel stuff?

2008-05-23 Thread Jimmy
On May 24, 12:34 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > Jimmy schrieb: > > > > > On May 23, 11:14 pm, Jimmy <[EMAIL PROTECTED]> wrote: > >> On May 23, 5:53 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > > >>> Jimmy schrieb: > On May 23, 3:05 pm, Andrew Lee <[EMAIL PROTECTED]>

Re: Why is math.pi slightly wrong?

2008-05-23 Thread Mensanator
On May 23, 12:39 am, Andrew Lee <[EMAIL PROTECTED]> wrote: > Mensanator wrote: > > On May 22, 11:32 am, "Dutton, Sam" <[EMAIL PROTECTED]> wrote: > >> I've noticed that the value of math.pi -- just entering it at the > >> interactive prompt -- is returned as 3.1415926535897931, whereas (as every >

Re: Another Question

2008-05-23 Thread Gandalf
you've been very helpful but still i have only one problem. I wont the window not to be close after clicking the X button. I wont the program to stay on the toolbar thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: Python is slow

2008-05-23 Thread M�ta-MCI (MVP)
Bonsoir ! Perso, je pense que des précisions comme celles de Bruno sont très utiles, car elles évitent les dérives, et l'apparition de langages bâtards, et impurs (pythonesquement parlant). Non aux Pythons OGM !!! Toutefois, iles est dommage que je comprenne pas l'anglais, et donc pas

Python database 'frontends', what's available?

2008-05-23 Thread tinnews
I'm desperately trying to move a Microsoft Access database application (a simple accounts system I wrote myself) to Linux. Python is one of my preferred programming laguages so I wonder if there are any good Python 'frameworks' for writing database applications, in particular I need good reporting

function returns , but variable values has not changed in the interactive prompt

2008-05-23 Thread davidj411
if you run execfile function to run a python script and that script has variables and functions, should't those variable change in the interactive prompt too? script snippet that calls the function which should return like this return (stuffedname,bigstring, numbertimes,num_times_search_st

matploblib communication problem, graphics question

2008-05-23 Thread _wolf
i've had a hard time today to drill down on some infos about matplotlib of http://matplotlib.sourceforge.net/. this is an sf.net-managed project, its mailing lists are managed by gnu mailman in a pre-1994 version. still there is a sf.net standard forum interface, which however denies me to post.

Re: Decorator metaclass

2008-05-23 Thread Carl Banks
On May 23, 11:42 am, Thomas Karolski <[EMAIL PROTECTED]> wrote: > > You will note that Decorator does not define __init__. In fact, > > object.__init__ will be called, which does nothing. If you think that > > all classes with DecoratorType as their metaclass will be a direct > > subclass of Dec

Re: Decorator metaclass

2008-05-23 Thread Thomas Karolski
Turns out the first msg I sent did not reach the list, so I'll just post what I've achieved by now: -- class DecoratorDummy(object): pass class InheritedDecoratorType(type): def __new__(cls, name, bases, dct): # return if its a clas

Re: call f(a, *b) with f(*a, **b) ?

2008-05-23 Thread inhahe
" I wish this worked: >>> def main(a,b,*argv): pass >>> options['argv'] = argv >>> main(**options) TypeError: main() got an unexpected keyword argument 'argv' " - I was thinking about that exact same thing actually. Except that I was thinking you might want it like this, otherwise it could be

Reloading function obtained via 'from xxx import yyy'

2008-05-23 Thread Joel Koltner
How do I get Python to correctly re-load this function definition? In test.py: def testFunc(): print 'My testFunc!' I execute... >>> from test import testFunc >>> testFunc() My testFunc! Fine... now I change test.py to: def testFunc(): print 'Modified testFunc!' ...and I'd like to re

Re: can python do some kernel stuff?

2008-05-23 Thread Ivan Illarionov
On 23 май, 22:32, Jimmy <[EMAIL PROTECTED]> wrote: [...] > however, how can I just simply know a key is pressed? If you are on Linux, use XLib http://python-xlib.sourceforge.net/ You need to catch the KeyPress or KeyRelease X events. while 1: ev = display.next_event() if ev.type == X.KeyP

Re: Why is math.pi slightly wrong?

2008-05-23 Thread inhahe
""" "Dutton, Sam" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Thanks for all the answers and comments. >math.pi is exactly equal to 884279719003555/281474976710656, which is the >closest C double to the actual value of pi So much for poor old 22/7... Sam """ The biblically cor

Re: Python is slow

2008-05-23 Thread inhahe
"Paul Rubin" wrote in message news:[EMAIL PROTECTED] > "inhahe" <[EMAIL PROTECTED]> writes: >> planets are spherical (all implementations of Python are not natively >> compiled (and you said for whatever definition)), and b) It's a far cry >> to >> imagine a planet com

Re: Reloading function obtained via 'from xxx import yyy'

2008-05-23 Thread Martin v. Löwis
> ...and I'd like to reload testFunc. How do I do so? 'from test import > testFunc' keeps the old definition around, and 'reload test' of course > doesn't > work becayse I didn't use 'import test' in the first place. Try all three of them, in sequence: import test reload(test) from test impo

Re: call f(a, *b) with f(*a, **b) ?

2008-05-23 Thread bukzor
On May 23, 12:35 pm, "inhahe" <[EMAIL PROTECTED]> wrote: > " > I wish this worked:>>> def main(a,b,*argv): pass > >>> options['argv'] = argv > >>> main(**options) > > TypeError: main() got an unexpected keyword argument 'argv' > " > - > I was thinking about that exact same thing actually. Exce

Re: Advice from senior Members

2008-05-23 Thread Nick Craig-Wood
flit <[EMAIL PROTECTED]> wrote: > I am looking for some experience from the senior members. > Now I am doing a simple desktop application, this application will > have 3 main functions: > > 1- Read information about the desktop system; > 2- Interact with the user; > 3- Send information to a

Re: array of 64-bit ints?

2008-05-23 Thread Nick Craig-Wood
Martin v. L?wis <[EMAIL PROTECTED]> wrote: > > Is it possible to have an array of 64-bit-ints using the standard Python > > array module? On my 64-bit architecture (AMD64, MSVC), both "int" and > > "long int" are 32 bit integers. To declare 64-bit ints, one needs either > > "long long int" or

Re: Reloading function obtained via 'from xxx import yyy'

2008-05-23 Thread [EMAIL PROTECTED]
On 23 mai, 21:40, "Joel Koltner" <[EMAIL PROTECTED]> wrote: > How do I get Python to correctly re-load this function definition? > > In test.py: > > def testFunc(): > print 'My testFunc!' > > I execute... > > >>> from test import testFunc > >>> testFunc() > > My testFunc! > > Fine... now I chan

csv iterator question

2008-05-23 Thread davidj411
When you save an open file to a variable, you can re-use that variable for membership checking. it does not seem to be that way with the csv.reader function, even when set to a variable name. what is the best way to store the open CSV file in memory or do i need to open the file each time? exampl

Re: Another Question

2008-05-23 Thread Mike Driscoll
On May 23, 1:44 pm, Gandalf <[EMAIL PROTECTED]> wrote: > you've been very helpful but still i have only one problem. I wont the > window not to be close after clicking the X button. > I wont the program to stay on the toolbar > > thanks! Well then, in your event handler, just don't do anything. d

Re: csv iterator question

2008-05-23 Thread Mike Driscoll
On May 23, 3:36 pm, davidj411 <[EMAIL PROTECTED]> wrote: > When you save an open file to a variable, you can re-use that variable > for membership checking. > it does not seem to be that way with the csv.reader function, even > when set to a variable name. > > what is the best way to store the open

Re: Python database 'frontends', what's available?

2008-05-23 Thread Mike Driscoll
On May 23, 1:59 pm, [EMAIL PROTECTED] wrote: > I'm desperately trying to move a Microsoft Access database application > (a simple accounts system I wrote myself) to Linux.  Python is one of > my preferred programming laguages so I wonder if there are any good > Python 'frameworks' for writing datab

Re: Python is slow

2008-05-23 Thread [EMAIL PROTECTED]
On 23 mai, 10:42, "inhahe" <[EMAIL PROTECTED]> wrote: > "Bruno Desthuilliers" <[EMAIL PROTECTED]> wrote in > messagenews:[EMAIL PROTECTED] > > > Brad a écrit : > >> cm_gui wrote: > >>> Python is slow. > > >> It ain't C++, but it ain't a punch card either... somewhere in between. I > >> find it sui

Storing objects in relational database

2008-05-23 Thread nayden
I started playing with python a few weeks ago after a number of years of perl programming and I can say that my first impression is, unsurprisingly, quite positive. ;) The reason I am writing here is that I can't seem to figure out how to save/restore python objects into a relational database. The

Re: Python database 'frontends', what's available?

2008-05-23 Thread Matimus
On May 23, 11:59 am, [EMAIL PROTECTED] wrote: > I'm desperately trying to move a Microsoft Access database application > (a simple accounts system I wrote myself) to Linux. Python is one of > my preferred programming laguages so I wonder if there are any good > Python 'frameworks' for writing data

Re: Storing objects in relational database

2008-05-23 Thread nayden
and then I try to restore the object with the following code def success(rv): print "success" str = cStringIO.StringIO(libpq.PgUnQuoteBytea(rv[0][0])) i = cPickle.load(str) i.toString() the execution fails just after the print statement, and I am not quite sure why is that. I wo

Re: Storing objects in relational database

2008-05-23 Thread [EMAIL PROTECTED]
On 23 mai, 23:14, nayden <[EMAIL PROTECTED]> wrote: > and then I try to restore the object with the following code > > def success(rv): > print "success" > str = cStringIO.StringIO(libpq.PgUnQuoteBytea(rv[0][0])) > i = cPickle.load(str) > i.toString() > > the execution fails just a

Re: csv iterator question

2008-05-23 Thread Ethan Furman
davidj411 wrote: When you save an open file to a variable, you can re-use that variable for membership checking. it does not seem to be that way with the csv.reader function, even when set to a variable name. what is the best way to store the open CSV file in memory or do i need to open the fil

Re: csv iterator question

2008-05-23 Thread Marc 'BlackJack' Rintsch
On Fri, 23 May 2008 13:36:55 -0700, davidj411 wrote: > example of open method on file object: > fhandle=open(filename).readelines() Here the name `fhandle` is somewhat misleading. You don't bind the file object to that name, but the result of the call of the `readlines()` method. Which is a lis

Re: Reloading function obtained via 'from xxx import yyy'

2008-05-23 Thread Joel Koltner
""Martin v. Löwis"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Try all three of them, in sequence: Thanks, will do. > If you absolutely don't want to import test, write I can live with the import, I just don't want to have to type out the full names all the time. ---Joel

Assignment and comparison in one statement

2008-05-23 Thread Johannes Bauer
Hello group, I'm just starting with Python and am extremely unexperienced with it so far. Having a strong C/C++ background, I wish to do something like if (q = getchar()) { printf("%d\n", q); } or translated to Python: if (p = myfunction()): print p However, this "assignment

Re: ctypes help

2008-05-23 Thread gianluca
On 23 Mag, 12:30, Nick Craig-Wood <[EMAIL PROTECTED]> wrote: > gianluca <[EMAIL PROTECTED]> wrote: > > On 23 Mag, 07:48, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > > > On Thu, 22 May 2008 21:55:41 -0700, gianluca wrote: > > > > Yes, I know it but when I load a function (a=myDLL.myFUNCT(

would this be called bug?

2008-05-23 Thread Amit Gupta
The code is attached below. Basically I am taking a substring of variable m, and using "buffer" instead of slicing. However, the application of int on that buffer start correctly from the offset, but it scans all the way to the end, instead of stopping at the length of the buffer. It works howeve

Re: Assignment and comparison in one statement

2008-05-23 Thread Carl Banks
On May 23, 6:59 pm, Johannes Bauer <[EMAIL PROTECTED]> wrote: > Hello group, > > I'm just starting with Python and am extremely unexperienced with it so > far. Having a strong C/C++ background, I wish to do something like > > if (q = getchar()) { > printf("%d\n", q); > > } > > or translated

Re: Assignment and comparison in one statement

2008-05-23 Thread George Sakkis
On May 23, 6:59 pm, Johannes Bauer <[EMAIL PROTECTED]> wrote: > Hello group, > > I'm just starting with Python and am extremely unexperienced with it so > far. Having a strong C/C++ background, I wish to do something like > > if (q = getchar()) { >         printf("%d\n", q); > > } > > or translated

Unhandled exceptions checking

2008-05-23 Thread Yosifov Pavel
Does somebody know existent tool for checking unhandled exceptions? Like in Java when method throws exception but in code using this method, try...catch is missed. May be something like PyChecker? -- /Pavel -- http://mail.python.org/mailman/listinfo/python-list

Re: csv iterator question

2008-05-23 Thread alex23
On May 24, 6:36 am, davidj411 <[EMAIL PROTECTED]> wrote: > but when i try to iterate through it again, it appears to print > nothing (no error either). the file is exhausted? No, the iterator is finished. Iterators are generally use-once: "The intention of the protocol is that once an iterator's

Re: Storing objects in relational database

2008-05-23 Thread alex23
On May 24, 7:14 am, nayden <[EMAIL PROTECTED]> wrote: > the execution fails just after the print statement, and I am not quite > sure why is that. It's often helpful to include the traceback, or at the very least the last 3-4 lines of it, as it helps everyone work out the issue you're having. If

Re: function returns , but variable values has not changed in the interactive prompt

2008-05-23 Thread alex23
On May 24, 5:04 am, davidj411 <[EMAIL PROTECTED]> wrote: > if you run execfile function to run a python script and that script > has variables and functions, should't those variable change in the > interactive prompt too? Yes. >cat a.py a = 7 b = 'seven' Python 2.5.1 (r251:54863, May 1 2007, 17

Re: unittest: Calling tests in liner number order

2008-05-23 Thread Ben Finney
Antoon Pardon <[EMAIL PROTECTED]> writes: > The answers seemed to be negative. Since I really would like this > behaviour I didn't see you explain *why* you think this behaviour is desirable. You've already had responses that explained why it leaves you open to more bugs when code only works if t

Re: would this be called bug?

2008-05-23 Thread MRAB
On May 24, 1:33 am, Amit Gupta <[EMAIL PROTECTED]> wrote: > The code is attached below. Basically I am taking a substring of > variable m, and using "buffer" instead of slicing. > > However, the application of int on that buffer start correctly from > the offset, but it scans all the way to the end

Re: webspider, regexp not working, why?

2008-05-23 Thread alex23
On May 24, 3:26 am, "Reedick, Andrew" <[EMAIL PROTECTED]> wrote: > c) If you're going to parse html/xml then bite the bullet and learn one > of the libraries specifically designed to parse html/xml. Many other > regex gurus have learned this lesson. Myself included. =) Agreed. The BeautifulSou

Re: Storing objects in relational database

2008-05-23 Thread Jerry Hill
On Fri, May 23, 2008 at 5:07 PM, nayden <[EMAIL PROTECTED]> wrote: > The reason I am writing here is that I can't seem to figure out how to > save/restore python objects into a relational database. Here's a basic version using the sqlite bindings included with Python 2.5: import sqlite3, pickle

simple url regexp

2008-05-23 Thread notnorwegian
url = re.compile(r"((http|ftp|https)\:\/\/)(www)?([a-zA-Z]{1}([\w\-]+ \.)+([\w]{2,5}))(:[\d]{1,5})?((/?\w+/)+|/?)(\w+ \.[\w]{3,4})?((\?\w+=\w+)?(&\w+=\w+)*)?") damn i hate these things. i want it to only match http://www.name.any/etc not http://wiki.x etc -- http://mail.python.org/mailman/listi

why is com-prompt faster and how do i start at cprompt at mydir/ ?

2008-05-23 Thread notnorwegian
when running a very computationalheavy program in the shell it sometimes freezes but the commandprompt runs it without problems and muh faster, why? also, the command prompt starts at C:\Users\user> i want to start at C:\python25\progs how do i change that? -- http://mail.python.org/mailman/lis

Re: why is com-prompt faster and how do i start at cprompt at mydir/ ?

2008-05-23 Thread Ben Finney
[EMAIL PROTECTED] writes: > when running a very computationalheavy program in the shell it > sometimes freezes but the commandprompt runs it without problems Can you tell us exactly which programs you mean when you say "the shell" and "the commandprompt"? -- \ "One seldom discovers a true

Re: why is com-prompt faster and how do i start at cprompt at mydir/ ?

2008-05-23 Thread notnorwegian
On 24 Maj, 05:48, Ben Finney <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] writes: > > when running a very computationalheavy program in the shell it > > sometimes freezes but the commandprompt runs it without problems > > Can you tell us exactly which programs you mean when you say "the > shell"

Re: why is com-prompt faster and how do i start at cprompt at mydir/ ?

2008-05-23 Thread Ben Finney
[EMAIL PROTECTED] writes: > On 24 Maj, 05:48, Ben Finney <[EMAIL PROTECTED]> > wrote: > > Can you tell us exactly which programs you mean when you say "the > > shell" and "the commandprompt"? > > commandprompt = windows dos-windows > > shell = standard python interactive prompt Thanks. Be awar

Re: ctypes help

2008-05-23 Thread Terry Reedy
"gianluca" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | Thank you for help! | I've done all you suggest and I've a objdump output like this: | ... | [ 86](sec 1)(fl 0x00)(ty 20)(scl 2) (nx 0) 0x3755 _IsCoverRelD | [ 87](sec 1)(fl 0x00)(ty 20)(scl 2) (nx 0) 0x3657

Re: why is com-prompt faster and how do i start at cprompt at mydir/ ?

2008-05-23 Thread notnorwegian
On 24 Maj, 07:01, Ben Finney <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] writes: > > On 24 Maj, 05:48, Ben Finney <[EMAIL PROTECTED]> > > wrote: > > > Can you tell us exactly which programs you mean when you say "the > > > shell" and "the commandprompt"? > > > commandprompt = windows dos-windows

Re: would this be called bug?

2008-05-23 Thread Terry Reedy
"Amit Gupta" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | The code is attached below. Basically I am taking a substring of | variable m, and using "buffer" instead of slicing. | | However, the application of int on that buffer start correctly from | the offset, but it scans all t

Re: Python is slow

2008-05-23 Thread cm_gui
i am not comparing Python with C or C++ which are of course compiled languages. if there is any consolation to Python lovers here, Python is still faster than Microsoft ASP/ASPX. i'm not trying to 'troll' here. it's not just me. many have complained that python is slow. python websites are sl

Re: Unhandled exceptions checking

2008-05-23 Thread bukzor
On May 23, 6:31 pm, Yosifov Pavel <[EMAIL PROTECTED]> wrote: > Does somebody know existent tool for checking unhandled exceptions? > Like in Java when method throws exception but in code using this > method, try...catch is missed. May be something like PyChecker? > > -- > /Pavel I know that pychec

Re: why is com-prompt faster and how do i start at cprompt at mydir/ ?

2008-05-23 Thread bukzor
On May 23, 10:18 pm, [EMAIL PROTECTED] wrote: > On 24 Maj, 07:01, Ben Finney <[EMAIL PROTECTED]> > wrote: > > > > > [EMAIL PROTECTED] writes: > > > On 24 Maj, 05:48, Ben Finney <[EMAIL PROTECTED]> > > > wrote: > > > > Can you tell us exactly which programs you mean when you say "the > > > > shell"

Re: Python is slow

2008-05-23 Thread Jeremy Pager
On Fri, 23 May 2008 03:21:23 -0700, Ivan Illarionov <[EMAIL PROTECTED]> wrote: On 23 май, 02:20, Brad <[EMAIL PROTECTED]> wrote: cm_gui wrote: > Python is slow. It ain't C++, but it ain't a punch card either... somewhere in between. I find it suitable for lots of stuff. I use C++ when

Re: Storing objects in relational database

2008-05-23 Thread bukzor
On May 23, 7:00 pm, alex23 <[EMAIL PROTECTED]> wrote: > On May 24, 7:14 am, nayden <[EMAIL PROTECTED]> wrote: > > > the execution fails just after the print statement, and I am not quite > > sure why is that. > > It's often helpful to include the traceback, or at the very least the > last 3-4 lines

Re: Reloading function obtained via 'from xxx import yyy'

2008-05-23 Thread bukzor
On May 23, 3:44 pm, "Joel Koltner" <[EMAIL PROTECTED]> wrote: > ""Martin v. Löwis"" <[EMAIL PROTECTED]> wrote in messagenews:[EMAIL PROTECTED] > > > Try all three of them, in sequence: > > Thanks, will do. > > > If you absolutely don't want to import test, write > > I can live with the import, I ju

Re: Python is slow

2008-05-23 Thread Torsten Bronger
Hallöchen! cm_gui writes: > [...] > > if python is such a good programming/scripting language, > why can't they build a faster interpreter/compiler engine? > and beat php and zend. > to the python team, rebuild your interpreter! > > torontolife.com is slow. For me, torontolife.com is exactly as

Re: simple url regexp

2008-05-23 Thread Stefan Behnel
[EMAIL PROTECTED] wrote: > url = re.compile(r"((http|ftp|https)\:\/\/)(www)?([a-zA-Z]{1}([\w\-]+ > \.)+([\w]{2,5}))(:[\d]{1,5})?((/?\w+/)+|/?)(\w+ > \.[\w]{3,4})?((\?\w+=\w+)?(&\w+=\w+)*)?") > > damn i hate these things. > > i want it to only match http://www.name.any/etc > > not http://wiki.x e

Re: Calling class method by name passed in variable

2008-05-23 Thread Sagari
Thanks to everyone for the advice. In fact, since all the called methods trap necessary exceptions, I see no big problems with that. With all respect, Konstantin -- http://mail.python.org/mailman/listinfo/python-list

Re: Assignment and comparison in one statement

2008-05-23 Thread TheSaint
On 06:59, sabato 24 maggio 2008 Johannes Bauer wrote: > However, this "assignment and comparison" is not working. What's the > "Python way" of doing this kind of thing? If you want speak a language that isn't understood mostly you'll face unexpected risults. When you got started with C/C++, were

<    1   2