From gregorcasar at gmail.com Sun Oct 25 21:18:01 2009 From: gregorcasar at gmail.com (=?ISO-8859-2?Q?Gregor_=C8asar?=) Date: Sun, 25 Oct 2009 21:18:01 +0100 Subject: [Idle-dev] mixing input and output lines Message-ID: <4a4031c70910251318g3c1ffbc0q5d5f0682bd63b851@mail.gmail.com> When using multithreading the your input and output can mix creating havoc. I love IDLE and would really like to see this implemented in it. I'd code it myself, but none of my queries told me where to apply for dev or anything like this. Keep up the good work, Gregor -------------- next part -------------- An HTML attachment was scrubbed... URL: From mayuresh at omnesysindia.com Mon Oct 26 09:40:57 2009 From: mayuresh at omnesysindia.com (Mayuresh Marathe) Date: Mon, 26 Oct 2009 14:10:57 +0530 Subject: [Idle-dev] output improper Message-ID: Dear Sir, I would request kind help in sorting a problem out as I am getting improper results. I am pasting the program and its output for reference. Python 3.1.1 (r311:74483, Aug 17 2009, 17:02:12) [MSC v.1500 32 bit (Intel)] on win32 Type "copyright", "credits" or "license()" for more information. >>> print ("Please give a number: ") Please give a number: >>> a = input() 12 >>> Print ("And another :") Traceback (most recent call last): File "", line 1, in Print ("And another :") NameError: name 'Print' is not defined >>> print ("And another: ") And another: >>> b = input() 23 >>> print ("The sum of these numbers is :") The sum of these numbers is : >>> print (a+b) 1223 >>> print a+b SyntaxError: invalid syntax (, line 1) >>> print("a+b") a+b >>> print (a+b) 1223 >>> Best Regards, Mayuresh Marathe | Manager Operations - Mumbai Mob (+91) 9324704490 * mayuresh at omnesysindia.com Nothing Is Impossible For A Willing Heart .... -------------- next part -------------- An HTML attachment was scrubbed... URL: From kodazer at gmail.com Wed Oct 28 04:39:41 2009 From: kodazer at gmail.com (kodazer) Date: Tue, 27 Oct 2009 20:39:41 -0700 (PDT) Subject: [Idle-dev] Help needed for using IDLE under Ubuntu 8.04 In-Reply-To: <20479033.post@talk.nabble.com> References: <484D557D.6000109@vip.sina.com> <20479033.post@talk.nabble.com> Message-ID: <26088900.post@talk.nabble.com> Same exact situation. Ubuntu: 9.04 Python: 3.0.1 (also 2.6 installed) IDLE: 3.0.1 TK: 8.5 kay2008 wrote: > > got any clue yet? I encountered the same problem under Ubuntu 8.10, I > think the problem is with the call tip, that is the small box poped up > giving you a tip with regarding to the arguments expected when you type a > function. The problem occur not only when you type the closing > parenthesis, in fact, whatever you type, once the call tip box disappear, > the problem arise. > Ubuntu: 8.10 Chinese Mainland > Python: 2.6 > IDLE: 2.6 > TK:8.4 > -- View this message in context: http://www.nabble.com/Help-needed-for-using-IDLE-under-Ubuntu-8.04-tp17903673p26088900.html Sent from the Python - idle-dev mailing list archive at Nabble.com. From taleinat at gmail.com Wed Oct 28 23:23:53 2009 From: taleinat at gmail.com (Tal Einat) Date: Thu, 29 Oct 2009 00:23:53 +0200 Subject: [Idle-dev] output improper In-Reply-To: <4ae886ff.0b67f10a.3add.6959SMTPIN_ADDED@mx.google.com> References: <4ae886ff.0b67f10a.3add.6959SMTPIN_ADDED@mx.google.com> Message-ID: <7afdee2f0910281523rb736bceld1a11368a0fcb171@mail.gmail.com> Mayuresh Marathe wrote: > Dear Sir, > > > > I would request kind help in sorting a problem out as I am getting improper > results. I am pasting the program and its output for reference. > > > > Python 3.1.1 (r311:74483, Aug 17 2009, 17:02:12) [MSC v.1500 32 bit > (Intel)] on win32 > > Type "copyright", "credits" or "license()" for more information. > > >>> print ("Please give a number: ") > > Please give a number: > > >>> a = input() > > 12 > > >>> Print ("And another :") > > Traceback (most recent call last): > > File "", line 1, in > > Print ("And another :") > > NameError: name 'Print' is not defined > > >>> print ("And another: ") > > And another: > > >>> b = input() > > 23 > > >>> print ("The sum of these numbers is :") > > The sum of these numbers is : > > >>> print (a+b) > > 1223 > > >>> print a+b > > SyntaxError: invalid syntax (, line 1) > > >>> print("a+b") > > a+b > > >>> print (a+b) > > 1223 > > >>> > Hello Mayuresh, In version 3.0 and above of Python, the input() function always returns a string. To get what you want, pass the strings returned by input() into the int() function in order to convert them to integers, for example: >>> a = int(input()) In your above example, both 'a' and 'b' are variables referring to strings, not numbers. In Python, "adding" strings means concatenation, for example "abc" + "ecf" will become the string "abcdef", and similarly "12" + "23" becomes "1223". On the other hand, 12 + 23 becomes 35, since 12 and 23 are integers (whole numbers). It is useful to just write the name of a variable and then enter in the shell, which prints that variable's representation. For example: >>> a = "12" >>> b = 12 >>> a '12' >>> b 12 >From the output above you can see that the variable 'a' refers to a string, while the variable 'b' refers to an integer. Finally, this mailing list is for the discussion of IDLE itself. While I'm happy to help, general Python questions such as this are better directed to other places, where you will get more answer more quickly. See http://wiki.python.org/moin/BeginnersGuide, and specifically http://wiki.python.org/moin/BeginnersGuide/Help, for details on good places to get help for beginning with Python. I highly recommend posting on the comp.lang.python newsgroup, and searching there since answers to most Python questions are already there! Good luck! - Tal -------------- next part -------------- An HTML attachment was scrubbed... URL: From taleinat at gmail.com Wed Oct 28 23:29:35 2009 From: taleinat at gmail.com (Tal Einat) Date: Thu, 29 Oct 2009 00:29:35 +0200 Subject: [Idle-dev] mixing input and output lines In-Reply-To: <4a4031c70910251318g3c1ffbc0q5d5f0682bd63b851@mail.gmail.com> References: <4a4031c70910251318g3c1ffbc0q5d5f0682bd63b851@mail.gmail.com> Message-ID: <7afdee2f0910281529w2fe7b6fdr40ad406f1bc214eb@mail.gmail.com> Gregor ?asar wrote: > When using multithreading the your input and output can mix creating havoc. > > I love IDLE and would really like to see this implemented in it. I'd code > it myself, but none of my queries told me where to apply for dev or anything > like this. > > Keep up the good work, > > Gregor Hi Gregor, You've come to the right place if you want to try improving IDLE, since this is the mailing list for IDLE developers and maintainers. If you can implement it yourself, then you can submit a patch to the main Python issue tracker at bugs.python.org (don't forget to tag it with the "IDLE" category and also write IDLE in the subject). But it would be better to first explain the feature here to make sure that there is interest, to make sure that your effort doesn't go to waste. I couldn't understand the feature you are suggesting is. Care to explain in more detail, perhaps with examples? - Tal -------------- next part -------------- An HTML attachment was scrubbed... URL: