Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #40963

Re: Running external module and accessing the created objects

Path csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.000
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'parameter': 0.07; 'python': 0.09; 'app,': 0.09; 'closed,': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:module': 0.09; 'timestamp': 0.09; 'stored': 0.10; '"python': 0.16; '(eg.': 0.16; 'commandline': 0.16; 'coordinates': 0.16; 'example?': 0.16; 'executable,': 0.16; 'executable.': 0.16; 'hits': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'rerun': 0.16; 'script?': 0.16; 'sits': 0.16; 'stuff,': 0.16; 'subject:accessing': 0.16; 'subject:created': 0.16; 'wrote:': 0.17; 'example.': 0.17; 'saying': 0.18; '>>>': 0.18; 'app': 0.19; 'changes': 0.20; 'file.': 0.20; 'do.': 0.21; 'doc': 0.22; 'parse': 0.22; 'sends': 0.22; 'runs': 0.22; 'somebody': 0.23; 'user.': 0.23; 'idea': 0.24; 'script': 0.24; 'header:User-Agent:1': 0.26; 'separate': 0.27; 'question': 0.27; 'components': 0.27; 'header:X-Complaints-To:1': 0.28; 'run': 0.28; 'app.': 0.29; 'dictionary': 0.29; 'objects': 0.29; 'ends': 0.30; 'normally': 0.30; 'window': 0.30; 'file': 0.32; 'running': 0.32; 'could': 0.32; 'received:comcast.net': 0.33; 'to:addr:python-list': 0.33; 'data,': 0.35; 'saved': 0.35; 'skip:: 10': 0.35; 'open': 0.35; 'doing': 0.35; 'too.': 0.35; 'there': 0.35; 'received:org': 0.36; 'really': 0.36; 'created': 0.36; 'should': 0.36; 'does': 0.37; 'two': 0.37; 'subject:: ': 0.38; 'mean': 0.38; 'object': 0.38; 'some': 0.38; 'to:addr:python.org': 0.39; 'takes': 0.39; 'where': 0.40; 'header:Received:5': 0.40; 'further': 0.61; 'email addr:gmail.com': 0.63; 'notices': 0.65; 'watching': 0.65; 'header :Reply-To:1': 0.68; 'sounds': 0.71; 'reply-to:no real name:2**0': 0.72; 'intervention': 0.84; 'watches': 0.84; 'angel': 0.93; 'processes,': 0.93
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Kene Meniru <Kene.Meniru@illom.org>
Subject Re: Running external module and accessing the created objects
Followup-To gmane.comp.python.general
Date Sat, 09 Mar 2013 12:39:46 -0500
Organization illom.org
References <mailman.3110.1362798411.2939.python-list@python.org> <513aecd3$0$6512$c3e8da3$5496439d@news.astraweb.com> <khfkqq$o09$1@ger.gmane.org> <513B5F88.9060002@davea.name> <khfpke$1mb$1@ger.gmane.org> <513B6F73.5010909@davea.name>
Mime-Version 1.0
Content-Type text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding 7Bit
X-Gmane-NNTP-Posting-Host c-68-49-243-100.hsd1.md.comcast.net
User-Agent KNode/4.4.7
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
Reply-To Kene.Meniru@illom.org
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.3136.1362850802.2939.python-list@python.org> (permalink)
Lines 66
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1362850802 news.xs4all.nl 6957 [2001:888:2000:d::a6]:38903
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:40963

Followups directed to: gmane.comp.python.general

Show key headers only | View raw


Dave Angel wrote:

>>>
>>> So the solution I am looking for is to have a graphic window open that
>>> watches user.py for changes.
> 
> It would then have to be a separate executable.  

This is my thinking too.

> Are you really saying
> you want this window to keep "running" after the script ends?  And that
> somehow it notices that the user has rerun the  user.py script?  Or
> could it simply be a window created during the user.py run that stays
> running till it's closed, which ends the script as well?

Following the idea that it should be a separate executable, the user does 
not have to run the script by doing "python user.py" as they would normally 
do. The window takes this over. It sits there watching for changes to 
user.py such as change in file size and/or time or if the user hits the 
enter key while it has focus.

My question really is how can the graphics window have access to the objects 
saved in the dictionary of the doc object after running "python user.py". It 
need to do this to be able to use their coordinates to redraw the view.

