473,395 Members | 1,948 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Having to "print" before method invocation?

I have an object (written as part C extension, part pure Python) called
foo that I've been using without much fuss for a few months now.
However, in my latest project (a rather large one involving
multi-threading, pygtk, etc.), I'm seeing some really strange behavior
with a particular instance of my foo object.

About midway through my program, any attempt to use the instance fails;
however, if I add print statements before trying to invoke methods on
it, the foo object instance works fine.

I thought it might have something to do w/ reference counting, but
calling sys.getrefcount() shows sane values both before and after the
method call.

I know it's almost pointless to ask this question w/out showing any
code, but does anyone have any general ideas about what might make
something "invalid" unless you print it to stdout before using it?

Mar 8 '06 #1
0 948

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

Similar topics

1
by: Prakash Wadhwani | last post by:
Under Tools->Startup I have set AllowBuiltInToolbars to NO. Thus in the Print Preview Window, the user cannot CLOSE the window or even Print. In my Report's on Open Event I place the foll...
3
by: Gavin Kreuiter | last post by:
I am looking for some advice on how to debug a program when the debugger "print" command actually clears the corruption. This is not the usual non-initialised memory problem, because the program...
5
by: Paul Sullivan | last post by:
We are a state agency that views protected medical information via our intranet. The screens even have privacy shields. Alarmingly, uses can "Print" and "Save As" which destroys the protection of...
4
by: Machi | last post by:
I have created a asp.net web form with one datagrid which is used to display some information in tabular format. However, in the page, there are 2 buttons which are "Save" and "Print", when i save...
1
by: BELIUS | last post by:
Hi all, I am implementing a "Print this Page" function in my ASP.NET application. This function should print a part of the page and I would like to use an MSDN Style "Print this Page". I'm...
1
by: Steff | last post by:
I am wandering if my code is making sense... I use a lot the print function. Is it weird in this case where I have to display an array ? I thought it would be better to have the entire array in php...
1
by: Appu | last post by:
How to Check in the window print dialog box whether we clicked either "print" or "cancel". while clicking a button i call wnidow.print() to pop up the windows PRint Dialog box. I want to check...
10
by: Prisoner at War | last post by:
Hi, your friendly neighborhood n00b here, just wondering why on earth the Py3K folks want to mess with a simple thing like the "print" "command" (is that what it's called, a command?), turning it...
3
by: Cameron Simpson | last post by:
On 18Aug2008 11:58, Beema Shafreen <beema.shafreen@gmail.comwrote: | In my script i have to print a series of string , so | | print "%s\t%s\t%s\t%s\t%s\t%s\t" %("a","v","t","R","s","f") | | I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
jinu1996
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...
0
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...

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.