My DOS window (running in windows ME) closes the second it finishes
running my programs. As you can imagine, this makes it hard to see the
results. I've gotten in the habit of putting raw_input("Pres s enter to
exit") at the end of every program, and in addition to being pain in
the butt, it often fails to work. Being new to programming in general,
I make more mistakes than most people. My programs often have errors
before they get to my raw_input command. They then display the error
and immediately close. It is naturally a lot easier to fix an error
when you know what the error is. This makes debugging even more
annoying than it ordinarily would be, if you can imagine that. I've
heard that it should be a simple preference fix, but I've asked around
and no one seems to know how.
Thank you, and please make all answers simple enough to be understood
by a highschool student and his father :) . 3 1300
When I have a Python script generating a lot of output, I either open
an output file and then print to it with
fp = open("results.t xt","w")
print>>fp,"stuf f"
or I redirect output to a file from the command line using ">" (also
works on Unix), for example
python foo.py > results.txt
An alternative is to open a shell buffer within Emacs or XEmacs, two
text editors with Python modes. You can run a Python script from within
the shell buffer, and the results will be printed there. You can move
around the shell buffer as if it were a file.
Gavin Bauer <gm*******@gmai l.com> writes: Thank you, and please make all answers simple enough to be understood by a highschool student and his father :) .
You might like to try IDLE, which is included with Python.
Gavin Bauer wrote: My DOS window (running in windows ME) closes the second it finishes running my programs. As you can imagine, this makes it hard to see the results. I've gotten in the habit of putting raw_input("Pres s enter to exit") at the end of every program, and in addition to being pain in the butt, it often fails to work. Being new to programming in general, I make more mistakes than most people. My programs often have errors before they get to my raw_input command. They then display the error and immediately close. It is naturally a lot easier to fix an error when you know what the error is. This makes debugging even more annoying than it ordinarily would be, if you can imagine that. I've heard that it should be a simple preference fix, but I've asked around and no one seems to know how.
I presume this means you are starting the program by the time-honored
expedient of double-clicking on it. For debugging you would probably
find it more satisfactory to run your programs from the command line,
and there's a FAQ that explains how at http://www.python.org/doc/faq/windows.html
If that isn't simple enough then please let me know, as it's *supposed*
to be.
Thank you, and please make all answers simple enough to be understood by a highschool student and his father :) .
If you wanted to get really adventurous you could try tweaking the
command that Windows runs when you double-click a Python script, but
we'll leave that for another time.
Welcome to Python!
regards
Steve
--
Steve Holden http://www.holdenweb.com/
Python Web Programming http://pydish.holdenweb.com/
Holden Web LLC +1 703 861 4237 +1 800 494 3119 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: delisonews |
last post by:
I'm looking for a simple, filesystem-based message board.
(No MySQL!) Something that I could include easily in my code:
include '../inc/messageboard.php';
.... so that the board shows up at the bottom of every PHP
page. The board should have just the basic features, like:
- posting capability
|
by: Patchwork |
last post by:
Hi Everyone,
Please take a look at the following (simple and fun) program:
////////////////////////////////////////////////////////////////////////////
/////////////
// Monster Munch, example program
#include <list>
|
by: Dan |
last post by:
Using XML::Simple in perl is
extreemly slow to parse big
XML files (can be up to 250M,
taking ~1h).
How can I increase my performance /
reduce my memory usage?
Is SAX the way forward?
|
by: Manuel Collado |
last post by:
I would like to write simple, yet well structured documents with a
really simple XML DTD (or schema). Either Docbook or SDocbook are
overkill for this simple case.
XHTML is simpler, but unstructured (no nested sections). And is not
really very simple.
Before trying to setup a stripped-down document format by myself, I
would like to know if there are simple XML document structure proposals
ready to be used (I dislike to reinvent the...
|
by: JKop |
last post by:
Take the following simple function:
unsigned long Plus5Percent(unsigned long input)
{
return ( input + input / 20 );
}
Do yous ever consider the possibly more efficent:
| |
by: Steven Blair |
last post by:
I have the following number:
64521234567890
and need to apply some sort of simple encryption.
Does c# have any classes for doing this. I cant use 3DES or anything as
complex as.
The size of the string cannot increase either (no more than 14 chars)
and must be numeric only.
|
by: abcd |
last post by:
I am trying to set up client machine and investigatging which .net
components are missing to run aspx page.
I have a simple aspx page which just has "hello world" printed....
When I request that page like http://machinename/dir1/hellp.aspx
instead of running that page it starts downloding ...whats missing here
....why the aspx engine not running the page....
|
by: firstcustomer |
last post by:
Hi,
Firstly, I know NOTHING about Javascript I'm afraid, so I'm hoping that
someone will be able to point me to a ready-made solution to my
problem!
A friend of mine (honest!) is wanting to have on his site, a Javascript
Calculator for working out the cost of what they want, for example:
1 widget and 2 widglets = £5.00
|
by: Giancarlo Berenz |
last post by:
Hi:
Recently i write this code:
class Simple
{
private:
int value;
public:
int GiveMeARandom(void);
|
by: Phillip Taylor |
last post by:
Hi guys, I'm looking to develop a simple web service in VB.NET but I'm
having some trivial issues. In Visual Studio I create a web services
project and change the asmx.vb file to this:
Imports System.Web.Services
Imports System.Web.Services.Protocols
Imports System.ComponentModel
<System.Web.Services.WebService(Namespace:="http://
wwwpreview.#deleted#.co.uk/~ptaylor/Customer.wsdl")_
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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 we have to send another system
| |