473,666 Members | 2,138 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Pydev Console use vs. stdout/stderr

Just getting used to the PyDev environment in eclipse by playing with
a few simple programs. I'm also using wxPython GUI stuff.

I've noticed though that simple print commands in my code cause a
"wxPython:stdou t/stderr" popup window to display any print's I might
be dumping out, rather than going to the console in Eclipse.

Any suggestions of why this is? Another code example I was looking
at (which does not include any wx GUI stuff) has print commands whose
result ends up in the Eclipse console, just to further confuse me.

Is this something that wxPython is imposing on the environment?

Thx.
Ross.
Jun 27 '08 #1
2 2912
On May 15, 3:12 pm, RossGK <ros...@gmail.c omwrote:
Just getting used to the PyDev environment in eclipse by playing with
a few simple programs. I'm also using wxPython GUI stuff.

I've noticed though that simple print commands in my code cause a
"wxPython:stdou t/stderr" popup window to display any print's I might
be dumping out, rather than going to the console in Eclipse.

Any suggestions of why this is? Another code example I was looking
at (which does not include any wx GUI stuff) has print commands whose
result ends up in the Eclipse console, just to further confuse me.

Is this something that wxPython is imposing on the environment?
Yes, it's wxPython, it does that by default. Pass the keyword argument
"redirect" set to False to your wx.App object constructor:

app = wx.App(redirect =False)

Or to whatever class you derived from wx.App:

app = ClassDerivingFr omWxApp(redirec t=False)
Jun 27 '08 #2
On May 15, 5:26 pm, s0s...@gmail.co m wrote:
On May 15, 3:12 pm, RossGK <ros...@gmail.c omwrote:
Just getting used to the PyDev environment in eclipse by playing with
a few simple programs. I'm also using wxPython GUI stuff.
I've noticed though that simple print commands in my code cause a
"wxPython:stdou t/stderr" popup window to display any print's I might
be dumping out, rather than going to the console in Eclipse.
Any suggestions of why this is? Another code example I was looking
at (which does not include any wx GUI stuff) has print commands whose
result ends up in the Eclipse console, just to further confuse me.
Is this something that wxPython is imposing on the environment?

Yes, it's wxPython, it does that by default. Pass the keyword argument
"redirect" set to False to your wx.App object constructor:

app = wx.App(redirect =False)

Or to whatever class you derived from wx.App:

app = ClassDerivingFr omWxApp(redirec t=False)
Thank you! That was very helpful, and works fine.

-Ross.
Jun 27 '08 #3

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

Similar topics

2
4617
by: Francis Avila | last post by:
This is not really a python question, but a posix question. (If it's too little of a python question to be OT, please let me know.) I wanted a simple "bi-directional cat", i.e. something that passes stdin to a device, and takes the device's output to stdout (Like 'screen /dev/ttyS0'). I couldn't find a simple thing like this anywhere, so I figured I would just write one. However, I can't seem to get it to work: nothing is ever output...
1
5378
by: Oz | last post by:
This is long. Bear with me, as I will really go through all the convoluted stuff that shows there is a problem with streams (at least when used to redirect stdout). The basic idea is that my application (VB.NET) will start a process, redirect its stdout and capture that process' output, displaying it in a window. I've written a component for this, and a test application for the component. It allows me to specify a command to execute,...
6
1665
by: metiu | last post by:
Say I have a console app that does something in three steps: - opens a file - transfers the file through a serial port - does some elaborations and I want to build a GUI around it that, for example, sets the file name to open or starts the different steps. I started using wxPython (actually boa-constructor) to build a frame with everything I want.
6
17722
by: Kkaa | last post by:
I'm using the os.system command in a python script on Windows to run a batch file like this: os.system('x.exe') The third-party program x.exe outputs some text to the console that I want to prevent from being displayed. Is there a way to prevent the output of x.exe from python?
14
7408
by: nathan.shair | last post by:
Hello, I searched on Google and in this Google Group, but did not find any solution to my problem. I'm looking for a way to output stdout/stderr (from a subprocess or spawn) to screen and to at least two different files. eg. stdout/stderr -screen
2
1603
by: castironpi | last post by:
Presents a console permitting inspection. Input as well as output saved in Python-readable form. Python 2.5.1 memoryconsole4.py logging to My Documents\console.log .... def f( self ): .... print 2 .... '\tdef f( self ):\n\t\tprint 2\n' This enabled by a log file, optionally set to console.log. Contents are:
4
10502
by: Peter Nimmo | last post by:
Hi, I am writting a windows application that I want to be able to act as if it where a Console application in certain circumstances, such as error logging. Whilst I have nearly got it, it doesn't seem to write to the screen in the way I would expect. The output is:
0
1012
by: Fabio Zadrozny | last post by:
Hi All, Pydev and Pydev Extensions 1.3.16 have been released Details on Pydev Extensions: http://www.fabioz.com/pydev Details on Pydev: http://pydev.sf.net Details on its development: http://pydev.blogspot.com Release Highlights in Pydev Extensions: -----------------------------------------------------------------
4
1707
by: Kee | last post by:
Dear All I need a sample working under console using C#, basically it should looks like utilities under console support pipe and redirect operation. May I seek your help to send me a completed project/library sample of that pls? Regards
0
8445
marktang
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...
0
8356
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,...
1
8551
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,...
0
8640
tracyyun
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...
0
7386
agi2029
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...
1
6198
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 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...
0
5664
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4198
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2011
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.