From jlearman at cisco.com Sun Sep 5 17:23:54 2004 From: jlearman at cisco.com (Jeff Learman) Date: Sun Sep 5 21:47:23 2004 Subject: [Idle-dev] problems with IDLE sys.stdin Message-ID: <4.3.2.7.2.20040904221153.029993a0@dingdong.cisco.com> When running under DOS, sys.stdin.readline() is valid. When running under IDLE, I get an attribute error when I try it. Also, I want to use msvcrt.getch() & getche() but they don't block as documented in Python docs section 22.1.2 (Console I/O). For example, this program: import msvcrt print msvcrt.kbhit() print "prompt: ", ch = msvcrt.getch() print print ord(ch) generates this output, without hitting any keys: 0 prompt: 0 It should block after printing "prompt: ", and only print the third line after a key is pressed. Sorry if this is a known issue, but there's no search option for the idle-dev archive. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/idle-dev/attachments/20040905/52812e42/attachment.html From jlearman at cisco.com Mon Sep 6 22:43:41 2004 From: jlearman at cisco.com (Jeff Learman) Date: Wed Sep 8 15:53:04 2004 Subject: [Idle-dev] problems with IDLE sys.stdin Message-ID: <4.3.2.7.2.20040906164337.0295f220@dingdong.cisco.com> When running under DOS, sys.stdin.readline() is valid. When running under IDLE, I get an attribute error when I try it. Also, I want to use msvcrt.getch() & getche() but they don't block as documented in Python docs section 22.1.2 (Console I/O). For example, this program: import msvcrt print msvcrt.kbhit() print "prompt: ", ch = msvcrt.getch() print print ord(ch) generates this output, without hitting any keys: 0 prompt: 0 It should block after printing "prompt: ", and only print the third line after a key is pressed. Sorry if this is a known issue, but there's no search option for the idle-dev archive. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/idle-dev/attachments/20040906/cf0d87c1/attachment.htm From xv0021 at yahoo.com Thu Sep 9 21:50:46 2004 From: xv0021 at yahoo.com (vegetax vegetax) Date: Thu Sep 9 22:01:05 2004 Subject: [Idle-dev] python ides Message-ID: <20040909195046.47884.qmail@web61301.mail.yahoo.com> Hi , i am learning python right now and i am realy impressed,i like it a lot, but i have faced a big barrier while learning it, the development enviropment. Well, first i come from a strong java background, i have diggested almost all the ugly the elephants, EJB, web services, etc and i must say it was an unpleasant experience, to make 10 files of interfaces,decorators,artifacts,bla,bla just to do the simpliest task,but well. But i must say that the ides played a huge roll to make things work in java, generate code, accelerate coding, completition, etc.I have used all of the most popular ides for java, intellj,nerbeans,eclipse,jbuilder,etc and i must say that eclipse is the most powerfull,but well to the point: There are no ides for python! just text editors with added functionality, i have tried all of them! pycrush,drpython,idle,boa,spe,eric3,wingide,komodo,blackader,etc. My conclusions are that all of them are missing the point of an ide, to make programers code faster!! most of the features all them has, i can live without them but they all miss core features realy needed to code fast!! I must say that komodo is the best of them, taking as a parameter, programers productivity, but it is increadibly slow and ugly in linux(in windows is very good,what a surprise!) I like the simplicity of idle, but it needs some core features: full callback tip suport while reading 'python in a nutshell' i needed to see what functions and attributes the sys module had, on a java ide i would just type sys. and a list of members would appear,when i focus on one of them the complete docstring would appear, that it just a huge save of time while learning a new module,which happens every day ,very very often. I wouldnt need to alt-tab the browser and search for documentation on that module,neither to go to the shell and type help(sys) , and then lookup for the members of the module and their docs. This is a huge time saver,to see the properties of an object while coding, and it happens all the time ,lots of times while coding. I have made a shell script wich use dir( to lookup the members, list them in a vertical list(much more readable) with the first line of docstring at thei right side of each of them. This is similar to what the ide should do when i say 'sys.', but i have to go to the shell, type zdir() and check out them, which is still very very slow. I cant,and i wont remember all the members of all the objects in python! it is inpractical! especialy for someone just learning the language, there is just too much to remember. code snipets,templates This is another real time saver,the hability to type for example sing + alt + space and that the ide checks for a sniped i made called singleton and when i press enter the sniped is copied to the buffer is unvaluable for fast programing. advanced code completitions helps a lot too,when i type SimpleCookie( then the close bracked is completed for me, same for {, "(for strings), etc , automaticaly adding imports as a need them,etc. refactoring realy improve fast coding and software quality. I think this is what python needs for a wider aceptance , python is better than php and java but it realy realy lacks essensial tools, if idle would come with those features i am 300% sure that much more people would give it a shoot,i see the same problem with lots of people learning python and some experienced python users who also 'needs' those essential features. Would some of those (at least the first one, the most needed) features hard to implement? i am wrong in some of my points? is idle being active developed? Please i need help, i dont know what to do =( ,i am losing hope , but i realy like python. _______________________________ Do you Yahoo!? Shop for Back-to-School deals on Yahoo! Shopping. http://shopping.yahoo.com/backtoschool From gubitz at netcologne.de Fri Sep 17 19:46:31 2004 From: gubitz at netcologne.de (Hans Gubitz) Date: Fri Sep 17 19:47:44 2004 Subject: [Idle-dev] idle -n Message-ID: <20040917174631.GA29773@redwitz79.de> Hallo, idle -n doesn't work with me. I am using idle 2.3 on a Debian-System. I can start idle as a single-user, but cannot use it without a subprocess. As far as I understand /usr/lib/python2.3/idlelib/PyShell.py there is now client in line 938 Hans -- Hans Gubitz From ceti at socorroisp.com Mon Sep 20 01:30:13 2004 From: ceti at socorroisp.com (Gene) Date: Tue Sep 21 17:29:10 2004 Subject: [Idle-dev] IDLE command line Message-ID: <000001c49ea0$9e5eb7a0$6502a8c0@dell8200a> How do I run a python program from IDLE command line window? Thanks, Gene -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/idle-dev/attachments/20040919/8d50e710/attachment.htm From kbk at shore.net Wed Sep 22 07:05:06 2004 From: kbk at shore.net (Kurt B. Kaiser) Date: Wed Sep 22 07:05:56 2004 Subject: [Idle-dev] idle -n In-Reply-To: <20040917174631.GA29773@redwitz79.de> (Hans Gubitz's message of "Fri, 17 Sep 2004 19:46:31 +0200") References: <20040917174631.GA29773@redwitz79.de> Message-ID: <87mzzilwql.fsf@hydra.localdomain> Hans Gubitz writes: > idle -n doesn't work with me. > > > I am using idle 2.3 on a Debian-System. I can start idle as a > single-user, but cannot use it without a subprocess. > > As far as I understand > /usr/lib/python2.3/idlelib/PyShell.py > > there is now client in line 938 Apparently you are using the CVS version of 2.3 since that code is not in the released 2.3.4 version of IDLE (1.0.3). I made an error when backporting the Tk error dialog fix on 6 Jun 04. I've corrected the release23-maint branch. Thanks very much for reporting this! Please try it again. -- KBK From kbk at shore.net Wed Sep 22 07:17:26 2004 From: kbk at shore.net (Kurt B. Kaiser) Date: Wed Sep 22 07:17:36 2004 Subject: [Idle-dev] IDLE command line In-Reply-To: <000001c49ea0$9e5eb7a0$6502a8c0@dell8200a> (ceti@socorroisp.com's message of "Sun, 19 Sep 2004 17:30:13 -0600") References: <000001c49ea0$9e5eb7a0$6502a8c0@dell8200a> Message-ID: <87isa6lw61.fsf@hydra.localdomain> "Gene" writes: > How do I run a python program from IDLE command line window? I assume you mean the window titled "Python Shell". The same way you would run it from the Python interactive interpreter. Import the module. If it won't import, it's probably not on your sys.path; you can cd to the directory containing the .py file before you start IDLE. If the module uses the if __name__ == "__main__" : some_function() idiom, that should be enough to run it. Otherwise, you will need to call some function in the module. See the tutorials: http://www.python.org/doc/2.3.4/tut/tut.html -- KBK From dblank at brynmawr.edu Wed Sep 22 08:19:05 2004 From: dblank at brynmawr.edu (Douglas S. Blank) Date: Wed Sep 22 08:19:09 2004 Subject: [Idle-dev] Using parts of IDLE? Message-ID: Hello, I'm new to this list and idle, so please point me in the right direction if there are docs, examples, or if I'm in the wrong place. I'd like to use parts of IDLE (say, the editor, the debugger, and the class and path browsers) from another Python Tk GUI. For example, I'd like to open up the idle editor if the user clicks on a filename in my GUI. It appears that IDLE likes to be the main GUI, but I have gotten this to work somewhat, by faking some bits: import Tkinter gui = Tkinter.Tk() # or something more complicated import idlelib.PyShell as PyShell from idlelib.FileList import FileList PyShell.flist = FileList(gui) # ... start up gui and somewhere else, triggered, perhaps, by a user's click: import idlelib.PyShell as PyShell PyShell.flist.open(file) Ok, so that sort of works, but there are problems, and doesn't seem very clean. Problems: 1. You can't actually edit files; error: 'module' has no attribute 'ps1' 2. If you close the idle file edit window, it closes the main gui 3. The path and path browsers do work (because of my hack of putting flist in PyShell module namespace) Big questions: Can you run the idle editor without the pyshell? Is there going to be a way to actually use the debugger from inside another gui? What is the best way to combine IDLE with another main GUI window? Thanks in advance for any pointers! -Doug -- Douglas S. Blank, Assistant Professor dblank@brynmawr.edu, (610)526-6501 Bryn Mawr College, Computer Science Program 101 North Merion Ave, Park Science Building Bryn Mawr, PA 19010 dangermouse.brynmawr.edu From cben at users.sf.net Wed Sep 22 23:59:24 2004 From: cben at users.sf.net (Beni Cherniavsky) Date: Thu Sep 23 00:14:17 2004 Subject: [Idle-dev] Re: IDLE command line In-Reply-To: <87isa6lw61.fsf@hydra.localdomain> References: <000001c49ea0$9e5eb7a0$6502a8c0@dell8200a> <87isa6lw61.fsf@hydra.localdomain> Message-ID: Kurt B. Kaiser wrote: > Import the module. If it won't import, it's probably not on your > sys.path; you can cd to the directory containing the .py file before > you start IDLE. > > If the module uses the > > if __name__ == "__main__" : > some_function() > > idiom, that should be enough to run it. Otherwise, you will need to > call some function in the module. > Nope, that idiom is intended precisely to *avoid* doing anything when imported. So if it's using this idiom you *would* need to call some_function(). Perhaps Kurt meant running it with execfile(), in which case it is run under '__main__' and the code would run by itself indeed. From kbk at shore.net Sat Sep 25 07:21:00 2004 From: kbk at shore.net (Kurt B. Kaiser) Date: Sat Sep 25 07:21:11 2004 Subject: [Idle-dev] IDLE command line In-Reply-To: <002c01c4a116$acf42390$6502a8c0@dell8200a> (ceti@nmt.edu's message of "Wed, 22 Sep 2004 20:40:20 -0600") References: <002c01c4a116$acf42390$6502a8c0@dell8200a> Message-ID: <87wtyij54z.fsf@hydra.localdomain> "Gene" writes: > I'm trying to run programs in the window titled "Python (command line)" > > I can import python modules but not my programs. > [...] > How do I cd? import os os.chdir('') However, it doesn't sound like you are using IDLE. You appear to be using Windows. The IDLE python interpreter shell window is titled, "Tk Python Shell" on my W2K box. The (non-IDLE) python interpreter window is titled, "Python (command line)" >From the 'Start' menu, navigate to Programs / Python 2.3 and click the IDLE (Python GUI) icon. This should start up IDLE and display the Python Shell window, which is a python interpreter running inside IDLE. You can then load your program with File / Open, edit as desired, and run it by hitting F5. It's easier than using the bare interpreter. -- KBK