Re: simple file flow question with csv.reader

2011-11-02 Thread Jon Clements
On Nov 2, 11:50 pm, Terry Reedy wrote: > On 11/2/2011 7:06 PM, Dennis Lee Bieber wrote: > > > On Wed, 2 Nov 2011 14:13:34 -0700 (PDT), Matt > > declaimed the following in gmane.comp.python.general: > > >> I have a few hundred .csv files, and to each file, I want to > >> manipulate the data, then s

Re: Sort items in wxListCtrl

2011-11-02 Thread Miki Tebeka
You probably want wx.EVT_LEFT_DCLICK, see the ListCtrl demo in the wx demo. -- http://mail.python.org/mailman/listinfo/python-list

Full time Job opening -Python lead in washington area.

2011-11-02 Thread Radhika Bauerle
Hello eveyone: we are looking for a Python lead in washington area. Strong on Python Strong on OOAD Worked on high performance web application Cheers, Radhika Bauerle. Leapship, Inc. ra...@leapship.com 408.355.8462 -- Radhika Bauerle. Leapship, Inc. ra...@leapship.com 408.355.8462 -- http:

PyDev 2.2.4 Released

2011-11-02 Thread Fabio Zadrozny
Hi All, PyDev 2.2.4 has been released Details on PyDev: http://pydev.org Details on its development: http://pydev.blogspot.com Release Highlights: --- **Cython** * Cython is now supported in PyDev (.pyx files may be opened with the PyDev editor). **Globals To

Re: simple file flow question with csv.reader

2011-11-02 Thread Terry Reedy
On 11/2/2011 7:06 PM, Dennis Lee Bieber wrote: On Wed, 2 Nov 2011 14:13:34 -0700 (PDT), Matt declaimed the following in gmane.comp.python.general: I have a few hundred .csv files, and to each file, I want to manipulate the data, then save back to the original file. That is dangerous. Better t

Re: simple file flow question with csv.reader

2011-11-02 Thread Tim Chase
On 11/02/11 16:13, Matt wrote: Hi All, I am trying to do a really simple file operation, yet, it befuddles me... I have a few hundred .csv files, and to each file, I want to manipulate the data, then save back to the original file. The code below will open up the files, and do the proper mani

simple file flow question with csv.reader

2011-11-02 Thread Matt
Hi All, I am trying to do a really simple file operation, yet, it befuddles me... I have a few hundred .csv files, and to each file, I want to manipulate the data, then save back to the original file. The code below will open up the files, and do the proper manipulations-- but I can't seem to

Re: fast copying of large files in python

2011-11-02 Thread Dave Angel
On 11/02/2011 03:31 PM, Catherine Moroney wrote: Hello, I'm working on an application that as part of its processing, needs to copy 50 Meg binary files from one NFS mounted disk to another. The simple-minded approach of shutil.copyfile is very slow, and I'm guessing that this is due to the d

fast copying of large files in python

2011-11-02 Thread Catherine Moroney
Hello, I'm working on an application that as part of its processing, needs to copy 50 Meg binary files from one NFS mounted disk to another. The simple-minded approach of shutil.copyfile is very slow, and I'm guessing that this is due to the default 16K buffer size. Using shtil.copyfileobj

Re: understand program used to create file

2011-11-02 Thread vonkes
Ho trovato questo script in una directory dove sono conservati molti demo per python non era funzionante,sono riuscito a capirne le finalità e così l'ho reso funzionante. Esamina un file di testo e analizza il carattere di fine riga. le possibilità dipendono dal sistema operativo usato. Nei file di

Re: Sort items in wxListCtrl

2011-11-02 Thread Ric
On Wed, 2 Nov 2011 08:08:48 -0700 (PDT), Miki Tebeka wrote: >wx.FileDialog shows files and directories. If you need the user to pick one, >this is the standard way. Otherwise, if you need custom view on the file >system then probably list control is the right way to go. Again, the demo has >a

