Re: addressof object with id()

2013-03-23 Thread Nobody
On Sat, 23 Mar 2013 19:37:35 -0500, Fabian von Romberg wrote: > I have a single questions regarding id() built-in function. > > example 1: > > var1 = "some string" > var2 = "some string" > > if use the id() function on both, it returns exactly the same address. I'm assuming that you used somet

Re: Separate Rows in reader

2013-03-23 Thread Dave Angel
On 03/24/2013 01:20 AM, Jiewei Huang wrote: Hi all, Currently create a simple text-based database of information about people I have a csv file which consist of 3 rows , row 1 2 and 3 is as such: Name AddressTelephone Birthday John Konon Ministry of Moon Walks 4567882 2

Separate Rows in reader

2013-03-23 Thread Jiewei Huang
Hi all, Currently create a simple text-based database of information about people I have a csv file which consist of 3 rows , row 1 2 and 3 is as such: Name AddressTelephone Birthday John Konon Ministry of Moon Walks 4567882 27-Feb Stacy Kisha Ministry of Man Power

Re: addressof object with id()

2013-03-23 Thread rusi
On Mar 24, 8:33 am, Chris Angelico wrote: > On Sun, Mar 24, 2013 at 1:19 PM, Roy Smith wrote: > > In article <514e5f1f$0$30001$c3e8da3$54964...@news.astraweb.com>, > >  Steven D'Aprano wrote: > > >> Those who don't do serious floating point work hate NANs > > > This kind of thing doesn't just co

Re: addressof object with id()

2013-03-23 Thread Chris Angelico
On Sun, Mar 24, 2013 at 1:19 PM, Roy Smith wrote: > In article <514e5f1f$0$30001$c3e8da3$54964...@news.astraweb.com>, > Steven D'Aprano wrote: > >> Those who don't do serious floating point work hate NANs > > This kind of thing doesn't just come up in floating point work. SQL > folks have much

Re: addressof object with id()

2013-03-23 Thread Roy Smith
In article <514e5f1f$0$30001$c3e8da3$54964...@news.astraweb.com>, Steven D'Aprano wrote: > Those who don't do serious floating point work hate NANs This kind of thing doesn't just come up in floating point work. SQL folks have much the same issue with NULL. -- http://mail.python.org/mailman/

Re: addressof object with id()

2013-03-23 Thread Roy Smith
In article <514e5e71$0$30001$c3e8da3$54964...@news.astraweb.com>, Steven D'Aprano wrote: > As far as I know, there is no Python implementation that automatically > interns strings which are not valid identifiers. "some string" is not a > valid identifier, due to the space. I stand corrected.

Re: addressof object with id()

2013-03-23 Thread Steven D'Aprano
On Sun, 24 Mar 2013 11:56:50 +1100, Chris Angelico wrote: > On Sun, Mar 24, 2013 at 11:49 AM, Dave Angel wrote: >> You can assume that if the id's are equal, the objects are equal. But >> you can't assume the inverse or the converse. > > To be more specific: If the ids are equal, the objects ar

Re: addressof object with id()

2013-03-23 Thread Steven D'Aprano
On Sat, 23 Mar 2013 21:00:07 -0400, Roy Smith wrote: > In article , > Fabian von Romberg wrote: > >> Hi, >> >> I have a single questions regarding id() built-in function. >> >> example 1: >> >> var1 = "some string" >> var2 = "some string" >> >> if use the id() function on both, it returns e

Re: addressof object with id()

2013-03-23 Thread Steven D'Aprano
On Sat, 23 Mar 2013 19:37:35 -0500, Fabian von Romberg wrote: > Hi, > > I have a single questions regarding id() built-in function. > > example 1: > > var1 = "some string" > var2 = "some string" > > if use the id() function on both, it returns exactly the same address. The id() function does

Re: addressof object with id()

2013-03-23 Thread Chris Angelico
On Sun, Mar 24, 2013 at 12:00 PM, Roy Smith wrote: > I had thought interning only affected > string literals, but apparently it works for all strings! This works > too: > a = "b" + "ar" b = "ba" + "r" id(a) > 3810152 id(b) > 3810152 > > but, again, none of this is guaranteed.

Re: addressof object with id()

2013-03-23 Thread Roy Smith
In article , Chris Angelico wrote: > On Sun, Mar 24, 2013 at 11:49 AM, Dave Angel wrote: > > You can assume that if the id's are equal, the objects are equal. But you > > can't assume the inverse or the converse. > > To be more specific: If the ids are equal, the objects are identical. > Does

Re: addressof object with id()

2013-03-23 Thread Roy Smith
In article , Fabian von Romberg wrote: > Hi, > > I have a single questions regarding id() built-in function. > > example 1: > > var1 = "some string" > var2 = "some string" > > if use the id() function on both, it returns exactly the same address. Yup. This is because (in some implementatio

Re: addressof object with id()

2013-03-23 Thread Chris Angelico
On Sun, Mar 24, 2013 at 11:49 AM, Dave Angel wrote: > You can assume that if the id's are equal, the objects are equal. But you > can't assume the inverse or the converse. To be more specific: If the ids are equal, the objects are identical. Doesn't mean they'll compare equal - for instance, flo

Re: addressof object with id()

2013-03-23 Thread Dave Angel
On 03/23/2013 08:37 PM, Fabian von Romberg wrote: Hi, I have a single questions regarding id() built-in function. example 1: var1 = "some string" var2 = "some string" if use the id() function on both, it returns exactly the same address. example 2: data = "some string" var1 = data var2 = d

addressof object with id()

2013-03-23 Thread Fabian von Romberg
Hi, I have a single questions regarding id() built-in function. example 1: var1 = "some string" var2 = "some string" if use the id() function on both, it returns exactly the same address. example 2: data = "some string" var1 = data var2 = data if use the id() function on var1 and var2, it r

Re: how does the % work?

2013-03-23 Thread Steven D'Aprano
On Sat, 23 Mar 2013 09:57:48 -0600, Michael Torrie wrote: > On 03/23/2013 01:38 AM, Steven D'Aprano wrote: >> Just to add confusion, the two lines are exactly the same in Python 2, >> where Print is not a function! > > Perhaps this is a good reason use the slightly more complicated but > easier t

Re: SOAPpy.Types.faultType: Cannot use object of type stdClass as array

2013-03-23 Thread Chris Angelico
On Sun, Mar 24, 2013 at 6:38 AM, Tamer Higazi wrote: > Chris! > I did what you said before in several ways. > > The last way was putting the user and password directly into the dict as > parameter ALWAYS ends up telling me, that I cannot use object of > standard type class as ARRAY > > I did i

Re: SOAPpy.Types.faultType: Cannot use object of type stdClass as array

2013-03-23 Thread Tamer Higazi
Chris! I did what you said before in several ways. The last way was putting the user and password directly into the dict as parameter ALWAYS ends up telling me, that I cannot use object of standard type class as ARRAY I did it this time with suds. So packaging issue is now out of scope, and a

Re:

2013-03-23 Thread Joel Goldstick
On Sat, Mar 23, 2013 at 11:33 AM, Chris Angelico wrote: > On Sun, Mar 24, 2013 at 2:22 AM, Yann Manuel > wrote: > > Dear Mr/Mrs, > > > > I'm reading this book called dive into python 3, and the author does not > > describe everything, but he gives a link to a blog: > > (http://adam.gomaa.us/blo

Re: LiClipse

2013-03-23 Thread Fabio Zadrozny
On Sat, Mar 23, 2013 at 2:27 PM, rusi wrote: > On Mar 23, 4:11 pm, Fabio Zadrozny wrote: > > On Sat, Mar 23, 2013 at 12:38 AM, rusi wrote: > > > > > > ie Eclipse-4 claims to have made plugin development (for new custom > > > languages) easier. > > > What is the relation of liclipse to eclipse 3

Re: LiClipse

2013-03-23 Thread rusi
On Mar 23, 4:11 pm, Fabio Zadrozny wrote: > On Sat, Mar 23, 2013 at 12:38 AM, rusi wrote: > > > > ie Eclipse-4 claims to have made plugin development (for new custom > > languages) easier. > > What is the relation of liclipse to eclipse 3<->4 plugin architecture? > > Well, it may have become a bi

Re: how does the % work?

2013-03-23 Thread leonardo
thank you all! Il 23/03/2013 8.38, Steven D'Aprano ha scritto: On Fri, 22 Mar 2013 21:29:48 -0700, Tim Roberts wrote: leonardo selmi wrote: i wrote this example : name = raw_input("What is your name?") quest = raw_input("What is your quest?") color = raw_input("What is your favorite color?

Re: Required arguments in argparse: at least one of a group

2013-03-23 Thread Rob Day
I don't know about argparse, but if you use docopt (http://docopt.org/) then this is easy to do with something like: """Usage: finder.py --file --dir finder.py --pattern --dir finder.py --file --pattern --dir """ On 23 March 2013 16:04, Marco wrote: > Is there the possibility using the a

Re: "monty" < "python"

2013-03-23 Thread Mark Lawrence
On 23/03/2013 09:24, jmfauth wrote: On 20 mar, 22:02, Tim Delaney wrote: On 21 March 2013 06:40, jmfauth wrote: [snip usual rant from jmf] It has been acknowledged as a real regression, but he keeps hijacking every thread where strings are mentioned to harp on about it. He has sh

Welcome PythonScript: Python to Javascript translator in 350 lines of Python

2013-03-23 Thread Amirouche Boubekki
Héllo, I'm happy to announce the immediate avaibility of PythonScript a Python -> Javascript translator written in Python. So far it works... Break it online @ http://apppyjs.appspot.com How it works ? Similarly to PyPy, it use a restricted version of Python called PythonJS. Along side this tran

Re: "monty" < "python"

2013-03-23 Thread Mark Lawrence
On 23/03/2013 09:23, jmfauth wrote: On 21 mar, 04:12, rusi wrote: On Mar 21, 12:40 am, jmfauth wrote: Courageous people can try to do something with the unicode collation algorithm (see unicode.org). Some time ago, for the fun, I wrote something (not perfect) with a reduced keys tabl

Required arguments in argparse: at least one of a group

2013-03-23 Thread Marco
Is there the possibility using the argparse module to group two or more arguments in order to have at least one of them required? For instance, I would like to have not an error only in the following cases: python finder.py --file myfile --dir mydir python finder.py --pattern mypattern --di

Re: how does the % work?

2013-03-23 Thread Michael Torrie
On 03/23/2013 01:38 AM, Steven D'Aprano wrote: > Just to add confusion, the two lines are exactly the same in Python 2, > where Print is not a function! Perhaps this is a good reason use the slightly more complicated but easier to get right format method. print ("{0}, {1}, {2}".format(1,2,3))

Re: LiClipse

2013-03-23 Thread Fabio Zadrozny
On Sat, Mar 23, 2013 at 12:07 PM, Wanderer wrote: > On Saturday, March 23, 2013 7:11:10 AM UTC-4, Fabio Zadrozny wrote: > > On Sat, Mar 23, 2013 at 12:38 AM, rusi wrote: > > > > > > > > > > On Mar 23, 7:58 am, Fabio Zadrozny wrote: > > > > > > > > > Hello there, > > > > > > > > > > As I've prop

Re:

2013-03-23 Thread Chris Angelico
On Sun, Mar 24, 2013 at 2:22 AM, Yann Manuel wrote: > Dear Mr/Mrs, > > I'm reading this book called dive into python 3, and the author does not > describe everything, but he gives a link to a blog: > (http://adam.gomaa.us/blog/2008/aug/11/t ... y-builtin/). > The blog is gone and i cant find it.

[no subject]

2013-03-23 Thread Yann Manuel
Dear Mr/Mrs, I'm reading this book called dive into python 3, and the author does not describe everything, but he gives a link to a blog: (http://adam.gomaa.us/blog/2008/aug/11/t ... y-builtin/). The blog is gone and i cant find it. Does anyone knows where i can find the information of this bl

Re: LiClipse

2013-03-23 Thread Wanderer
On Saturday, March 23, 2013 7:11:10 AM UTC-4, Fabio Zadrozny wrote: > On Sat, Mar 23, 2013 at 12:38 AM, rusi wrote: > > > > > On Mar 23, 7:58 am, Fabio Zadrozny wrote: > > > > > Hello there, > > > > > > As I've proposed it, let me try to explain it a bit better (if you have > > > doubts

Re: SOAPpy.Types.faultType: Cannot use object of type stdClass as array

2013-03-23 Thread Chris Angelico
On Sun, Mar 24, 2013 at 12:33 AM, Tamer Higazi wrote: > Hi Chris! > thanks But I am about of going nuts I did everything according > their sample: > > http://kasapi.kasserver.com/dokumentation/?open=soap Since I'm not fluent in German, I'm relying on Google Translate to read of that page.

Re: how to install indico software?

2013-03-23 Thread Dave Angel
On 03/23/2013 10:38 AM, Mark Lawrence wrote: On 23/03/2013 14:15, Avnesh Shakya wrote: please tell me someone, how to install indico software? I have link-- http://indico-software.org/wiki/Admin/Installation0.98 http://indico-software.org/wiki/Releases/Indico0.99 is the link pointed to by:

Re: how to install indico software?

2013-03-23 Thread Mark Lawrence
On 23/03/2013 14:15, Avnesh Shakya wrote: please tell me someone, how to install indico software? I have link-- http://indico-software.org/wiki/Admin/Installation0.98 but i have problem, i have no sites-available folder inside apache, i m using window 7, please help me.. Thanks in advance Pl

how to install indico software?

2013-03-23 Thread Avnesh Shakya
please tell me someone, how to install indico software? I have link-- http://indico-software.org/wiki/Admin/Installation0.98 but i have problem, i have no sites-available folder inside apache, i m using window 7, please help me.. Thanks in advance -- http://mail.python.org/mailman/listinfo/pyth

Re: SOAPpy.Types.faultType: Cannot use object of type stdClass as array

2013-03-23 Thread Dave Angel
On 03/23/2013 09:33 AM, Tamer Higazi wrote: Hi Chris! thanks But I am about of going nuts I did everything according their sample: http://kasapi.kasserver.com/dokumentation/?open=soap and wanted to accomplish it in python! Isn't there an API on Python SOAPpy published somewhere? Wil

Re: SOAPpy.Types.faultType: Cannot use object of type stdClass as array

2013-03-23 Thread Tamer Higazi
Hi Chris! thanks But I am about of going nuts I did everything according their sample: http://kasapi.kasserver.com/dokumentation/?open=soap and wanted to accomplish it in python! If I pass a dict, I get the error telling me, this nonsense. What should I do?! I even tried it in "sud

Re: Change in Python 3.3 with the treatment of sys.argv

2013-03-23 Thread Chris Angelico
On Sat, Mar 23, 2013 at 11:27 PM, Colin J. Williams wrote: > It seems that a change was made in the program between the 3.3 run and the > other runs. > > Each produces the same heading now. Yep, this is why the simple testcase is so valuable :) Check out http://sscce.org/ (which Steven also point

