Re: Can a simple a==b 'hang' in and endless loop?

2006-01-18 Thread Fuzzyman
Claudio Grondi wrote: [snip..] > Yes, I know about 'is', > > but I mean, that it is not possible to use 'is' as replacement for '==' > operator to achieve in Python same behaviour as it is the case in C and > Javascript when comparing values with '=='. > 'is' does the C, Javascript job when compar

Re: Can a simple a==b 'hang' in and endless loop?

2006-01-18 Thread Fuzzyman
Claudio Grondi wrote: > Steve Holden wrote: [snip..] > The problem here is, that I mean, that in Python it makes no sense to > talk about a value of an object, because it leads to weird things when > trying to give a definition what a value of an object is. > You're saying that C and Java get rou

Re: Can a simple a==b 'hang' in and endless loop?

2006-01-18 Thread Claudio Grondi
Steve Holden wrote: > Claudio Grondi wrote: > [...] > >>> >> Yes, I know about 'is', >> >> but I mean, that it is not possible to use 'is' as replacement for >> '==' operator to achieve in Python same behaviour as it is the case in >> C and Javascript when comparing values with '=='. >> 'is' doe

Re: Can a simple a==b 'hang' in and endless loop?

2006-01-18 Thread Fuzzyman
Claudio Grondi wrote: [snip..]> > Perhaps you could try again in English? :-) Sorry, that's a very complex > > sentence and it isn't clear what yo mean. > Here in English ;-) : > a=[1] > ... many other statements here ... > b=[1] > a is b # False > a == b # True > a[0] is b[0] # unpredictable(?)

Re: Nit: please don't user "it's" unless you can substitute "it is" without changing your inteded meaning.

2006-01-18 Thread Spellman
Fuzzyman wrote: > BartlebyScrivener wrote: > > "The pronominal possessives hers, its, theirs, yours, and oneself have > > no apostrophe." > > > > Strunk & White, The Elements of Style. Section II.1 > > > > The Elements is a classic masterpiece of concision and lucidity, unlike > > Eats, Shoots, Sel

Re: OT: excellent book on information theory

2006-01-18 Thread Grant Edwards
On 2006-01-18, Paul Rubin <> wrote: > Terry Hancock <[EMAIL PROTECTED]> writes: >> > > Very interesting. And rather sad that editors think the >> > > average Amermican reader too dim-witted to figure out >> > > (in context, even) that a "car park" is a "parking lot" >> > > and a "dustbin" is a "tr

Re: New Python.org website ?

2006-01-18 Thread Tim Parkin
JW wrote: >Tim the Taller (I presume he's taller; he's Dutch) and the other critics >fail to realize is that no one reads "content". > >I'm assured that in print ads the only "content" anyone reads is in >picture captions, and you damn well better make sure your message is >conveyed there. Any oth

Re: Nit: please don't user "it's" unless you can substitute "it is" without changing your inteded meaning.

2006-01-18 Thread Spellman
Fuzzyman wrote: > BartlebyScrivener wrote: > > "The pronominal possessives hers, its, theirs, yours, and oneself have > > no apostrophe." > > > > Strunk & White, The Elements of Style. Section II.1 > > > > The Elements is a classic masterpiece of concision and lucidity, unlike > > Eats, Shoots, Sel

Re: Retaining Unix EOL when reading/writing in windows

2006-01-18 Thread Diez B. Roggisch
Nick Wain wrote: > I'm relatively new to PYTHON, using PYTHON 2.4 on Windows XP. I'm having a > problem as below. I've asked some other people in my office who are more > experienced in PYTHON, but they can't help. > > I have a number of files created in UNIX that have the UNIX end of line > (EOL)

Re: Nit: please don't user "it's" unless you can substitute "it is" without changing your inteded meaning.

2006-01-18 Thread Grant Edwards
On 2006-01-18, Fuzzyman <[EMAIL PROTECTED]> wrote: > > Bengt Richter wrote: >> Typos happen to all of us, but in case you hadn't realized what "it's" >> is a contraction for ("it is"), now you do, and you can save yourself further >> embarrassment (assuming you care ;-). >> If your friends won't te

Re: Can a simple a==b 'hang' in and endless loop?

2006-01-18 Thread Fuzzyman
Oops... my misreading, sorry. The reason that, in Python, short ints have the same identity is not fickle - it's just True. Python creates a new reference (pointer) to the same object. You're saying you want one comparison operator that for : > a=[1] > ... many other statements here ... > b=[1]

