Sorting a list

2008-10-28 Thread RC
unsortedList = list(["XYZ","ABC"]) sortedList = unsortedList.sort() print sortedList Why this return None? How do I get return as ["ABC", "XYZ"]? -- http://mail.python.org/mailman/listinfo/python-list

Simple print to stderr

2008-10-27 Thread RC
By default the print statement sends to stdout I want to send to stderr Try print "my meeage", file=sys.stderr I got SyntaxError: invalid syntax I try print "my message", sys.stderr But it still sent to stdout. What is the syntax? I wouldn't understand Python's manual print([object,

What are the syntax for &&, ||

2008-10-22 Thread RC
if condition1 && condition2: # and doThis elif condition3 || condition4: # or doThat In most of language have &&, || How do I do in Python? -- http://mail.python.org/mailman/listinfo/python-list

XML parser

2008-10-20 Thread RC
By default the document = xml.dom.minidom.parse(inputFileName.xml) This will convert all the & to & But I want to convert the & back to & Is there a module or method in Python? I know there is such method in PHP, but I am new in Python. Thanks! -- http://mail.python.org/mailman/listinfo/python-

JPype, Jython or JEPP?

2008-06-25 Thread RC
Dear Python Experts/Programmers, I'm going to write a Python program to access some Java class methods from our *.jar file. In your opinion, which way is the good (not the best) way to do that? JPype? http://sourceforge.net/projects/jpype Jython? http://www.jython.org/Project/ JEPP? (I don't t

Re: pymssql - insert NULL to int

2007-10-17 Thread rc
On Oct 17, 11:07 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > rc wrote: > > How to insert NULL values in to int field using params. > > > I'm trying to use pymssql.execute, passing the operation and list of > > params. One of the values in the

pymssql - insert NULL to int

2007-10-17 Thread rc
How to insert NULL values in to int field using params. I'm trying to use pymssql.execute, passing the operation and list of params. One of the values in the params is a NULL value going to int field. The pymssql._quote() puts ' around the NULL which causes an exception to be thrown, is there a

Re: win32com COMAdminCatalogObject Value method

2007-10-04 Thread rc
On Oct 2, 11:11 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Tue, 02 Oct 2007 12:12:09 -0300, rc <[EMAIL PROTECTED]> escribi?: > > >> Try objCOMAdminCatalogObject.SetValue("ID", AppID). > > When I try that I get exception: > >

Re: win32com COMAdminCatalogObject Value method

2007-10-02 Thread rc
> Try objCOMAdminCatalogObject.SetValue("ID", AppID). > > Roger- Hide quoted text - > > - Show quoted text - When I try that I get exception: AttributeError: Add.SetValue I think the only valid methods are: Key(), Name(), Valid() and Value() The thing I'm most confused about is that it

win32com COMAdminCatalogObject Value method

2007-10-01 Thread rc
I'm trying to convert VB code that registers COM+ components to Python. However, I'm unable to set values on COMAdminCatalogObject using the Value() method, it seems to think I'm trying to call the get method. VB Code: Dim cat As COMAdminCatalog Set cat = New COMAdminCatalog Dim apps As COMAdminCa

Re: Python compiler

2006-03-19 Thread Rc
"robert" <[EMAIL PROTECTED]> schreef in bericht news:[EMAIL PROTECTED] > Rc wrote: >> "DaveM" <[EMAIL PROTECTED]> schreef in bericht >> news:[EMAIL PROTECTED] >> >>>On Thu, 16 Mar 2006 13:34:14 +0100, "Méta-MCI" >>&

Re: Python compiler

2006-03-18 Thread Rc
my English it's maybe good to work with English newsgroupes.I'm not looking for a riot,because I don't understand the word.By the way, in case to learn Python,they told me it's the most esay language to start. But ,my question is when I start Python it is a Dos Window that op

Python compiler

2006-03-15 Thread Rc
Hello everybody I'm a newbie, fromBelgium. My question is where can I find a compiler for free. For Windows XP. Thanks Roger Sorry for my English -- http://mail.python.org/mailman/listinfo/python-list