Re: SQLwaterheadretard3 (Was: Is it just me, or is Sqlite3 goofy?)

2006-09-08 Thread [EMAIL PROTECTED]
Paul McNett wrote: > [EMAIL PROTECTED] wrote: > > Do you know what INNER JOIN means? > > > > Do you know how important it is to a relational database? > > > > Can you explain how an INNER JOIN can even work, in theory, > > with dynamic data types? > > Let's stop the pissing contest and just see how

Re: Get CPU usage of a single process in Windows

2006-09-08 Thread Tim Roberts
Tor Erik <[EMAIL PROTECTED]> wrote: > >This should be possible as Taskmanager tracks CPU usage for every >process... Anyone know how this can be done? I answered this in the python-win32 mailing list. Task manager and perfmon do this by using the performance counter APIs. Python-Win32 includes

Re: best split tokens?

2006-09-08 Thread Nick Vatamaniuc
It depends on the language as it was suggested, and it also depends on how a token is defined. Can it have dashes, underscores, numbers and stuff? This will also determine what the whitespace will be. Then the two main methods of doing the splitting is to either cut based on whitespace (specify w

Re: ctypes listing dll functions

2006-09-08 Thread Tim Roberts
[EMAIL PROTECTED] wrote: > >hi all and before I start I apologise if I have this completely muddled >up but here goes. > >I'm trying to call functions from a dll file in a python script but I >can't work out what functions are available. I'm using ctypes. I've >tried using dir(ctypes_object) but t

Re: how do you get the name of a dictionary?

2006-09-08 Thread MonkeeSage
Dennis Lee Bieber wrote: > id() returns, in C based Python, the memory address at which an > object is stored. That is all... Names in Python are mapped to the > object -- essentially they are mapped to the address of the object. > There is NO intermediate hidden identifier. > > [snip] > > Ob

Re: SQLwaterheadretard3 (Was: Is it just me, or is Sqlite3 goofy?)

2006-09-08 Thread [EMAIL PROTECTED]
Dennis Lee Bieber wrote: > On 8 Sep 2006 16:46:03 -0700, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: > > > > After a sequence of hypothetical results of occult SQL you show > this... > > > > invoices = [(1,'066','101 Ways to Start A Fight','s

Re: SQLwaterheadretard3 (Was: Is it just me, or is Sqlite3 goofy?)

2006-09-08 Thread [EMAIL PROTECTED]
George Sakkis wrote: > [EMAIL PROTECTED] wrote: > > > Sure, errors happen with static typing. After all, the values still > > have to match. Dynamic typing allows for more potential errors and, > > thanks to Murpy's Law, I will have a much bigger problem with data > > integrity. > > If this was a

Problems with PyGridTableBase

2006-09-08 Thread Mario Lacunza
Hello, I attach two files:frmClientes and frmClientesNE. frmClientes charge a Grid with resume Costumers data: Name, Commercial ID, address, etc. and edition options. frmClientes in Line 178 def OnBtnNuevoButton(self, event): call to frmClientesNE. Its append a new record to the database and

Re: python loops

2006-09-08 Thread Jay
Here are my benchmarks for those interested in version 2.4.3 [EMAIL PROTECTED]:~$ python -V Python 2.4.3 [EMAIL PROTECTED]:~$ python -mtimeit 'for x in range(1000):pass' 1 loops, best of 3: 64.2 usec per loop [EMAIL PROTECTED]:~$ python -mtimeit 'for x in xrange(1000):pass' 1 loops, best o

Re: ubuntu crash

2006-09-08 Thread Jay
Here are some commands to try: apt-get install ubuntu-standard apt-get install ubuntu-desktop Also, I'd recommend trying Ubuntu's official forums website. I've found their community to be extremely helpful. http://www.ubuntuforums.org/ Plus, why on earth would you want to ax Python? [EMAIL PR

Re: Is it just me, or is Sqlite3 goofy?

2006-09-08 Thread Kay Schluehr
> It's not a bug, it's a feature. And answered as third point in the FAQ: > > http://www.sqlite.org/faq.html#q3 > > I think your whole experience is based on it. Live with it or use a > real RDBMS. > > If you are so fond of static typing, why are you using Python in the first > place? Just see

Re: mysqldb + multi-threading

2006-09-08 Thread Bryan Olson
[EMAIL PROTECTED] wrote: > Bryan> Go with your gut. Python threads are reasonably portable, and > Bryan> work well on modern MS-Windows. > > >> Maybe ignore your gut and read the documentation. ;-) > > Bryan> What in the documentation do you think answers the question? > > The pa

Re: SQLwaterheadretard3 (Was: Is it just me, or is Sqlite3 goofy?)

2006-09-08 Thread George Sakkis
[EMAIL PROTECTED] wrote: > Sure, errors happen with static typing. After all, the values still > have to match. Dynamic typing allows for more potential errors and, > thanks to Murpy's Law, I will have a much bigger problem with data > integrity. If this was a java or c++ list, all this rant woul

Problem on getting various character set from pop3.retr

2006-09-08 Thread GM
Dear all, The problem that I am facing now is that, when I use poplib to get a email message with chinese character set like big5, the character string is changed automatically to sth like =B8=D5=ACQ=AAM...the OS I am using is red hat ES4 and the python version I am using is 2.3.4 (it seems python

Re: Looking for a regexp generator based on a set of known string representative of a string set

2006-09-08 Thread James Stroud
[EMAIL PROTECTED] wrote: > Hello > > I am looking for python code that takes as input a list of strings > (most similar, > but not necessarily, and rather short: say not longer than 50 chars) > and that computes and outputs the python regular expression that > matches > these string values (not ne

Re: mysqldb + multi-threading

2006-09-08 Thread skip
Bryan> Go with your gut. Python threads are reasonably portable, and Bryan> work well on modern MS-Windows. >> Maybe ignore your gut and read the documentation. ;-) Bryan> What in the documentation do you think answers the question? The part where it says that if MySQLdb.threads

Re: python loops

2006-09-08 Thread Alex Martelli
Tim Roberts <[EMAIL PROTECTED]> wrote: ... > xrange used to be better. As I understand it, that's no longer the case. measuring is better than guessing: brain:~/codejam alex$ python -V Python 2.5c1 brain:~/codejam alex$ python -mtimeit 'for x in range(1000):pass' 1 loops, best of 3: 71.9

ubuntu crash

2006-09-08 Thread benjamin . grant
I typed in apt-get remove python and everything essentially was wiped off my computer. I jsut want to get it back to the point of whwen I installed ubuntu, I'd like to get my documentst back as well but doubt I'll be able to do this. I installed gnome so I have a graphical interface again but ca

Re: convert loop to list comprehension

2006-09-08 Thread Paul Rubin
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > > FWIW, the original loop looked perfectly fine and readable and I'd > > suggest going with that over these hacked-up listcomp solutions. Don't > > use a listcomp just for the sake of using a listcomp. > > Thanks for that, Carl. I think that using

Re: convert loop to list comprehension

2006-09-08 Thread [EMAIL PROTECTED]
Carl Banks wrote: > [EMAIL PROTECTED] wrote: > > Paul Rubin wrote: > > > [EMAIL PROTECTED] writes: > > > > print sum( ([i]*n for i,n in enumerate(seq)), []) > > > > > > Wow, I had no idea you could do that. After all the discussion about > > > summing strings, I'm astonished. > > > > Me too ... d

Re: convert loop to list comprehension

2006-09-08 Thread Carl Banks
[EMAIL PROTECTED] wrote: > Paul Rubin wrote: > > [EMAIL PROTECTED] writes: > > > print sum( ([i]*n for i,n in enumerate(seq)), []) > > > > Wow, I had no idea you could do that. After all the discussion about > > summing strings, I'm astonished. > > Me too ... despite what bearophile said, this is

Re: best split tokens?

2006-09-08 Thread Tim Chase
>> rgx = re.compile('\W+') >> >> if you don't mind numbers included you text (in the event you >> have things like "fatal1ty", "thing2", or "pdf2txt") which is >> often the case...they should be considered part of the word. >> >> If that's a problem, you should be able to use >> >> rgx =

Weekly Python Patch/Bug Summary

2006-09-08 Thread Kurt B. Kaiser
Patch / Bug Summary ___ Patches : 413 open ( +1) / 3407 closed (+10) / 3820 total (+11) Bugs: 897 open ( -3) / 6167 closed (+18) / 7064 total (+15) RFE : 234 open ( +1) / 238 closed ( +2) / 472 total ( +3) New / Reopened Patches __ Fix decim

Re: python readline error - please help - need it for scanner!

2006-09-08 Thread Frederic Wenzel
On 9/8/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > can configure, make and install > everything fine. I'm using python 2.4 I have ubuntu dapper drake. I am > trying to install hplip which requires python. When I do this, this > also works but while running the following error occurs: > Tr

pyserial problem: script stops reading

2006-09-08 Thread Frederic Wenzel
I wrote a script on Linux that uses pyserial to read status messages from a serial line using readlines(). For now, it just displays what it gets on stdout: 17:42 | 0005 | 02 | | 5 |Rack Abs.| - | --210 17:42 | 0008 | 02 | | 5 |Rack Abs.| - | --210 17:42 | 0001 | 02 | | 5 |Rack Abs

pyserial problem: script stops reading

2006-09-08 Thread Frederic Wenzel
I wrote a script on Linux that uses pyserial to read status messages from a serial line using readlines(). For now, it just displays what it gets on stdout: 17:42 | 0005 | 02 | | 5 |Rack Abs.| - | --210 17:42 | 0008 | 02 | | 5 |Rack Abs.| - | --210 17:42 | 0001 | 02 | | 5 |Rack Abs

python readline error - please help - need it for scanner!

2006-09-08 Thread benjamin . grant
can configure, make and install everything fine. I'm using python 2.4 I have ubuntu dapper drake. I am trying to install hplip which requires python. When I do this, this also works but while running the following error occurs: Traceback (most recent call last): File "/usr/local/bin/hp-setup",

Re: convert loop to list comprehension

2006-09-08 Thread MonkeeSage
Paul Rubin wrote: > "MonkeeSage" <[EMAIL PROTECTED]> writes: > > Ps. I don't know if xrange is faster...I thought the difference was > > that range created a temporary variable holding a range object and > > xrange created an iterator? > > There's no such thing as a "range object"; range creates a

Re: Map with an extra parameter

2006-09-08 Thread bearophileHUGS
ml1n: > Looks like someone already did: > http://mail.python.org/pipermail/python-list/2005-January/259870.html Don't belive too much in such general timings. Time your specific code when you think you need a true answer. Timing Python code is very easy and fast, and sometimes results are surprisi

Re: convert loop to list comprehension

2006-09-08 Thread Paul Rubin
"MonkeeSage" <[EMAIL PROTECTED]> writes: > Ps. I don't know if xrange is faster...I thought the difference was > that range created a temporary variable holding a range object and > xrange created an iterator? There's no such thing as a "range object"; range creates a list, which consumes O(n) mem

Re: convert loop to list comprehension

2006-09-08 Thread MonkeeSage
[EMAIL PROTECTED] wrote: > Cool ... and damn but you guys are fast with the answers. This appears > to work find, but in a quick and dirty test it appears that the [list] > version takes about 2x as long to run as the original loop. Is this > normal? You could also do it 'functionally' with map(),

Re: convert loop to list comprehension

2006-09-08 Thread Felipe Almeida Lessa
08 Sep 2006 17:33:20 -0700, Paul Rubin <"http://phr.cx"@nospam.invalid>: > [EMAIL PROTECTED] writes: > > print sum( ([i]*n for i,n in enumerate(seq)), []) > > Wow, I had no idea you could do that. After all the discussion about > summing strings, I'm astonished. Why? You already had the answer: s

Re: convert loop to list comprehension

2006-09-08 Thread Felipe Almeida Lessa
8 Sep 2006 17:37:02 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]>: > 1. Using an _ is an interesting way to use a throw-away variable. Never > would I think of that ... but, then, I don't do Perl either :) It's a kind of convention. For example, Pylint complains for all variables you set and don't

Re: Map with an extra parameter

2006-09-08 Thread ml1n
[EMAIL PROTECTED] wrote: > ml1n wrote: > > In the interests of speed my thinking was that using map would move the > > loop out of Python and into C, is that the case when using list > > comprehension? I'd always thought it was just syntatic short hand for > > a Python loop. > > In Python the fast

Re: Best Middle Tier Architechure?

2006-09-08 Thread Felipe Almeida Lessa
2006/9/8, Butternut Squash <[EMAIL PROTECTED]>: > I have to support multiple applications using different schema and > databases. Would like to present as much as a unified interface as > possible. I'd recomend CORBA as it supports multiple platforms and languages. SOAP and XML-RPC can be used as

Re: convert loop to list comprehension

2006-09-08 Thread [EMAIL PROTECTED]
Paul Rubin wrote: > [EMAIL PROTECTED] writes: > > print sum( ([i]*n for i,n in enumerate(seq)), []) > > Wow, I had no idea you could do that. After all the discussion about > summing strings, I'm astonished. Me too ... despite what bearophile said, this is faster than the 2nd example. Nearly as f

Re: convert loop to list comprehension

2006-09-08 Thread [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote: > Two possibile solutions: > > seq = [2, 3, 1, 9] > > print sum( ([i]*n for i,n in enumerate(seq)), []) > > print [i for i, x in enumerate(seq) for _ in xrange(x)] > Cool as well. So much to learn :) 1. Using an _ is an interesting way to use a throw-away variable. Never

Re: convert loop to list comprehension

2006-09-08 Thread Paul Rubin
[EMAIL PROTECTED] writes: > print sum( ([i]*n for i,n in enumerate(seq)), []) Wow, I had no idea you could do that. After all the discussion about summing strings, I'm astonished. -- http://mail.python.org/mailman/listinfo/python-list

Re: SQLwaterheadretard3 (Was: Is it just me, or is Sqlite3 goofy?)

2006-09-08 Thread Bryan Olson
Ben Sizer wrote: > It's not a crackpot theory. It's a completely reasonable theory. SQL is > based on relational algebra, which provides a mathematical set of > operators for grouping data that is stored in separate sets. That data > is selected and projected according to its value, and nothing els

Re: Map with an extra parameter

2006-09-08 Thread Paul Rubin
"ml1n" <[EMAIL PROTECTED]> writes: > In the interests of speed my thinking was that using map would move the > loop out of Python and into C, is that the case when using list > comprehension? I'd always thought it was just syntatic short hand for > a Python loop. Best to run benchmarks, but I don

Re: Map with an extra parameter

2006-09-08 Thread bearophileHUGS
ml1n wrote: > In the interests of speed my thinking was that using map would move the > loop out of Python and into C, is that the case when using list > comprehension? I'd always thought it was just syntatic short hand for > a Python loop. In Python the faster things are often the most simple. Y

Disabling modules using Modules/Setup

2006-09-08 Thread Ben Weintraub
Hello all, I'm trying to cross-compile Python and I've gotten the compilation working, but I would like to disable many of the modules from building or installing. I've read through the help in Modules/Setup and I see how it can be used to override setup.py for specifying where things are, but I

Unable to make python work properly

2006-09-08 Thread Benjamin Grant
Hi all, I'd greatly appreciate any help. I can configure, make and install everything fine. I'm using python 2.4 I have ubuntu dapper drake. I am trying to install hplip which requires python. When I do this, this also works but while running the following error occurs: Traceback (most recent c

Re: convert loop to list comprehension

2006-09-08 Thread [EMAIL PROTECTED]
Rob Williscroft wrote: > But my forth attemp yeilded (If that's a pun I do appologise) > this: > > >>> [ x for a in range(len(seq)) for x in [a] * seq[a] ] Ahh, that's the magic ... I didn't understand that one could have multiple "statments" in this single line. Now, you can't have python line

Re: Map with an extra parameter

2006-09-08 Thread ml1n
[EMAIL PROTECTED] wrote: > This may be what you need: > > class foo: > def __init__(self, a, b): > self.a = a > self.b = b > > vars = [1,2,3,4,5,6] > objects = [foo(a, 1) for a in vars] > > > Note that in Python the new is expressed wit the () at the end: > > > f = new foo() > > Bye,

Re: convert loop to list comprehension

2006-09-08 Thread bearophileHUGS
Two possibile solutions: seq = [2, 3, 1, 9] print sum( ([i]*n for i,n in enumerate(seq)), []) print [i for i, x in enumerate(seq) for _ in xrange(x)] The second one is probably quite faster. Bye, bearophile -- http://mail.python.org/mailman/listinfo/python-list

Re: best split tokens?

2006-09-08 Thread MonkeeSage
John Machin wrote: > Not picking on Tim in particular; try the following with *all* > suggestions so far: > > textbox = "He was wont to be alarmed/amused by answers that won't work" Not perfect, but would work for many cases: s = "He was wont to be alarmed/amused by answers that won't work" r = r

Re: convert loop to list comprehension

2006-09-08 Thread Rob Williscroft
[EMAIL PROTECTED] wrote in news:1157758817.446690.105620 @i42g2000cwa.googlegroups.com in comp.lang.python: > Please help my poor brain :) Every time I try to do a list > comprehension I find I just don't comprehend ... > > Anyway, I have the following bit of code: > > seq = [2, 3, 1, 9] > tmp =

Re: Map with an extra parameter

2006-09-08 Thread bearophileHUGS
This may be what you need: class foo: def __init__(self, a, b): self.a = a self.b = b vars = [1,2,3,4,5,6] objects = [foo(a, 1) for a in vars] Note that in Python the new is expressed wit the () at the end: > f = new foo() Bye, bearophile -- http://mail.python.org/mailman/list

Re: convert loop to list comprehension

2006-09-08 Thread Paul Rubin
Paul Rubin writes: > > Question is, can I do this as a list comprehension? > > import operator > x = reduce(operator.add, ([i]*a for i,a in enumerate(seq)), []) Maybe more in the iterative spirit: import itertools seq = [2, 3, 1, 9] x = itertools.chain(*([i]*a for i

Map with an extra parameter

2006-09-08 Thread ml1n
Hi, I'm not really sure how to explain this so maybe some example code is best. This code makes a list of objects by taking a list of ints and combining them with a constant: class foo: def __init__(self): self.a = 0 self.b = 0 def func(a,b): f = new foo() f.a = a f.b = b ret

Re: convert loop to list comprehension

2006-09-08 Thread Paul Rubin
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > seq = [2, 3, 1, 9] > tmp = [] > for a in range(len(seq)): > tmp.extend([a]*seq[a]) > > which correctly returns: > > [0, 0, 1, 1, 1, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3] > > Question is, can I do this as a list comprehension? import operator x =

Re: SQLwaterheadretard3 (Was: Is it just me, or is Sqlite3 goofy?)

2006-09-08 Thread [EMAIL PROTECTED]
Marc 'BlackJack' Rintsch wrote: > In <[EMAIL PROTECTED]>, > [EMAIL PROTECTED] wrote: > > > Ben Sizer wrote: > >> I don't think so... it doesn't take much to say that the module > >> implements a subset of SQL but stores ignores data types. > > > > So I can't just say > > > > WHERE qty=12 > > > > I

convert loop to list comprehension

2006-09-08 Thread [EMAIL PROTECTED]
Please help my poor brain :) Every time I try to do a list comprehension I find I just don't comprehend ... Anyway, I have the following bit of code: seq = [2, 3, 1, 9] tmp = [] for a in range(len(seq)): tmp.extend([a]*seq[a]) which correctly returns: [0, 0, 1, 1, 1, 2, 3, 3, 3, 3, 3, 3

Re: Looking for the Perfect Editor

2006-09-08 Thread Omar
thanks for the suggestions, fellas -- http://mail.python.org/mailman/listinfo/python-list

Re: how do you get the name of a dictionary?

2006-09-08 Thread MonkeeSage
Simon Brunning wrote: > On 8 Sep 2006 02:24:49 -0700, MonkeeSage <[EMAIL PROTECTED]> wrote: > > I guess I don't get the problem with the OP's request, either. There is > > already a name<->identifier mapping in place for objects. > > Do you mean a name<->object mapping? > > This, I think, isn't tru

Re: Building Python Based Web Application

2006-09-08 Thread Adam Jones
John Henry wrote: > Hi folks. > > I am interested on this topic as well. > > If my application is not database related, what would be a good choice? > > I have clients that wish to use my Python applications but I am not > willing to give them the code. So, I am thinking about setting it up > as

Re: Looking for the Perfect Editor

2006-09-08 Thread Omar
thanks for the suggestions, fellas -- http://mail.python.org/mailman/listinfo/python-list

Re: Best Middle Tier Architechure?

2006-09-08 Thread Butternut Squash
Felipe Almeida Lessa wrote: > 2006/9/7, Butternut Squash <[EMAIL PROTECTED]>: >> right now we are using c# and .net remoting in a way that just is not >> efficient. >> >> I want to rewrite a lot of what we do in python. I have seen XML-RPC and >> soap. Are there other options? > > It surely depe

Re: mysqldb + multi-threading

2006-09-08 Thread Bryan Olson
[EMAIL PROTECTED] wrote: > Bryan> MySQL has its own process. It doesn't know nor care whether your > Bryan> application makes connections from different processes or > Bryan> different threads in the same process. > > Yes, but on the client side the data structures may or may not be >

Re: Javadoc style python manual?

2006-09-08 Thread Paul Boddie
John J. Lee wrote: > [epydoc on the standard library] > Why do you expect to get useful docs that way? The canonical Python > stdlib docs live in LaTeX files, not in the docstrings. You may find > some useful bits and pieces in the docstrings too, or you may not. But wasn't the questioner reco

Re: Using Beautiful Soup to entangle bookmarks.html

2006-09-08 Thread George Sakkis
Francach wrote: > Hi George, > > Firefox lets you group the bookmarks along with other information into > directories and sub-directories. Firefox uses header tags for this > purpose. I'd like to get this grouping information out aswell. > > Regards, > Martin. Here's what I came up with: http://ra

Re: best split tokens?

2006-09-08 Thread John Machin
Tim Chase wrote: > > py> import re > > py> rgx = re.compile(r'(?:\s+)|[()\[\].,?;-]+') > > py> [s for s in rgx.split(astr) if s] > > ['Four', 'score', 'and', 'seven', 'years', 'ago', 'our', 'forefathers', > > 'who', 'art', 'in', 'heaven', 'hallowed', 'be', 'their', 'names', 'did', > > 'forthwith',

Re: urlopen() error

2006-09-08 Thread Paul McNett
Tempo wrote: > Hello. I am getting an error and it has gotten me stuck. I think the > best thing I can do is post my code and the error message and thank > everybody in advanced for any help that you give this issue. Thank you. > > # > Here's the code: > # > > import urlli

Re: super and __init__

2006-09-08 Thread Noah
Jason wrote: > Noah wrote: > > Am I the only one that finds the super function to be confusing? > > Unfortunately, I don't see a way of avoiding this problem with super(). > Any such super command resolves in the mro order. Since the mro order > invoked at a certain class can change depending on

Re: Building Python Based Web Application

2006-09-08 Thread John Henry
Hi folks. I am interested on this topic as well. If my application is not database related, what would be a good choice? I have clients that wish to use my Python applications but I am not willing to give them the code. So, I am thinking about setting it up as a web based application and let th

Re: SQLwaterheadretard3 (Was: Is it just me, or is Sqlite3 goofy?)

2006-09-08 Thread Paul McNett
[EMAIL PROTECTED] wrote: > Do you know what INNER JOIN means? > > Do you know how important it is to a relational database? > > Can you explain how an INNER JOIN can even work, in theory, > with dynamic data types? Let's stop the pissing contest and just see how it works. After all, this is Pyt

Re: Building Python Based Web Application

2006-09-08 Thread km
Hi,   I use Plone/Zope for and interface it with PostgreSQL . its pretty good. saves  lot of time. ofcourse the learning curve is steep. Zope uses CSS heavily and since ur comfortable with it it shouldnt take muchtime building the site with much less coding in python.   regards, KM   On 9/9/06, Ra

Re: urlopen() error

2006-09-08 Thread Rafal Zawadzki
Tempo wrote: > Hello. I am getting an error and it has gotten me stuck. I think the > best thing I can do is post my code and the error message and thank > everybody in advanced for any help that you give this issue. Thank you. > > # > Here's the code: > # > > import urll

Unicode / cx_Oracle problem

2006-09-08 Thread Richard Schulman
Sorry to be back at the goodly well so soon, but... ...when I execute the following -- variable mean_eng_txt being utf-16LE and its datatype nvarchar2(79) in Oracle: cursor.execute("""INSERT INTO mean (mean_id,mean_eng_txt) VALUES (:id,:mean)""",id=id,mean=mean) I not surprisingly get this

Re: super and __init__

2006-09-08 Thread Jason
Noah wrote: > Am I the only one that finds the super function to be confusing? > > I have a base class that inherits from object. > In other words new style class: > > class foo (object): > def __init__ (self, arg_A, arg_B): > self.a = arg_A > self.b = arg_B > # Do I n

urlopen() error

2006-09-08 Thread Tempo
Hello. I am getting an error and it has gotten me stuck. I think the best thing I can do is post my code and the error message and thank everybody in advanced for any help that you give this issue. Thank you. # Here's the code: # import urllib2 import re import xlrd from B

Re: SQLwaterheadretard3 (Was: Is it just me, or is Sqlite3 goofy?)

2006-09-08 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > Ben Sizer wrote: >> I don't think so... it doesn't take much to say that the module >> implements a subset of SQL but stores ignores data types. > > So I can't just say > > WHERE qty=12 > > I have to say > > WHERE (qty=12) OR (qty="12") No yo

Re: Building Python Based Web Application

2006-09-08 Thread Ramon Diaz-Uriarte
On 9/8/06, James Stroud <[EMAIL PROTECTED]> wrote: > Hello All, > > I am interested in setting up a modest invoicing system for some > consulting I am doing. I like the idea of managing this on the web and > creating invoices and printing them from a browser. However, I'm not > really sure where to

Re: Is it just me, or is Sqlite3 goofy?

2006-09-08 Thread Paul Rubin
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > As long as it's included in the standard library, I'm going > to use it. There is nothing wrong with the idea of a "lite" > database. It is very misleading, though, to claim it's SQL. Maybe it could be renamed by changing the "t" in "lite" to "k".

Re: Is it just me, or is Sqlite3 goofy?

2006-09-08 Thread [EMAIL PROTECTED]
Magnus Lycka wrote: > While I can understand your frustration, I think it is > important to think about the tone in our postings here. > Hydrocephalus is one of the most common birth defects, > and it's not terribly unlikely that someone who reads > this has a family member or someone else in his p

Re: best split tokens?

2006-09-08 Thread Tim Chase
> py> import re > py> rgx = re.compile(r'(?:\s+)|[()\[\].,?;-]+') > py> [s for s in rgx.split(astr) if s] > ['Four', 'score', 'and', 'seven', 'years', 'ago', 'our', 'forefathers', > 'who', 'art', 'in', 'heaven', 'hallowed', 'be', 'their', 'names', 'did', > 'forthwith', 'declare', 'that', 'all', '

Re: SQLwaterheadretard3 (Was: Is it just me, or is Sqlite3 goofy?)

2006-09-08 Thread Steve Holden
[EMAIL PROTECTED] wrote: > Ben Sizer wrote: >>[EMAIL PROTECTED] wrote: [...] >>>What are the chances that anything I send in as a bug report >>>will simply be ignored? Kind of like the Emporer's New Clothes, eh? >>>It would be an admission of ignorance and stupidity on the part >>>of the Python Dev

Re: Building Python Based Web Application

2006-09-08 Thread Adam Jones
James Stroud wrote: > Hello All, > > I am interested in setting up a modest invoicing system for some > consulting I am doing. I like the idea of managing this on the web and > creating invoices and printing them from a browser. However, I'm not > really sure where to start. I've played with some

egg and modpython

2006-09-08 Thread Wensheng
I installed pysqlite2 using easy_install. and got this when using it from modpython: -- Mod_python error: "PythonHandler etc.modpython" Traceback (most recent call last): File "/usr/lib/python2.4/sit

Re: Building Python Based Web Application

2006-09-08 Thread Jonathan LaCour
James Stroud wrote: > Basically, I want a jump start on data-base oriented web development > with a focus on applying my python skills. > > Any suggestions will be greatly appreciated. Two very popular frameworks are TurboGears (http://www.turbogears.org) and Django (http://www.djangoproject.com/

Re: SQLwaterheadretard3 (Was: Is it just me, or is Sqlite3 goofy?)

2006-09-08 Thread [EMAIL PROTECTED]
Ben Sizer wrote: > [EMAIL PROTECTED] wrote: > > Bruno Desthuilliers wrote: > > > SQLite never pretended to be a full-blown RDBMS - just a lightweight > > > simple embedded database as SQL-compliant as possible. > > > > Ah, *you* haven't read the documentation either! > > > > "as SQL-compliant as po

Re: best split tokens?

2006-09-08 Thread James Stroud
Jay wrote: > Let's say, for instance, that one was programming a spell checker or > some other function where the contents of a string from a text-editor's > text box needed to be split so that the resulting array has each word > as an element. Is there a shortcut to do this and, if not, what's th

Re: Javadoc style python manual?

2006-09-08 Thread Paul Rubin
[EMAIL PROTECTED] (John J. Lee) writes: > Why do you expect to get useful docs that way? The canonical Python > stdlib docs live in LaTeX files, not in the docstrings. You may find > some useful bits and pieces in the docstrings too, or you may not. Yucch. From http://www.gnu.org/software/em

Re: best split tokens?

2006-09-08 Thread Paul Rubin
"Jay" <[EMAIL PROTECTED]> writes: > Let's say, for instance, that one was programming a spell checker or > some other function where the contents of a string from a text-editor's > text box needed to be split so that the resulting array has each word > as an element. Is there a shortcut to do this

Re: best split tokens?

2006-09-08 Thread Tim Chase
> Let's say, for instance, that one was programming a spell checker or > some other function where the contents of a string from a text-editor's > text box needed to be split so that the resulting array has each word > as an element. Is there a shortcut to do this and, if not, what's the > best an

Re: best split tokens?

2006-09-08 Thread Felipe Almeida Lessa
8 Sep 2006 13:41:48 -0700, Jay <[EMAIL PROTECTED]>: > Let's say, for instance, that one was programming a spell checker or > some other function where the contents of a string from a text-editor's > text box needed to be split so that the resulting array has each word > as an element. Is there a s

Re: Javadoc style python manual?

2006-09-08 Thread John J. Lee
"Paul Boddie" <[EMAIL PROTECTED]> writes: [...] > Better usage of the find command could be made, and the resulting > process occupied over 0.5GB before producing 581MB of API documents on > disk. The resulting output reveals some major differences between some > modules and in the quality of the d

best split tokens?

2006-09-08 Thread Jay
Let's say, for instance, that one was programming a spell checker or some other function where the contents of a string from a text-editor's text box needed to be split so that the resulting array has each word as an element. Is there a shortcut to do this and, if not, what's the best and most eff

Building Python Based Web Application

2006-09-08 Thread James Stroud
Hello All, I am interested in setting up a modest invoicing system for some consulting I am doing. I like the idea of managing this on the web and creating invoices and printing them from a browser. However, I'm not really sure where to start. I've played with some CMS applications, but they s

Re: mysqldb + multi-threading

2006-09-08 Thread skip
Bryan> MySQL has its own process. It doesn't know nor care whether your Bryan> application makes connections from different processes or Bryan> different threads in the same process. Yes, but on the client side the data structures may or may not be thread-safe. A session on my web se

Re: Looking for the Perfect Editor

2006-09-08 Thread Doug Stell
Try www.TextPad.com. I've used it for years and love it. It understands many programming language constructs and can be taught to understand python so that things show up in color. On 7 Sep 2006 13:18:22 -0700, "Omar" <[EMAIL PROTECTED]> wrote: >I'd love the perfect editor that would be: > >a) fr

py2app question: Resources/Python -> Resources/lib/python2.4

2006-09-08 Thread Russell E. Owen
I was using an older version of py2app to distribute an application. This placed the python library code in TUI.app/Contents/Resources/Python I just upgraded to py2app 0.3.5 and now I find the same stuff is being put in TUI.app/Contents/Resources/lib/python2.4 This change breaks my code because

Re: mysqldb + multi-threading

2006-09-08 Thread Bryan Olson
hg wrote: > I am writing a transaction server (socket-based) under windows. > > I use mysqldb to log info into MySQL. > > It is all working and I need now to decide whether to use forks > (CreateProcess I guess) or threads. > > I saw in another thread that some db engines did have issues with be

Re: cx_Oracle question

2006-09-08 Thread Richard Schulman
Richard Schulman: >> cursor.execute("""select mean_eng_txt from mean >> where mean_id=:arg_1""",arg_1) Uwe Hoffman: >cursor.execute("""select mean_eng_txt from mean >where mean_id=:arg_1""",{"arg_1":arg_1}) R.S.'s error message: >> Traceback (most recent call

ANN: SQLObject 0.7.1rc1

2006-09-08 Thread Oleg Broytmann
Hello! I'm pleased to announce the 0.7.1rc1 release of SQLObject. What is SQLObject = SQLObject is an object-relational mapper. Your database tables are described as classes, and rows are instances of those classes. SQLObject is meant to be easy to use and quick to get started

Re: tkinter text event

2006-09-08 Thread Jay
Nevermind. It works. Sorry. I got my files mixed up! :-) John McMonagle wrote: > On Wed, 2006-09-06 at 17:54 -0700, Jay wrote: > > I'm having trouble with using the event with the Text object. > > When I use them together (which is a logical combination), I use this > > code: > > > > textb

Re: Best Python Books and Sites

2006-09-08 Thread Scott David Daniels
VV wrote: > I recently launched a question answer site that connects people with > problems to those with solutions. We let people with problems pay > solution providers $0.25 for problems in over 100 categories. ... > What are the best three sites for python information? > What are the best three

Re: tkinter text event

2006-09-08 Thread Jay
That makes sense, but it's not working. John McMonagle wrote: > On Wed, 2006-09-06 at 17:54 -0700, Jay wrote: > > I'm having trouble with using the event with the Text object. > > When I use them together (which is a logical combination), I use this > > code: > > > > textbox = Text(root, wra

Re: Linear regression in 3 dimensions

2006-09-08 Thread Andrew McLean
Bernhard, Levenberg-Marquardt is a good solution when you want to solve a general non-linear least-squares problem. As Robert said, the OPs problem is linear and Robert's solution exploits that. Using LM here is unnecessary and I suspect a fair bit less efficient (i.e. slower). - Andrew [EMA

  1   2   >