MSSQL LIKE and IN statements in ADO problem

2006-01-18 Thread ram0812
Helo guys, I am trying to query the MSSQL DB using ADO. I am not able to make the LIKE statement fetch the correct results. Can anyone tell me what I need to do to get this working? Below is the code snippet: import win32com.client const = win32com.client.constants #co

Re: Can a simple a==b 'hang' in and endless loop?

2006-01-18 Thread Steve Holden
Claudio Grondi wrote: > Steve Holden wrote: [...] > The problem here is, that I mean, that in Python it makes no sense to > talk about a value of an object, because it leads to weird things when > trying to give a definition what a value of an object is. > I don;t understand why you say that. >

Re: Can a simple a==b 'hang' in and endless loop?

2006-01-18 Thread bonono
Fuzzyman wrote: > Claudio Grondi wrote: > > Steve Holden wrote: > [snip..] > > The problem here is, that I mean, that in Python it makes no sense to > > talk about a value of an object, because it leads to weird things when > > trying to give a definition what a value of an object is. > > > > You'

Re: Debugging python 2.2 code with Pydev

2006-01-18 Thread Fuzzyman
*Looks* like the plugin code isn't compatible with Python 2.2. (Some change in the way imports are resolved ?). PyDev will almost certainly use the same interpreter to run the code as the one it is using itself... There is possibly a PyDev mailing list to check on though. You could try installin

Re: Uncompressing TIFF files directly in Python

2006-01-18 Thread Peter Hansen
sophie_newbie wrote: > Hey guys, > > OK this is a long shot but does anyone know of a way to uncompress tiff > files directly in python. I know it can be done with an os call but > that'll only work on unix and only if the right software is installed! > > I need to convert tiff images downloaded

Re: Can a simple a==b 'hang' in and endless loop?

2006-01-18 Thread Peter Hansen
Claudio Grondi wrote: > but I mean, that it is not possible to use 'is' as replacement for '==' > operator to achieve in Python same behaviour as it is the case in C and > Javascript when comparing values with '=='. > 'is' does the C, Javascript job when comparing lists, but I mean it > fails to

Re: Can a simple a==b 'hang' in and endless loop?

2006-01-18 Thread Fuzzyman
[EMAIL PROTECTED] wrote: > Fuzzyman wrote: > > Claudio Grondi wrote: > > > Steve Holden wrote: > > [snip..] > > > The problem here is, that I mean, that in Python it makes no sense to > > > talk about a value of an object, because it leads to weird things when > > > trying to give a definition wha

Re: 10060, 'Operation timed out'

2006-01-18 Thread Sumit Acharya
Hi Steve, Thanks, I have started the run without try and except block, I will update with the findings tomm. Please keep this thread on for you so that I can get the solution -- http://mail.python.org/mailman/listinfo/python-list

Re: Using CGI to interface with an XML-RPC server

2006-01-18 Thread Rob Cowie
Please? I really could do with some help! -- http://mail.python.org/mailman/listinfo/python-list

Re: OT: excellent book on information theory

2006-01-18 Thread Tim Peters
[Paul Rubin] >> I wouldn't have figured out that a "car park" was a parking lot. I >> might have thought it was a park where you go to look at scenery from >> inside your car. Sort of a cross between a normal park and a drive-in >> movie. [Grant Edwards[ > ;) > > That's a joke, right? Probably

Re: Being unjust

2006-01-18 Thread Paul Rubin
"Kay Schluehr" <[EMAIL PROTECTED]> writes: > I'd be interested in what people think about bundling one of the > diverse Python webframeworks with the Python distribution which will be > "just there" as like Tcl/Tk+Tkinter for GUI-programming. Its not that I > don't trust people to make qualified de

Registering COM python based components when not admin

2006-01-18 Thread tooper
Hello, I'm failing to register a python based COM component without having admin rights... Using the usual hello world COM server that exist in many books/tutorial, and works perfecty when tested as admin, I first faced problems to write in registry as normal user. Some inspection of win32com.se

Addressing the modem via pyserial

2006-01-18 Thread Doru-Catalin Togea
Hi! I asked previously how to address the COM port from Python and I was directed to pyserial. It is very elegant and I guess it works very well. However, it seems that what I try to do is more complicated than I first thought. I want to make my modem place a call using the number '1234'. The

