473,586 Members | 2,652 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 959

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

Similar topics

1
9465
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 code: DoCmd.ShowToolbar "Print Preview", acToolbarYes
3
3902
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 aborts with a SIGBUS inside the debugger as well. But when I use the print command inside the debugger, the program completes normally. I am...
5
1875
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 the health information at the level we want. QUESTION: Can we shut those off?? Any other suggestions?? Paul Sullivan
4
2066
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 the page, i can make the page saved without the 2 buttons in the saved page. However, when i try to print the page by clicking the button, the 2 buttons...
1
2289
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 going to explain what I would like to do. Clicking on the print button I would like to show immediately the print dialog without open a new window...
1
2317
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 but now I am not sure if that makes sense. Can you tell me please ? <html> <head>
1
4951
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 whether the user clicked either "print" or "cancel" in that print dialog box of windows. Please Help soon. Thanks T.Appasamy
10
1581
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 into "print()"...I mean, what's the point, exactly?? To look like a more "traditional" computer-language format? And what's with not supporting...
3
4894
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 need to know instead of typing so many %s can i write %6s in python, as | we do in C progm. I hate to tell you this, but "%6s" in C does NOT print...
0
7839
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...
0
8202
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8216
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...
0
6614
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...
1
5710
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...
0
5390
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...
0
3837
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...
1
1449
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1180
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.