> 
>>> If there is a change the graphic window
>>> updates the rendition of the created components without further
>>> intervention by the user.
> 
> Is running the script considered intervention?  Or do you mean literally
> that somebody watches the script for changes (eg. by watching the
> timestamp)?
> 

I do not understand. What I mean is that this happens automatically. The 
user no longer needs to do "python user.py" the graphics window now should 
do this for the user when changes are detected in user.py by watching 
timestamp for example. 

>>> However this means that the graphic must
>>> somehow run python to parse user.py and then be able to access the
>>> objects stored in doc so that the coordinates can be used to update
>>> the view. This is where I am having difficulty.
>>

> If you really want two processes, then you should consider having the
> user run the the graphic app, with a commandline parameter of user.py,
> and have it create the user.py process.  The user.py process runs till
> it has created all the data, then sends it via some ipc to the graphic
> app.  Once sent, it terminates.  The graphic app reads the ipc stuff,
> updates its graphics, then idles, watching for timestamp changes on the
> user.py file.
> 

This sounds interesting. What is ipc. Can you give me an example?

> 

-- 

Kene
::::::::::::::::::
KeMeniru@gmail.com

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Running external module and accessing the created objects  Kene Meniru <Kene.Meniru@illom.org> - 2013-03-08 22:06 -0500
  Re: Running external module and accessing the created objects Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-03-09 08:03 +0000
    Re: Running external module and accessing the created objects Kene Meniru <Kene.Meniru@illom.org> - 2013-03-09 06:05 -0500
      Re: Running external module and accessing the created objects Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-03-09 11:34 +0000
    Re: Running external module and accessing the created objects Chris Angelico <rosuav@gmail.com> - 2013-03-09 22:47 +1100
    Re: Running external module and accessing the created objects Dave Angel <davea@davea.name> - 2013-03-09 07:02 -0500
    Re: Running external module and accessing the created objects Kene Meniru <Kene.Meniru@illom.org> - 2013-03-09 10:34 -0500
      Re: Running external module and accessing the created objects Rick Johnson <rantingrickjohnson@gmail.com> - 2013-03-09 08:51 -0800
        Re: Running external module and accessing the created objects Kene Meniru <Kene.Meniru@illom.org> - 2013-03-09 12:21 -0500
          Re: Running external module and accessing the created objects Rick Johnson <rantingrickjohnson@gmail.com> - 2013-03-09 10:33 -0800
    Re: Running external module and accessing the created objects Dave Angel <davea@davea.name> - 2013-03-09 11:12 -0500
    Re: Running external module and accessing the created objects Kene Meniru <Kene.Meniru@illom.org> - 2013-03-09 11:56 -0500
    Re: Running external module and accessing the created objects Dave Angel <davea@davea.name> - 2013-03-09 12:20 -0500
    Re: Running external module and accessing the created objects Kene Meniru <Kene.Meniru@illom.org> - 2013-03-09 12:39 -0500
    Re: Running external module and accessing the created objects Kene Meniru <Kene.Meniru@illom.org> - 2013-03-09 13:18 -0500
    Re: Running external module and accessing the created objects Kene Meniru <Kene.Meniru@illom.org> - 2013-03-11 19:57 -0400
      Re: Running external module and accessing the created objects Rick Johnson <rantingrickjohnson@gmail.com> - 2013-03-11 23:40 -0700
    Re: Running external module and accessing the created objects Dave Angel <davea@davea.name> - 2013-03-11 20:48 -0400
    Re: Running external module and accessing the created objects Kene Meniru <Kene.Meniru@illom.org> - 2013-03-11 21:23 -0400
    Re: Running external module and accessing the created objects Kene Meniru <Kene.Meniru@illom.org> - 2013-03-11 21:58 -0400
    Re: Running external module and accessing the created objects Dave Angel <davea@davea.name> - 2013-03-11 22:16 -0400
    Re: Running external module and accessing the created objects Dave Angel <davea@davea.name> - 2013-03-11 22:11 -0400
    Re: Running external module and accessing the created objects Michael Torrie <torriem@gmail.com> - 2013-03-11 22:05 -0600
    Re: Running external module and accessing the created objects Dave Angel <davea@davea.name> - 2013-03-12 07:20 -0400
    Re: Running external module and accessing the created objects Kene Meniru <kemeniru@gmail.com> - 2013-03-12 13:38 +0000
    Re: Running external module and accessing the created objects Kene Meniru <kemeniru@gmail.com> - 2013-03-12 13:28 +0000

csiph-web