Re: Change in Python 3.3 with the treatment of sys.argv

2013-03-23 Thread Colin J. Williams
On 22/03/2013 6:11 PM, Ethan Furman wrote: On 03/22/2013 02:57 PM, Colin J. Williams wrote: Below is an extract from some code to run on Python 2.7.3, 3.2.3 and 3.3.0 to compare speeds, both between versions and machines: if __name__ == '__main__': # Text string for initial test - Modify f

Re: LiClipse

2013-03-23 Thread Fabio Zadrozny
On Sat, Mar 23, 2013 at 12:38 AM, rusi wrote: > On Mar 23, 7:58 am, Fabio Zadrozny wrote: > > Hello there, > > > > As I've proposed it, let me try to explain it a bit better (if you have > > doubts, I should probably rephrase the proposal). > > > > There are 2 main targets there: keeping PyDev p

Re: Change in Python 3.3 with the treatment of sys.argv

2013-03-23 Thread Peter Otten
Colin J. Williams wrote: > No, the same program ran against each of the three versions. I assume > that 3.3 behaves differently. Please show some cooperation -- post actual code that shows the behaviour. Cut and paste instead of paraphrasing. Make it as small as you can. In your case that sho

Re: Change in Python 3.3 with the treatment of sys.argv

2013-03-23 Thread Colin J. Williams
On 22/03/2013 6:11 PM, Ethan Furman wrote: On 03/22/2013 02:57 PM, Colin J. Williams wrote: Below is an extract from some code to run on Python 2.7.3, 3.2.3 and 3.3.0 to compare speeds, both between versions and machines: if __name__ == '__main__': # Text string for initial test - Modify f