Re: Uncompressing TIFF files directly in Python

2006-01-18 Thread Paul Rubin
"sophie_newbie" <[EMAIL PROTECTED]> writes: > I need to convert tiff images downloaded from uspto.gov to pdf, these > images are compressed using G4, so I dunno if anyone knows of a method > of doing this witout the os call! Surely there is a utility out there > somewhere? There's a libtiff librar

Re: Can a simple a==b 'hang' in and endless loop?

2006-01-18 Thread bonono
Fuzzyman wrote: > The above gentleman is asserting that in *Python* the term value has no > meaning. I don't know what he meant and don't want to get into that value/reference/object thingy discussion as it would be a never ending thing. I just want to say that '==' in C is very clear to me, wheth

Re: Being unjust

2006-01-18 Thread Fredrik Lundh
Fuzzyman wrote: > > (hmm. maybe "web.py" fits the spec? but that's more a library than a > > frame- > > work, of course...) > > web.py has the great advantage that (allegedly) you can migrate apps > from CGI to FastCGI, mod_python, WSGI. > > It hardly counts as stable of course - having just be

Re: Using CGI to interface with an XML-RPC server

2006-01-18 Thread Fredrik Lundh
Rob Cowie wrote: > Is it possible to create python CGI scripts that accept form data in > the usual way, package them as an XML-RPC request, call the server, > receive the response then format this response into valid HTML to be > emitted to the client? Python ships with cgi and xmlrpc support (c

pythonic way of making a config module

2006-01-18 Thread andrew . fabbro
I'm working on an app that will be deployed on several different servers. In each case, I'll want to change some config info (database name, paths, etc.) In perl, I would have done something like this: Package Config; $dbname = "somename"; etc. And then use'd the module and referenced

Re: Can a simple a==b 'hang' in and endless loop?

2006-01-18 Thread Claudio Grondi
Fuzzyman wrote: > Claudio Grondi wrote: > [snip..] > >>Yes, I know about 'is', >> >>but I mean, that it is not possible to use 'is' as replacement for '==' >>operator to achieve in Python same behaviour as it is the case in C and >>Javascript when comparing values with '=='. >>'is' does the C, Jav

Re: Being unjust

2006-01-18 Thread Adrian Holovaty
Fuzzyman wrote: > web.py has the great advantage that (allegedly) you can migrate apps > from CGI to FastCGI, mod_python, WSGI. This isn't an advantage of web.py over other frameworks. You can do the same thing with Django, because it has a WSGI backend; people run Django with mod_python, FastCGI,

Re: pythonic way of making a config module

2006-01-18 Thread Fuzzyman
[EMAIL PROTECTED] wrote: > I'm working on an app that will be deployed on several different > servers. In each case, I'll want to change some config info (database > name, paths, etc.) > > In perl, I would have done something like this: > > Package Config; > > $dbname = "somename"; > etc

Re: Addressing the modem via pyserial

2006-01-18 Thread Fredrik Lundh
Doru-Catalin Togea wrote: > In the HyperTerminal which comes with Win XP Pro, I can set up a > connection to COM3 and there type the 'atdt1234' command. It works (I get > a call since I have the modem connected to a device with a phone on it). even without pressing enter? > My question is actual

Re: Can a simple a==b 'hang' in and endless loop?

2006-01-18 Thread bonono
Fuzzyman wrote: > Ok... so I'm now assuming that the information about '==' provided by > the above gentleman *and* that I understand it correctly. > > The only confusion in C (which doesn't have classes) is that two list > (like) objects can't be tested by value - only identity. > In C, they are

Re: The Python cross? Was New Python.org website

2006-01-18 Thread Paul McGuire
"Obaid R." <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Bugs wrote: > > I thought I read here that a new website design was in the works for > > python.org in time for the new year? Is that still true and of so, > > anyone know what is it's status? > > Thanks! > > > I googled arou

Re: Can a simple a==b 'hang' in and endless loop?

2006-01-18 Thread Fuzzyman
Ok... so I'm now assuming that the information about '==' provided by the above gentleman *and* that I understand it correctly. The only confusion in C (which doesn't have classes) is that two list (like) objects can't be tested by value - only identity. In Java, comparing strings using '==' comp

Re: chi-squared tests in python?

2006-01-18 Thread Robert Kern
Michael Anthony Maibaum wrote: > Coming from the scientific community I agree. A relatively shallow > selection of standard statistical methods would be very useful to > avoid requiring people to install a relatively large external package > (e.g. scipy) for a few simple stats methods. Gary

Re: Can a simple a==b 'hang' in and endless loop?

2006-01-18 Thread Claudio Grondi
Fuzzyman wrote: > Oops... my misreading, sorry. > > The reason that, in Python, short ints have the same identity is not > fickle - it's just True. Python creates a new reference (pointer) to > the same object. > > You're saying you want one comparison operator that for : > > >>a=[1] >>... many

Re: Can a simple a==b 'hang' in and endless loop?

2006-01-18 Thread Fuzzyman
I'm not familiar with the C basic datatypes - I assume it has an array or list like object. Would it contain a sequence of poitners to the members ? In which case they would only be equal if the pointers are the same. In this case : a = ['some string'] b = ['somestring'] a == b False (probably)

Re: OT: excellent book on information theory

2006-01-18 Thread Alex Martelli
Rocco Moretti <[EMAIL PROTECTED]> wrote: > Alex Martelli wrote: > > Terry Hancock <[EMAIL PROTECTED]> wrote: > >... > >>due to the Evil Conspiracy of region-coding, I couldn't > >>watch the British DVD even if I were to import it (Well, > >>yeah I could, but it would be painful, and probably i

RE: New Python.org website ?

2006-01-18 Thread Tim Golden
[Shalabh Chaturvedi] | Hm. Am I the only one not particularly impressed? Sure the | front page is | 'slick' but a few clicks reveal a fairly shallow facade of marketing | material, with no real content. In general gives the impression of | 'phony' company trying to make a big impression. Most

Re: pythonic way of making a config module

2006-01-18 Thread skip
andrew> I'm working on an app that will be deployed on several different andrew> servers. In each case, I'll want to change some config info (database andrew> name, paths, etc.) andrew> In perl, I would have done something like this: ... andrew> What is a pythonic equiva

Re: making objects unassignable "read-only" (especially when extending)

