Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 03-28-2008
Edward Bishop Edward Bishop is offline
Registered User
 
Name: Edward
Organization: Sony
Project: Automated Test
 
Join Date: Oct 2005
Location: San Diego
Posts: 31
pythonw, loadSlice and popup windows

I have been trying to make my python applications more Windows friendly, in particular I am trying to eliminate annoying cmd windows. Creating wrappers with the .pyw extension allows me to create desktop shortcuts that, when clicked, start the application without an associated cmd shell window. However, when I do that I find that I get a flurry of cmd shells while the application loads. I traced that flurry to the loadSlice() command. Here is some code to illustrate:

Code:
#foo.py
import time
import Ice

for i in range(5):
    Ice.loadSlice('foo.ice')
    time.sleep(1)
Code:
// foo.ice
module Foo 
{
    interface Bar
    {        
        void keepAlive();
    };
};
If you run it with pythonw foo.py on Windows XP, or equivalently if you rename foo.py to foo.pyw and click on it, you will see a brief cmd shell pop up every time loadSlice() is called. Can anyone suggest a workaround?

Thanks!
__________________
Edward
Reply With Quote
  #2 (permalink)  
Old 03-29-2008
matthew's Avatar
matthew matthew is online now
ZeroC Staff
 
Name: Matthew Newhook
Organization: ZeroC, Inc.
Project: Internet Communications Engine
 
Join Date: Feb 2003
Location: NL, Canada
Posts: 1,061
I confirmed that this is occurring -- the issue is the launching of the C preprocessor when dynamically loading the slice files. The easiest workaround is to pre-translate the slice files with slice2py. This avoids the whole issue

With the upcoming Ice 3.3 release this will no longer occur.
Reply With Quote
  #3 (permalink)  
Old 03-29-2008
Edward Bishop Edward Bishop is offline
Registered User
 
Name: Edward
Organization: Sony
Project: Automated Test
 
Join Date: Oct 2005
Location: San Diego
Posts: 31
Hi Matthew,
Thanks for your quick reply. It's not an urgent issue, so I'll just wait for 3.3.
Regards,
__________________
Edward

Last edited by Edward Bishop : 03-29-2008 at 12:35 AM. Reason: typo in Matthew's name
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Windows installer David Bug Reports 14 08-22-2006 02:36 PM
Error using Ice.loadSlice() with nested *.ice hiasl Help Center 1 08-29-2005 08:00 AM
Intel compiler on Windows DeepDiver Bug Reports 2 01-03-2005 04:57 AM
IcePack for Windows? brian Help Center 2 01-06-2004 12:12 PM
Installing on Windows 2000 brian Help Center 4 10-08-2003 01:29 PM


All times are GMT -4. The time now is 10:21 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
(c) 2008 ZeroC, Inc.