Re: leftover pyc files

2011-11-02 Thread Andrea Crotti
On 11/02/2011 04:06 PM, Chris Kaynor wrote: If you can at least upgrade to Python 2.6, another option, if you don't mind losing the byte code caching all together (it may worsen load times, however probably not significantly), you can set PYTHONDONTWRITEBYTECODE to prevent the writing of .pyc fil

Re: leftover pyc files

2011-11-02 Thread Chris Kaynor
If you can at least upgrade to Python 2.6, another option, if you don't mind losing the byte code caching all together (it may worsen load times, however probably not significantly), you can set PYTHONDONTWRITEBYTECODE to prevent the writing of .pyc files. Alternatively, again in 2.6+, you can also

Re: leftover pyc files

2011-11-02 Thread Andrea Crotti
On 11/02/2011 03:03 PM, Peter Otten wrote: Switch to Python3.2 ;) Yes I saw that and it would be great, unfortunately we're stuck with Python 2.5 :O for some more time. Anyway now the code that does it is a recursive thing ilke def _clean_orphaned_pycs(self, directory, simulate=False): "

Re: getting columns attributes in declarative style with sqlalchemy

2011-11-02 Thread Hanss
Il 01/11/2011 19.37, tres.bai...@gmail.com ha scritto: I'm no SQLAlchemy expert, but I have used the Table and Column attribute objects from the model object to solve a similar problem in the past. You can use the following syntax to do it: [col.name for col in Country.__table__.columns._all

Re: getting columns attributes in declarative style with sqlalchemy

2011-11-02 Thread Gabriele
Il 01/11/2011 19.37, tres.bai...@gmail.com ha scritto: Sorry for the repost, if it does in fact repost. I'm no SQLAlchemy expert, but I have used the Table and Column attribute objects from the model object to solve a similar problem in the past. You can use the following syntax to do it: [c

Re: Sort items in wxListCtrl

2011-11-02 Thread Miki Tebeka
wx.FileDialog shows files and directories. If you need the user to pick one, this is the standard way. Otherwise, if you need custom view on the file system then probably list control is the right way to go. Again, the demo has a working example with sortable list control. -- http://mail.python

Re: leftover pyc files

2011-11-02 Thread Peter Otten
Andrea Crotti wrote: > In our current setup, the script in charge to run our applications also > scan all the directories and if it finds any "pyc" file without the > corresponding > module, it removes it. > > This was done because when you rename something, the old "pyc" remains > there and can

Re: parsing text from "ethtool" command

2011-11-02 Thread Jean-Michel Pichavant
extraspecialbitter wrote: I'm still trying to write that seemingly simple Python script to print out network interfaces (as found in the "ifconfig -a" command) and their speed ("ethtool "). The idea is to loop for each interface and print out its speed. I'm looping correctly, but have some issu

leftover pyc files

2011-11-02 Thread Andrea Crotti
In our current setup, the script in charge to run our applications also scan all the directories and if it finds any "pyc" file without the corresponding module, it removes it. This was done because when you rename something, the old "pyc" remains there and can cause problems. Is it the only w

Re: parsing text from "ethtool" command

2011-11-02 Thread extraspecialbitter
On Nov 1, 7:35 pm, Ian Kelly wrote: > On Tue, Nov 1, 2011 at 5:19 PM, Miki Tebeka wrote: > > In my box, there are some spaces (tabs?) before "Speed". IMO > > re.search("Speed", line) will be a more robust. > > Or simply: > > if "Speed" in line: > > There is no need for a regular expression here.

Re: __init__ with multiple list values

2011-11-02 Thread Jean-Michel Pichavant
Gnarlodious wrote: Initializing a list of objects with one value: class Order: def __init__(self, ratio): self.ratio=ratio def __call__(self): return self.ratio ratio=[1, 2, 3, 4, 5] Orders=[Order(x) for x in ratio] But now I want to __init__ with 3 values: class Order: def __init__(s