2006-01-18 Thread Rocco Moretti
Johannes Zellner wrote: > Hi, > > can I make an object read-only, so that > > x = new_value > > fails (and x keeps it's orginal value)? Simon gave you a way of doing it when x is an attribute access (e.g. p.x). I am unaware of a way of doing it when x is a straight global or local. Unlike

Re: pythonic way of making a config module

2006-01-18 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > I'm working on an app that will be deployed on several different > servers. In each case, I'll want to change some config info (database > name, paths, etc.) > > In perl, I would have done something like this: > > Package Config; > > $dbname = "somename"; > etc

Re: OT: excellent book on information theory

2006-01-18 Thread Rocco Moretti
Alex Martelli wrote: > Terry Hancock <[EMAIL PROTECTED]> wrote: >... > >>due to the Evil Conspiracy of region-coding, I couldn't >>watch the British DVD even if I were to import it (Well, >>yeah I could, but it would be painful, and probably illegal, > > > I have a region-free DVD player her

Re: making objects unassignable "read-only" (especially when extending)

2006-01-18 Thread Fredrik Lundh
Johannes Zellner wrote: > can I make an object read-only, so that > > x = new_value > > fails (and x keeps it's orginal value)? the original x does contain the original value; assignment only changes the binding in the target namespace. you cannot override this. you can control attribute as

Re: Uncompressing TIFF files directly in Python

2006-01-18 Thread sophie_newbie
I mainly just need it to work with windows and assumed that an os call would only work with windows! I've downloaded that free image software and the ctypes program, it seems to be working but I haven't yet worked out how to get it to decompress a G4 TIFF image... If anyone knows it would be of h

Re: Can a simple a==b 'hang' in and endless loop?

2006-01-18 Thread Fredrik Lundh
Claudio Grondi wrote: > As also the fact, that when > a = [1,2.0,3L] > b = [1.0,2,3 ] > a==b # gives True > even if the objects in the lists are actually different, they all compare equal: >>> 1 == 1.0 True >>> 2.0 == 2 True >>> 3L == 3 True > or when the objects being members of the list redef

Re: Can a simple a==b 'hang' in and endless loop?

2006-01-18 Thread bonono
Claudio Grondi wrote: > As also the fact, that when > a = [1,2.0,3L] > b = [1.0,2,3 ] > a==b # gives True > even if the objects in the lists are actually different, > or when the objects being members of the list redefine __eq__ so, that > no matter how different they are, the lists always compare

Re: Can a simple a==b 'hang' in and endless loop?

2006-01-18 Thread Fuzzyman
Fuzzyman wrote: > I'm not familiar with the C basic datatypes - I assume it has an array > or list like object. > > Would it contain a sequence of poitners to the members ? In which case > they would only be equal if the pointers are the same. > > In this case : > > a = ['some string'] > b = ['som

Re: MSSQL LIKE and IN statements in ADO problem

2006-01-18 Thread gregarican
Can't you get rid of the Create Parameter part and directly pass along the value you are looking for? Something like... name = 'raj' cmd.CommandText= \ "SELECT * FROM tb_name WHERE firstname LIKE %%%s" % name This way the value of the name variable gets passed along when the CommandText m

Re: Uncompressing TIFF files directly in Python

2006-01-18 Thread Fredrik Lundh
"sophie_newbie" wrote: > I mainly just need it to work with windows and assumed that an os call > would only work with windows! > > I've downloaded that free image software and the ctypes program, it > seems to be working but I haven't yet worked out how to get it to > decompress a G4 TIFF image..

Re: Can a simple a==b 'hang' in and endless loop?

2006-01-18 Thread Fuzzyman
So you're no longer wanting to test for equality (as Fredrik has pointed out). All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: MSSQL LIKE and IN statements in ADO problem

2006-01-18 Thread gregarican
Sorry forgot to explain that with the string substitution stuff you can escape the percent sign by doubling it up. In my example I wanted to retain the leading percent sign before the value, in this case I wanted LIKE %raj to appear. So I doubled it up. That's why there are three percent signs in a

Re: Can a simple a==b 'hang' in and endless loop?

2006-01-18 Thread Fredrik Lundh
Fuzzyman wrote: > I'm not familiar with the C basic datatypes - I assume it has an array > or list like object. > > Would it contain a sequence of poitners to the members ? In which case > they would only be equal if the pointers are the same. > > In this case : > > a = ['some string'] > b = ['som

Re: Can a simple a==b 'hang' in and endless loop?

2006-01-18 Thread Fuzzyman
Peter Hansen wrote: > Claudio Grondi wrote: > > but I mean, that it is not possible to use 'is' as replacement for '==' > > operator to achieve in Python same behaviour as it is the case in C and > > Javascript when comparing values with '=='. > > 'is' does the C, Javascript job when comparing lis

Re: Can a simple a==b 'hang' in and endless loop?

2006-01-18 Thread bonono
Fuzzyman wrote: > I'm not familiar with the C basic datatypes - I assume it has an array > or list like object. > > Would it contain a sequence of poitners to the members ? In which case > they would only be equal if the pointers are the same. > > In this case : > > a = ['some string'] > b = ['som

Threads sleeping all instead of just one.

2006-01-18 Thread Vaclav Havlik
Hello. Could you advise me about this, please? I write a multi-thread program using the 'threading' module. Moreover, I use C++ extension. Two threads work inside this C++ extension in such way that one thread waits for the other to do something. However it seems that ALL python is stopped by th

Re: Convert Active Directory Object to string

2006-01-18 Thread Dirk Hagemann
Ok - this really works well for german special characters, but what to do with all the other encodings. What I could do is to try to vonvert it to latin-1 and if it fails I try latin-2 and so on. But is this really necessary? Isn't there may me a module which can do this for me and returns a string

Re: Can a simple a==b 'hang' in and endless loop?

2006-01-18 Thread Fuzzyman
Fredrik Lundh wrote: > Fuzzyman wrote: > > > I'm not familiar with the C basic datatypes - I assume it has an array > > or list like object. > > > > Would it contain a sequence of poitners to the members ? In which case > > they would only be equal if the pointers are the same. > > > > In this cas

Guessing _charset for MIMEText ?

2006-01-18 Thread Robert
How do I best guess the right (non-UTF, 8bit) default _charset for MIMEText on an arbitrary computer? Windows default encoding is quasi : 'mbcs' . No information >>> locale.getdefaultlocale()[1] #delivers for example: 'cp1252' but I guess 'cp1252' is not recognized commonly by email-reader

distutils user questions

2006-01-18 Thread boxy440
Hi, When I want to install a package in 2 steps, first building in a separate build dir (say, --build-base=~/temp/build_foo), then installing in my own packages directory (usually, --home=~/opt), for the install phase, how does setup.py know I've already run the build? That is, when I tell setup.p

Re: Arithmetic sequences in Python

2006-01-18 Thread Steven Bethard
Alex Martelli wrote: > Tom Anderson <[EMAIL PROTECTED]> wrote: >> Sounds good. More generally, i'd be more than happy to get rid of list >> comprehensions, letting people use list(genexp) instead. That would >> obviously be a Py3k thing, though. > > I fully agree, but the BDFL has already (tentat

CGI module callback / upload hook

2006-01-18 Thread Dominik Blystak
Hi, I am currently working on an AJAX upload progress bar written in python. The AJAX part is almost done but I noticed that progress data is only written if the entire file is transfered which makes the whole progress bar pointless. Is there any way in calling a function while processing an up

Re: Being unjust

2006-01-18 Thread Kay Schluehr
Adrian Holovaty wrote: > Fuzzyman wrote: > > web.py has the great advantage that (allegedly) you can migrate apps > > from CGI to FastCGI, mod_python, WSGI. > > This isn't an advantage of web.py over other frameworks. You can do the > same thing with Django, because it has a WSGI backend; people

Re: Using CGI to interface with an XML-RPC server

2006-01-18 Thread Rob Cowie
>Python ships with cgi and xmlrpc support (cgi and xmlrpclib, respectively), >so I'm not sure why you even think you have to ask... >1. use cgi to parse form data >2. use xmlrpclib to issue request >3. use print or your favourite html templating library to generate >output > >(it mi

Re: Debugging python 2.2 code with Pydev

2006-01-18 Thread Fabio Zadrozny
Actually, the issue is already solved... Will be available in the next release (if you have this problem and want it now, just contact me... it is just because of a Boolean Type -- just checking a NameError does the trick to use it in python 2.2). As for the interpreter... nope, pydev does not

Re: MSSQL LIKE and IN statements in ADO problem

2006-01-18 Thread Steve Holden
gregarican wrote: > Sorry forgot to explain that with the string substitution stuff you can > escape the percent sign by doubling it up. In my example I wanted to > retain the leading percent sign before the value, in this case I wanted > LIKE %raj to appear. So I doubled it up. That's why there ar

Embedding pure python statically -- possibly a newbie question

2006-01-18 Thread Geoff Wedig
I have inherited a project with an embedded python interpretter, and don't know much about it, but have been given the task of porting it to a new compiler/OS and have run into some problems. I seem to have got the embedded interpretter part of it working, and have worked out how to add c modul

Re: Threads sleeping all instead of just one.

2006-01-18 Thread Steve Holden
Vaclav Havlik wrote: > Hello. Could you advise me about this, please? > I write a multi-thread program using the 'threading' module. Moreover, I use > C++ extension. Two threads work inside this C++ extension in such way that > one thread waits for the other to do something. However it seems that

Re: Arithmetic sequences in Python

2006-01-18 Thread Paul Rubin
Steven Bethard <[EMAIL PROTECTED]> writes: > > I fully agree, but the BDFL has already (tentatively, I hope) > > Pronounced > > that the [...] form will stay in Py3K as syntax sugar for list(...). > > I find that to be a truly hateful prospect > > I'm not sure I find it truly hateful, but definit

Re: MSSQL LIKE and IN statements in ADO problem

2006-01-18 Thread Raja Raman Sundararajan
Yes, Steve you have a very good point. Gregarcian, I am using the parameterized SQL to avoid such vulunerability. for example in your example use name = "%'WAITFOR DELAY '00:00:03'--%" and directly substitute it to the statement "select * from table_name where name like '%s' " % (name) The server w

RE: MSSQL LIKE and IN statements in ADO problem

2006-01-18 Thread Michael . Coll-Barth
huh? This seems to work just fine for me... >>> name = '%raj%' >>> test = "SELECT * FROM tb_name WHERE firstname LIKE '%s'" % name >>> print test SELECT * FROM tb_name WHERE firstname LIKE '%raj%' -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] n.org]On Behalf

