473,473 Members | 1,814 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

help debugging stdin in Komodo, IDLE, or PythonWin

I am really stuck here. I would love to use an IDE to debug my
programs, but they are all set to accept input from stdin, ie

python rdip.py < scriptfile.txt
I can't figure out how to do this in PythonWin, IDLE, or Komodo.
Help! I've been poring through manuals and google for hours trying to
figure this out.
Jul 18 '05 #1
1 2081
pe*******@yahoo.com (Pete Jereb) writes:
I am really stuck here. I would love to use an IDE to debug my
programs, but they are all set to accept input from stdin, ie
python rdip.py < scriptfile.txt


Okay, this doesn't actually solve your problem, but it's a
work-around.

sys.stdin = file('scriptfile.txt', 'r')

Comment that line out when you aren't running under the IDE. It's a
cheap hack, but at least you only need to add one line...

Nick

--
# sigmask || 0.2 || 20030107 || public domain || feed this to a python
print reduce(lambda x,y:x+chr(ord(y)-1),' Ojdl!Wbshjti!=obwAcboefstobudi/psh?')
Jul 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Glenn Reed | last post by:
This is just a general comment after trying my hand at some serious python programming for the first time. Have played with it for some time but this is the first serious thing I've done with it. ...
2
by: Thomas Lindgaard | last post by:
Hello I have a multi-threaded web spider and it has a problem (probably several). Is there a way to make the debugger show me what my worker threads are doing? I can only get it to follow the...
5
by: Will McGugan | last post by:
Hi, On my dev machine (P4 1.7Ghz Win2K) debugging with Komodo is painfuly slow. There is a delay of several seconds when stepping over a single line of code. Debugging the same code with...
4
by: Thomas Pfaff | last post by:
Hello all, I started using the nice Pythonwin IDE together with Python 2.3 (I have come to prefer its editor to IDLE). My problem is, that when I want to run a script in the debugger, I can...
1
by: Bo Peng | last post by:
Dear list, I am using rpy, a python module to control statistical package R from python. Running the following commands >>> from rpy import * >>> r.plot(0) will pass command 'plot' to R...
4
by: John & Mary Cook | last post by:
I just installed Python on Windows XP Pro. When I enter 'python' at the >>> prompt in Pythonwin IDE I get the following: Traceback (most recent call last): File "<interactive input>", line 1,...
3
by: Victor Ng | last post by:
Subject line pretty much says it all - are those the only two editors that support running the symbolic debugger from inside the editor? vic -- "Never attribute to malice that which can be...
4
by: sterling | last post by:
I'm curious as to why the difference between IDLE and pythonWin when using win32com. opening an excel file, i've attempted to grab the chart information out of the file. commands like co =...
19
by: fx5900 | last post by:
Hi, i am trying to convert an .osm (openstreetmap) file into gml format and finally to shapefile given this wiki info http://wiki.openstreetmap.org/index.php/GML. I'm using windows and when i...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.