ANN: eGenix mxODBC 3.2.0 - Python ODBC Database Interface

2012-08-28 Thread eGenix Team: M.-A. Lemburg
ANNOUNCING eGenix.com mxODBC Python ODBC Database Interface Version 3.2.0 mxODBC is our commercially supported Python extension providing

Re: Python 2.6 and Sqlite3 - Slow

2012-08-28 Thread Cameron Simpson
On 27Aug2012 13:41, bruceg113...@gmail.com wrote: | When using the database on my C Drive, Sqlite performance is great! (<1S) | When using the database on a network, Sqlite performance is terrible! (17S) Let me first echo everyone saying not to use SQLite on a network file. | I like your idea

Re: What do I do to read html files on my pc?

2012-08-28 Thread mikcec82
Il giorno lunedì 27 agosto 2012 12:59:02 UTC+2, mikcec82 ha scritto: > Hallo, > > > > I have an html file on my pc and I want to read it to extract some text. > > Can you help on which libs I have to use and how can I do it? > > > > thank you so much. > > > > Michele Thank you to all. H

Re: What do I do to read html files on my pc?

2012-08-28 Thread Oscar Benjamin
On Tue, 28 Aug 2012 03:09:11 -0700 (PDT), mikcec82 wrote: f = open(fileorig, 'r') nomefile = f.read() for x in nomefile: if '' in nomefile: print 'NOK' else : print 'OK' You don't need the for loop. Just do: nomefile = f.read() if '' in nomefile: print('

Re: What do I do to read html files on my pc?

2012-08-28 Thread mikcec82
Il giorno lunedì 27 agosto 2012 12:59:02 UTC+2, mikcec82 ha scritto: > Hallo, > > > > I have an html file on my pc and I want to read it to extract some text. > > Can you help on which libs I have to use and how can I do it? > > > > thank you so much. > > > > Michele Hi Oscar, I tried as

Re: What do I do to read html files on my pc?

2012-08-28 Thread Peter Otten
mikcec82 wrote: > Il giorno lunedì 27 agosto 2012 12:59:02 UTC+2, mikcec82 ha scritto: >> Hallo, >> >> >> >> I have an html file on my pc and I want to read it to extract some text. >> >> Can you help on which libs I have to use and how can I do it? >> >> >> >> thank you so much. >> >> >>

Re: Python 2.6 and Sqlite3 - Slow

2012-08-28 Thread bruceg113355
On Tuesday, August 28, 2012 4:27:48 AM UTC-4, Cameron Simpson wrote: > On 27Aug2012 13:41, bruceg113...@gmail.com wrote: > > | When using the database on my C Drive, Sqlite performance is great! (<1S) > > | When using the database on a network, Sqlite performance is terrible! (17S) > > > >

ctypes - python2.7.3 vs python3.2.3

2012-08-28 Thread Rolf
ctypes works as I would expect with python2.7.3. However, when I upgrade to python3.2.3 things don't seem to work right. Look below for details. I am not sure where I am going wrong. Shared Library == #include #include extern "C" { int main(); uint32_t myfunction (char **);

Re: ctypes - python2.7.3 vs python3.2.3

2012-08-28 Thread John Gordon
In <18eb8025-7545-4d10-9e76-2e41deaad...@googlegroups.com> Rolf writes: > uint32_t myfunction (char ** _mydata) > { >char mydata[16]; >strcpy(mydata, "Hello Dude!"); >*_mydata = mydata; >return 0; > } mydata is an auto variable, which goes out of scope when myfunction() exits

Re: ctypes - python2.7.3 vs python3.2.3

2012-08-28 Thread MRAB
On 28/08/2012 22:35, Rolf wrote: ctypes works as I would expect with python2.7.3. However, when I upgrade to python3.2.3 things don't seem to work right. Look below for details. I am not sure where I am going wrong. Shared Library == #include #include extern "C" { int main(

Re: protobuf + pypy

2012-08-28 Thread Natalia Bidart
On Tue, Aug 21, 2012 at 6:55 PM, Pedro Larroy wrote: > Hi > > Anyone knows if it's possible to use protobuffers with pypy? Seems > there isn't much info on the web about this. So, in my experience, the easiest way to confirm if something works with PyPy (when you can't find proper bibliography

Re: Python 2.6 and Sqlite3 - Slow

2012-08-28 Thread Pedro Larroy
Try incrementing the variable cursor.arraysize a lot. Pedro. On Tue, Aug 28, 2012 at 11:20 PM, Dennis Lee Bieber wrote: > On Tue, 28 Aug 2012 10:25:35 -0700 (PDT), bruceg113...@gmail.com > declaimed the following in gmane.comp.python.general: > >> >> Doesn't the last paragraph imply that SQLite

Re: issue with struct.unpack

2012-08-28 Thread 9bizy
This is what I have to reproduce the challenge I am having below: import csv import struct data = [] for Node in csv.reader(file('s_data.xls')): data.append(list((file('s_data.xls' data = struct.unpack('!B4HH', data) print "s_data.csv: ", data I tries so many format

Re: issue with struct.unpack

2012-08-28 Thread 9bizy
On Saturday, 25 August 2012 20:16:54 UTC+1, MRAB wrote: > On 25/08/2012 19:34, 9bizy wrote: > > > I am trying to unpack values from sensor data I am retrieving through > > > a serial cable, but I get errors while using struct.unpack, how can I > > > use struct.unpack to unload the data in a rea

Re: issue with struct.unpack

2012-08-28 Thread MRAB
On 28/08/2012 23:35, 9bizy wrote: On Saturday, 25 August 2012 20:16:54 UTC+1, MRAB wrote: On 25/08/2012 19:34, 9bizy wrote: > I am trying to unpack values from sensor data I am retrieving through > a serial cable, but I get errors while using struct.unpack, how can I > use struct.unpack to u

Re: issue with struct.unpack

2012-08-28 Thread MRAB
On 28/08/2012 23:34, 9bizy wrote: This is what I have to reproduce the challenge I am having below: import csv import struct data = [] for Node in csv.reader(file('s_data.xls')): That tries to read the file as CSV, but, judging from the extension, it's in Excel's format. You don't even use

Re: issue with struct.unpack

2012-08-28 Thread 9bizy
On Tuesday, 28 August 2012 23:49:54 UTC+1, MRAB wrote: > On 28/08/2012 23:34, 9bizy wrote: > > > This is what I have to reproduce the challenge I am having below: > > > > > > > > > import csv > > > import struct > > > > > > > > > data = [] > > > > > > for Node in csv.reader(file('s_data.

Re: popen4 - get exit status

2012-08-28 Thread Tim Johnson
* Dennis Lee Bieber [120828 07:11]: > On Mon, 27 Aug 2012 15:43:59 -0800, Tim Johnson > declaimed the following in gmane.comp.python.general: > > > * Benjamin Kaplan [120827 15:20]: > > > The popen* functions are deprecated. You should use the subprocess module > > > instead. > > No, I'm stuc

Re: issue with struct.unpack

2012-08-28 Thread MRAB
On 29/08/2012 00:01, 9bizy wrote:> On Tuesday, 28 August 2012 23:49:54 UTC+1, MRAB wrote: >> On 28/08/2012 23:34, 9bizy wrote: >> > This is what I have to reproduce the challenge I am having below: >> > >> > import csv >> > import struct >> > >> > data = [] >> > >> > for Node in csv.reader(file(

Re: issue with struct.unpack

2012-08-28 Thread 9bizy
On Wednesday, 29 August 2012 00:36:40 UTC+1, MRAB wrote: > On 29/08/2012 00:01, 9bizy wrote:> On Tuesday, 28 August 2012 23:49:54 > > UTC+1, MRAB wrote: > > >> On 28/08/2012 23:34, 9bizy wrote: > > >> > This is what I have to reproduce the challenge I am having below: > > >> > > > >> >

Sending USB commands with Python

2012-08-28 Thread Adam W.
So I'm trying to get as low level as I can with my Dymo label printer, and this method described the PDF http://sites.dymo.com/Documents/LW450_Series_Technical_Reference.pdf seems to be it. I'm unfamiliar with dealing with the USB interface and would greatly appreciate it if someone could tell

Re: Make error when installing Python 1.5

2012-08-28 Thread Jason Swails
On Sun, Aug 26, 2012 at 9:54 PM, Steven D'Aprano < steve+comp.lang.pyt...@pearwood.info> wrote: > Yes, you read the subject line right -- Python 1.5. Yes, I am nuts ;) > > (I like having old versions of Python around for testing historical > behaviour.) > > On Debian squeeze, when I try to build P

xlrd-0.8.0 .xlsx formatting_info=True not imlemented

2012-08-28 Thread python-excel
hi, i just tried xlrd-0.8.0 so as to be able to read xlsx files only to discover: NotImplementedError: formatting_info=True not yet implemented there's a post from 2009 stating that the current intention is to not support formatting_info: https://groups.google.com/forum/?fromgroups=#!topic/

Re: Flexible string representation, unicode, typography, ...

2012-08-28 Thread rusi
On Aug 28, 4:57 am, Neil Hodgson wrote: > wxjmfa...@gmail.com: > > > Go "has" the integers int32 and int64. A rune ensure > > the usage of int32. "Text libs" use runes. Go has only > > bytes and runes. > >      Go's text libraries use UTF-8 encoded byte strings. Not arrays of > runes. See, for exa

Re: Sending USB commands with Python

2012-08-28 Thread Jorge Mazzonelli
Hi, I recommend the use of the module PyUSB in sourceforge: http://pyusb.sourceforge.net/ Also take a look to the tutorial : http://pyusb.sourceforge.net/docs/1.0/tutorial.html as far as I can remember, you'll need to first find the device based on the idvendor / idproduct (provided in the pdf).

Re: Sending USB commands with Python

2012-08-28 Thread hamilton
On 8/28/2012 8:54 PM, Dennis Lee Bieber wrote: 2) does the printer appear as a serial port by the OS? Or as a printer device? The OP posted the link to the manual. If your not going to at least look it over, . USB Printer Interface The LabelWriter 450 series printers al

Re: Flexible string representation, unicode, typography, ...

2012-08-28 Thread Chris Angelico
On Wed, Aug 29, 2012 at 12:42 PM, rusi wrote: > Clearly there are 3 string-engines in the python 3 world: > - 3.2 narrow > - 3.2 wide > - 3.3 (flexible) > > How difficult would it be to giving the choice of string engine as a > command-line flag? > This would avoid the nuisance of having two binar

Re: the meaning of r?.......ï¾

2012-08-28 Thread Robert Miles
On 7/23/2012 1:10 PM, Dennis Lee Bieber wrote: On Mon, 23 Jul 2012 16:42:51 +0200, Henrik Faber declaimed the following in gmane.comp.python.general: If that was written by my coworkers, I'd strangle them. My first real assignment, 31 years ago, was porting an application to CDC MP-

Re: Flexible string representation, unicode, typography, ...

2012-08-28 Thread Ian Kelly
On Tue, Aug 28, 2012 at 8:42 PM, rusi wrote: > In summary: > 1. The problem is not on jmf's computer > 2. It is not windows-only > 3. It is not directly related to latin-1 encodable or not > > The only question which is not yet clear is this: > Given a typical string operation that is complexity O

Re: Sending USB commands with Python

2012-08-28 Thread alex23
On Aug 29, 1:03 pm, hamilton wrote: > The OP posted the link to the manual. > If your not going to at least look it over, . Speaking for myself, I _don't_ go out of my way to read extra material to help someone with a problem here. If it's worth mentioning, mention it in the question. --

Re: Sending USB commands with Python

2012-08-28 Thread hamilton
On 8/28/2012 11:04 PM, alex23 wrote: On Aug 29, 1:03 pm, hamilton wrote: The OP posted the link to the manual. If your not going to at least look it over, . Speaking for myself, I _don't_ go out of my way to read extra material But, you will give advice that has no value. Anything

Geodetic functions library GeoDLL 32 Bit and 64 Bit

2012-08-28 Thread Fred
Hi developers, who develops programs with geodetic functionality like world-wide coordinate transformations or distance calculations, can use geodetic functions of my GeoDLL. The Dynamic Link Library can easily be used with most of the modern programming languages like C, C++, C#, Basic, Delphi

Re: Geodetic functions library GeoDLL 32 Bit and 64 Bit

2012-08-28 Thread George Silva
Hi Fred. Do you know about proj4? proj4 is opensource library that does the coordinate transformations side of geospatial for many many already tested projects. Does your libraries do anything that proj4 does not? On Wed, Aug 29, 2012 at 2:51 AM, Fred wrote: > Hi developers, > > who develops p

Re: Sending USB commands with Python

2012-08-28 Thread Tim Roberts
"Adam W." wrote: > >So I'm trying to get as low level as I can with my Dymo label printer, >and this method described the PDF >http://sites.dymo.com/Documents/LW450_Series_Technical_Reference.pdf >seems to be it. > >I'm unfamiliar with dealing with the USB interface and would greatly >appreciat