Re: MSSQL LIKE and IN statements in ADO problem

2006-01-18 Thread gregarican
Steve Holden wrote: > Now Google for "sql injection vulnerability" and tell us why this is a > bad idea. The original poster didn't specify if they were writing production-level code on in Internet-facing server so I didn't exactly infer a context. You are correct in your statement. I was just po

Re: Using CGI to interface with an XML-RPC server

2006-01-18 Thread boxy440
Rob, your python cgi script is just like any other script -- simply import the xmlrpc lib and use it. The client accessing your cgi script will have to wait while your script goes off acting as an xml-rpc client doing whatever business it has to do. -- http://mail.python.org/mailman/listinfo/pyth

Re: The Python cross? Was New Python.org website

2006-01-18 Thread Steve Holden
Paul McGuire wrote: > "Obaid R." <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > >>Bugs wrote: >> >>>I thought I read here that a new website design was in the works for >>>python.org in time for the new year? Is that still true and of so, >>>anyone know what is it's status? >>>Th

Re: MSSQL LIKE and IN statements in ADO problem

2006-01-18 Thread Raja Raman Sundararajan
Yes, the statement you tried is a valid statement also >>> name = "%'WAITFOR DELAY '00:00:03'--%" >>> "SELECT * FROM tb_name WHERE firstname LIKE '%s'" % name is also valid. My question is how to use the LIKE statements using ADO.in python :-| -- http://mail.python.org/mailman/listinfo/python-lis