Re: Communication between C++ server and Python app

2013-03-23 Thread premiumtelco
I normally wouldn’t be able to find such great content as this on other sites. You have done a great job with each unique point made on this topic. Thank you for your hard work. - premium rate numbers Click Here premiumtelco -- View this message in context: http://python.6.n6.nabble.co

Re: "monty" < "python"

2013-03-23 Thread Chris Angelico
On Sat, Mar 23, 2013 at 8:45 PM, Chris Angelico wrote: > On Sat, Mar 23, 2013 at 8:23 PM, jmfauth wrote: >> One aspect of Unicode (note the capitalized "U"). >> >> [chomp yet another trivial microbenchmark] >> >> --- >> >> In French, depending of the word, a leading "h", behaves >> as a vowel or

Re: "monty" < "python"

2013-03-23 Thread Chris Angelico
On Sat, Mar 23, 2013 at 8:23 PM, jmfauth wrote: > One aspect of Unicode (note the capitalized "U"). > > [chomp yet another trivial microbenchmark] > > --- > > In French, depending of the word, a leading "h", behaves > as a vowel or as a consonant. > (From this -> this typical mistake) Huh? Did jm

Re: "monty" < "python"

2013-03-23 Thread jmfauth
On 21 mar, 04:12, rusi wrote: > On Mar 21, 12:40 am, jmfauth wrote: > > > > > > Courageous people can try to do something with the unicode > > collation algorithm (see unicode.org). Some time ago, for the fun, > > I wrote something (not perfect) with a reduced keys table (see > > unicode.org

Re: "monty" < "python"

2013-03-23 Thread jmfauth
On 20 mar, 22:02, Tim Delaney wrote: > On 21 March 2013 06:40, jmfauth wrote: > > > > > [snip usual rant from jmf] > > > It has been acknowledged as a real regression, but he keeps hijacking every > thread where strings are mentioned to harp on about it. He has shown no > inclination to at

Soappy: "Fault SOAP-ENV:Client: session_lifetime_syntax_incorrect"

2013-03-23 Thread Tamer Higazi
Hi people! I try to access the service of my provider through SOAP, with the credentials I received from my provider once before. Hier ist der 33 lines of code: from SOAPpy import WSDL from SOAPpy.Errors import HTTPError as SoapHTTPError from SOAPpy.Types import faultType import hashlib class K

Re: how does the % work?

2013-03-23 Thread Rick Johnson
On Saturday, March 23, 2013 2:38:23 AM UTC-5, Steven D'Aprano wrote: > On Fri, 22 Mar 2013 21:29:48 -0700, Tim Roberts wrote: > > print('''Ah, so your name is %s, your quest is %s, and your > > favorite color is %s.''') % (name, quest, color) > > The difference between those two statements ma

Re: how does the % work?

2013-03-23 Thread Steven D'Aprano
On Fri, 22 Mar 2013 21:29:48 -0700, Tim Roberts wrote: > leonardo selmi wrote: >> >>i wrote this example : >> >>name = raw_input("What is your name?") >>quest = raw_input("What is your quest?") >>color = raw_input("What is your favorite color?") >> >>print """Ah, so your name is %s, your quest

Re: how does the % work?

2013-03-23 Thread Rick Johnson
On Friday, March 22, 2013 11:29:48 PM UTC-5, Tim Roberts wrote: > You are using Python 3. In Python 3, "print" is a function that returns > None. So, the error is exactly correct. Wait a second... if he is in-fact using Python 3, then why did the call to a non-existent function named "raw_in