Re: scanf in python

2008-08-03 Thread castironpi
On Aug 3, 8:27 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > On Jul 22, 2:00 pm, AMD <[EMAIL PROTECTED]> wrote: > > > Hello Fredrik, > > > I didn't think my comment would offend anyone [...] > > I doubt that it offended anyone else.  Having been the recipient of a > few F-bombs :-) myself, I

Re: scanf in python

2008-08-03 Thread [EMAIL PROTECTED]
On Jul 22, 2:00 pm, AMD <[EMAIL PROTECTED]> wrote: > Hello Fredrik, > > I didn't think my comment would offend anyone [...] I doubt that it offended anyone else. Having been the recipient of a few F-bombs :-) myself, I'd just let it go by... Mike -- http://mail.python.org/mailman/listinfo/python

Re: scanf in python

2008-07-26 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, AMD wrote: >> In message <[EMAIL PROTECTED]>, AMD wrote: >> >>> Actually it is quite common, it is used for processing of files not for >>> reading parameters. You can use it whenever you need to read a simple >>> csv file or fixed format file which contains many l

Re: scanf in python

2008-07-26 Thread AMD
Thanks Fredrik, very nice examples. André AMD wrote: For reading delimited fields in Python, you can use .split string method. Yes, that is what I use right now, but I still have to do the conversion to integers, floats, dates as several separate steps. What is nice about the scanf functi

Re: scanf in python

2008-07-25 Thread Fredrik Lundh
AMD wrote: For reading delimited fields in Python, you can use .split string method. Yes, that is what I use right now, but I still have to do the conversion to integers, floats, dates as several separate steps. What is nice about the scanf function is that it is all done on the same step. E

Re: scanf in python

2008-07-25 Thread AMD
In message <[EMAIL PROTECTED]>, AMD wrote: Actually it is quite common, it is used for processing of files not for reading parameters. You can use it whenever you need to read a simple csv file or fixed format file which contains many lines with several fields per line. I do that all the time,

Re: scanf in python

2008-07-24 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, AMD wrote: > Actually it is quite common, it is used for processing of files not for > reading parameters. You can use it whenever you need to read a simple > csv file or fixed format file which contains many lines with several > fields per line. I do that all the

Re: scanf in python

2008-07-22 Thread AMD
AMD wrote: I had seen this pure python implementation, but it is not as fast or as elegant as would be an implementation written in C directly within python with no need for import. maybe you should wait with disparaging comments about how Python is not what you want it to be until you've

Re: scanf in python

2008-07-22 Thread Fredrik Lundh
AMD wrote: I had seen this pure python implementation, but it is not as fast or as elegant as would be an implementation written in C directly within python with no need for import. maybe you should wait with disparaging comments about how Python is not what you want it to be until you've le

Re: scanf in python

2008-07-21 Thread AMD
Robert Kern a écrit : AMD wrote: Hello, I often need to parse strings which contain a mix of characters, integers and floats, the C-language scanf function is very practical for this purpose. I've been looking for such a feature and I have been quite surprised to find that it has been discus

Re: scanf in python

2008-07-21 Thread Robert Kern
AMD wrote: Hello, I often need to parse strings which contain a mix of characters, integers and floats, the C-language scanf function is very practical for this purpose. I've been looking for such a feature and I have been quite surprised to find that it has been discussed as far back as 2001

Re: scanf in python

2008-07-21 Thread AMD
I'm pretty certain python won't grow an additional operator for this. Yet you are free to create a scanf-implementation as 3rd-party-module. IMHO the usability of the approach is very limited though. First of all, the need to capture more than one input token is *very* seldom - nearly all co

Re: scanf in python

2008-07-21 Thread Diez B. Roggisch
AMD schrieb: Hello, I often need to parse strings which contain a mix of characters, integers and floats, the C-language scanf function is very practical for this purpose. I've been looking for such a feature and I have been quite surprised to find that it has been discussed as far back as 20

scanf in python

2008-07-21 Thread AMD
Hello, I often need to parse strings which contain a mix of characters, integers and floats, the C-language scanf function is very practical for this purpose. I've been looking for such a feature and I have been quite surprised to find that it has been discussed as far back as 2001 but never

scanf in python

2008-07-19 Thread André Michel Descombes
Hello, I often need to parse strings which contain a mix of characters, integers and floats, the C-language scanf function is very practical for this purpose. I've been looking for such a feature and I have been quite surprised to find that it has been discussed as far back as 2001 but never imple

Re: scanf in python?

2008-02-20 Thread Terry Reedy
Using a search engine (ie, Google 'scanf python') will often give you a quick answer and possibly better than anyone will give you here. -- http://mail.python.org/mailman/listinfo/python-list

scanf in python?

2008-02-20 Thread Bob and Deb
Hello python-list, This is my first post and yes I am a python newbie :-) I've been trying to figure out how to convert an old database dump into a form that can be imported into Postgresql. The file (dealing with one table) looks something like this: create table table1 (id int, name char(20),