Re: MSSQL LIKE and IN statements in ADO problem

2006-01-18 Thread Raja Raman Sundararajan
Hi Gregarican, I am the original poster and yes this is a production code level problem. Do u have inputs for a solution? /Raja Raman -- http://mail.python.org/mailman/listinfo/python-list

use cases for a defaultdict

2006-01-18 Thread Steven Bethard
Steven Bethard wrote: > Agreed. I really hope that Python 3.0 applies Raymond Hettinger's > suggestion "Improved default value logic for Dictionaries" from > http://wiki.python.org/moin/Python3%2e0Suggestions > > This would allow you to make the setdefault() call only once, instead > of

Clicking at a certain x,y position in python? (Mac OSX)

2006-01-18 Thread Nainto
I have been searching and searching and cannot find a way to click at a certain position in python. (Similar to http://tinyurl.com/9tap2 in Cocoa) Does anyone know of a way? Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: Debugging python 2.2 code with Pydev

2006-01-18 Thread Fuzzyman
I didn't mean the same *instance* of the interpreter - same executable would have been more appropriate I 'spose.. Fuzzy http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: MSSQL LIKE and IN statements in ADO problem

2006-01-18 Thread Steve Holden
Raja Raman Sundararajan wrote: > Yes, the statement you tried is a valid statement > also > name = "%'WAITFOR DELAY '00:00:03'--%" "SELECT * FROM tb_name WHERE firstname LIKE '%s'" % name > > is also valid. > My question is how to use the LIKE statements using ADO.in python > :-| > Raja:

Re: Clicking at a certain x,y position in python? (Mac OSX)

2006-01-18 Thread Diez B. Roggisch
Nainto wrote: > I have been searching and searching and cannot find a way to click at a > certain position in python. (Similar to http://tinyurl.com/9tap2 in > Cocoa) Does anyone know of a way? Thanks. Use pyobjc to perform the code given in your example. Regards, Diez -- http://mail.python.or

Re: Clicking at a certain x,y position in python? (Mac OSX)

2006-01-18 Thread Nainto
There's no other way? I'd rather not have to use PyyyObjc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Clicking at a certain x,y position in python? (Mac OSX)

2006-01-18 Thread Nainto
There's no other way? I'd rather not have to use PyObjc. -- http://mail.python.org/mailman/listinfo/python-list

Determine the IP address of an eth interface

2006-01-18 Thread billie
Hi all. I'm searching for a module that permits me to low-level interact with ethernet interfaces of my system. I would like to determine at least the first of the followings values: 1 - IP address assigned to the interface 2 - subnet mask 3 - default gateway 4 - primary and secondary dns 5 - defa

list(...) and list comprehensions (WAS: Arithmetic sequences in Python)

2006-01-18 Thread Steven Bethard
Tom Anderson <[EMAIL PROTECTED]> wrote: > Sounds good. More generally, i'd be more than happy to get rid of list > comprehensions, letting people use list(genexp) instead. That would > obviously be a Py3k thing, though. Alex Martelli wrote: > I fully agree, but the BDFL has already (tentativel

Re: Determine the IP address of an eth interface

2006-01-18 Thread Nainto
This may depend on your OS. How about: http://www.inl.fr/nuface-doc/nupyf-doc-en.html#id2457044 -- http://mail.python.org/mailman/listinfo/python-list

Re: Clicking at a certain x,y position in python? (Mac OSX)

2006-01-18 Thread Diez B. Roggisch
Nainto wrote: > There's no other way? I'd rather not have to use PyObjc. Why not? You migth be able to write a pure ObjC-Program that then is invoked somehow from python - either command-line, or as extension-module. But I guess that means jumping through lots of hoops pyobjc has been through

Re: Clicking at a certain x,y position in python? (Mac OSX)

2006-01-18 Thread Nainto
Yeah. It would be a lot easyer just to be able to run asomething through the commandline but I'm not sure if commandline apps can take with the window server. If If anyone knows of any other way It would be greatly appreciated. (Thanks Diez) -- http://mail.python.org/mailman/listinfo/python-list

Re: Being unjust

2006-01-18 Thread Paul Boddie
Adrian Holovaty wrote: > Fuzzyman wrote: > > web.py has the great advantage that (allegedly) you can migrate apps > > from CGI to FastCGI, mod_python, WSGI. > > This isn't an advantage of web.py over other frameworks. You can do the > same thing with Django, because it has a WSGI backend; people r

Re: Uncompressing TIFF files directly in Python

2006-01-18 Thread Peter Hansen
sophie_newbie wrote: > I mainly just need it to work with windows and assumed that an os call > would only work with windows! Presumably you mistyped something there, since what you are basically saying is that an os call which only works on windows would suit you just fine since you only care a

Re: Can a simple a==b 'hang' in and endless loop?

2006-01-18 Thread Claudio Grondi
Steve Holden wrote: > Claudio Grondi wrote: > >> Steve Holden wrote: > > [...] > >> The problem here is, that I mean, that in Python it makes no sense to >> talk about a value of an object, because it leads to weird things when >> trying to give a definition what a value of an object is. >> >

Re: Being unjust

2006-01-18 Thread skip
Kay> The intention of bundling a framework does not imply that Kay> components should be combined to the next 600 Python webframeworks Kay> but that there is a clear recommendation in particular for Kay> beginners in Python. That's the rub though. There are lots of ways to approa

a more precise re for email addys

2006-01-18 Thread rbt
Is it possible to write an re that _only_ matches email addresses? I've been googling around and have found several examples on the Web, but all of them produce too many false positives... here are examples from Google that I've experimented with: re.compile('([EMAIL PROTECTED])') re.compile(r'

Re: MSSQL LIKE and IN statements in ADO problem

2006-01-18 Thread Roger Upole
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Helo guys, >I am trying to query the MSSQL DB using ADO. > I am not able to make the LIKE statement fetch the correct results. > Can anyone tell me what I need to do to get this working? > Below is the code snippet: > >impor

Re: Being unjust

2006-01-18 Thread Paul Rubin
[EMAIL PROTECTED] writes: > That's the rub though. There are lots of ways to approach web app > frameworks. They all have their pros and cons. Deciding on one to ship > with Python will likely be a significant challenge. There are maybe a half dozen plausible candidates. The first thing to do

Re: Can a simple a==b 'hang' in and endless loop?

2006-01-18 Thread Steve Holden
Claudio Grondi wrote: > > > > Subject: > Re: Can a simple a==b 'hang' in and endless loop? > From: > Claudio Grondi <[EMAIL PROTECTED]> > Date: > Wed, 18 Jan 2006 19:59:12 +0100 > > Newsgroups: > comp.lang.python

how to find not the next sibling but the 2nd sibling or find sibling "a" OR sinbling "b"

2006-01-18 Thread localpricemaps
i have some html which looks like this where i want to scrape out the href stuff (the www.cnn.com part) Cheese Blue http://www.cnn.com";> so i wrote this code which scrapes it perfectly: for incident in row('div', {'class':'noFood'}): b = incident.findNextSibling('div',

Re: a more precise re for email addys

2006-01-18 Thread Jim
There is a precise one in a Perl module, I believe. http://www.ex-parrot.com/~pdw/Mail-RFC822-Address.html Can you swipe that? Jim -- http://mail.python.org/mailman/listinfo/python-list

<    1   2   3   4   >