473,414 Members | 1,951 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,414 software developers and data experts.

EasyDialogs module problem with python 2.4.1

First my setup:

I'm using the framework build of Python 2.4.1

( http://bob.pythonmac.org/archives/20...241-installer/ )

on an ibook G4 running Mac OS 10.3.8.

I installed wxPython 2.5.5.1 ( Unicode runtime 2.5.5.1 for the Panther
version of Macpython-OSX 2.4 )

( http://wxpython.org )

Now my problem:

EasyDialogs module

( http://www.python.org/doc/2.4.1/mac/...syDialogs.html )

works with pyshell (interactive python program included with wxPython)
but not with python launched at the terminal:
ie:

-----------------------

PyShell 0.9.4 - The Flakiest Python Shell
Sponsored by Orbtech - Your source for Python programming expertise.
Python 2.4.1 (#2, Mar 31 2005, 00:05:10)
[GCC 3.3 20030304 (Apple Computer, Inc. build 1666)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
import EasyDialogs
EasyDialogs.Message('hi')

Jul 19 '05 #1
5 2041
scott wrote:
EasyDialogs module

( http://www.python.org/doc/2.4.1/mac/...syDialogs.html )

works with pyshell (interactive python program included with wxPython)
but not with python launched at the terminal:


Could you be more precise what "works not" means? What do you expect
to happen, what happens instead?

Did you try pythonw?

Regards,
Martin
Jul 19 '05 #2
scott wrote:
First my setup:

I'm using the framework build of Python 2.4.1

( http://bob.pythonmac.org/archives/20...241-installer/ )

on an ibook G4 running Mac OS 10.3.8.

I installed wxPython 2.5.5.1 ( Unicode runtime 2.5.5.1 for the Panther
version of Macpython-OSX 2.4 )

( http://wxpython.org )

Now my problem:

EasyDialogs module

( http://www.python.org/doc/2.4.1/mac/...syDialogs.html )

works with pyshell (interactive python program included with wxPython)
but not with python launched at the terminal:
ie:

-----------------------

PyShell 0.9.4 - The Flakiest Python Shell
Sponsored by Orbtech - Your source for Python programming expertise.
Python 2.4.1 (#2, Mar 31 2005, 00:05:10)
[GCC 3.3 20030304 (Apple Computer, Inc. build 1666)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>import EasyDialogs
>>>EasyDialogs.Message('hi')
Sorry, the rest of the message:

At the terminal, EasyDialogs doesn't work:

------------------------

Last login: Mon Apr 18 10:30:53 on console
Welcome to Darwin!
scott$ python
Python 2.4.1 (#2, Mar 31 2005, 00:05:10)
[GCC 3.3 20030304 (Apple Computer, Inc. build 1666)] on darwin
Type "help", "copyright", "credits" or "license" for more information. import EasyDialogs
EasyDialogs.Message('hi') Traceback (most recent call last):
File "<stdin>", line 1, in ?
File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/plat-mac/EasyDialogs.py",
line 75, in Message
_interact()
File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/plat-mac/EasyDialogs.py",
line 53, in _interact
AE.AEInteractWithUser(50000000)
MacOS.Error: (-1713, 'no user interaction is allowed')


-------------------------

I want to use EasyDialogs as a user front end for some simple scripts
and can't do that until this issue is resolved. Thanks in advance.
Jul 19 '05 #3
scott wrote:
MacOS.Error: (-1713, 'no user interaction is allowed')


Try pythonw.

Martin
Jul 19 '05 #4
Martin v. Löwis wrote:
Try pythonw.


Thanks, that was it.

One more question, when I use the EasyDialogs module to, for example,
display a message in a dialog box, the dialog box doesn't appear directly.
I need to switch to 'python' by clicking on it on the dock or
alt-tabbing to 'python' in order to see the dialog box.

------------------

scott$ pythonw
Python 2.4.1 (#2, Mar 31 2005, 00:05:10)
[GCC 3.3 20030304 (Apple Computer, Inc. build 1666)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
import EasyDialogs
EasyDialogs.Message('hi')


(At this point the 'python' icon appears on the dock and starts jumping.
The actual dialog box won't appear until I manually switch to python
with alt-tab.)

-------------------

This again is in contrast to using Pyshell, where the dialog box
automagically appears without further user input upon entry of
EasyDialogs.Message('hi').

Question:
Can I get this Pyshell behavior using python from the terminal?
Jul 19 '05 #5
scott wrote:
Can I get this Pyshell behavior using python from the terminal?


One application is "active" at any point in time, and this application
controls the menu, has its windows displayed, and so on. So when the
Terminal.app is active, Python cannot be.

Now, it may be possible to programmatically change the active
application, but I don't know how.

Regards,
Martin
Jul 19 '05 #6

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

Similar topics

16
by: Jeff Wagner | last post by:
Is there a Python module or method that can convert between numeric bases? Specifically, I need to convert between Hex, Decimal and Binary such as 5Ah = 90d = 01011010b. I searched many places...
1
by: Peter Åstrand | last post by:
There's a new PEP available: PEP 324: popen5 - New POSIX process module A copy is included below. Comments are appreciated. ---- PEP: 324 Title: popen5 - New POSIX process module
8
by: Bo Peng | last post by:
Dear list, I am writing a Python extension module that needs a way to expose pieces of a big C array to python. Currently, I am using NumPy like the following: PyObject* res =...
8
by: Torsten Mohr | last post by:
Hi, i write an extension module in C at the moment. This module does some work on some own data types that consist of some values. The functions that can change the data are written in C. ...
1
by: wcc | last post by:
Hello group, Can I use EasyDialogs to select multiple files? I saw the function AskFileForOpen but which does not have a flag allowing selection of multiple files. Did I miss something? ...
25
by: Xah Lee | last post by:
Python Doc Problem Example: gzip Xah Lee, 20050831 Today i need to use Python to compress/decompress gzip files. Since i've read the official Python tutorial 8 months ago, have spent 30...
5
by: sophie_newbie | last post by:
OK this might seem like a retarded question, but what is the difference between a library and a module? If I do: import string am I importing a module or a library? And if i do...
1
by: alain MONTMORY | last post by:
Hello everybody, I am a newbie to python so I hope I am at the right place to expose my problem..... :-http://www.python.org/doc/2.4.2/ext/pure-embedding.html 5.3 Pure Embedding I download the...
1
by: Martin Rubey | last post by:
Dear all, I'm trying to call from common lisp functions written for Sage (www.sagemath.org), which in turn is written in python. To do so, I tried...
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
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,...
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...
0
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,...
0
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...
0
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...

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.