Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder1.xlned.com!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'url:sourceforge': 0.03; 'executed': 0.07; 'api': 0.09; 'scripts': 0.09; 'python': 0.09; 'file"': 0.09; 'files"': 0.09; 'namespace': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'runtime': 0.09; 'subject:module': 0.09; 'suggest': 0.11; '"file': 0.16; '"python': 0.16; 'code).': 0.16; 'interpreted.': 0.16; 'mistake.': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'saved,': 0.16; 'subject:accessing': 0.16; 'subject:created': 0.16; 'wrote:': 0.17; '(in': 0.18; 'input': 0.18; '(or': 0.18; 'app': 0.19; 'appropriate': 0.20; 'changes': 0.20; 'file.': 0.20; 'written': 0.20; 'trying': 0.21; 'commands,': 0.22; 'programming': 0.23; '(this': 0.24; 'header:User-Agent:1': 0.26; 'environment.': 0.27; 'header:X-Complaints-To:1': 0.28; 'actual': 0.28; 'run': 0.28; 'environment': 0.29; 'accomplished': 0.29; 'dialog': 0.29; 'push': 0.30; 'code': 0.31; '(and': 0.32; 'file': 0.32; 'johnson': 0.32; 'could': 0.32; 'certain': 0.33; 'picking': 0.33; 'received:comcast.net': 0.33; 'to:addr:python- list': 0.33; 'text': 0.34; 'done': 0.34; 'path': 0.35; 'skip:: 10': 0.35; 'received:org': 0.36; 'but': 0.36; 'loaded': 0.36; 'modules': 0.36; 'possible': 0.37; 'editor': 0.37; 'why': 0.37; 'subject:: ': 0.38; 'files': 0.38; 'to:addr:python.org': 0.39; 'step': 0.39; 'easily': 0.39; 'where': 0.40; 'header:Received:5': 0.40; 'think': 0.40; 'your': 0.60; 'link': 0.60; 'real': 0.61; 'time,': 0.62; 'course.': 0.62; 'between': 0.63; 'email addr:gmail.com': 0.63; 'show': 0.63; 'within': 0.64; 'want,': 0.65; 'watching': 0.65; 'header:Reply-To:1': 0.68; 'reply-to:no real name:2**0': 0.72; '2013': 0.84; 'graphical': 0.91; 'rick': 0.91; 'time)': 0.91 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Kene Meniru Subject: Re: Running external module and accessing the created objects Followup-To: gmane.comp.python.general Date: Sat, 09 Mar 2013 12:21:20 -0500 Organization: illom.org References: <513aecd3$0$6512$c3e8da3$5496439d@news.astraweb.com> 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 60 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1362849695 news.xs4all.nl 6940 [2001:888:2000:d::a6]:58690 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:40961 Rick Johnson wrote: > On Saturday, March 9, 2013 9:34:53 AM UTC-6, Kene Meniru wrote: > ============================================================ > Interactive Input > ============================================================ > > Create an interactive environment where the user can enter commands > directly into the namespace using your API in real time, then when he is > ready to see the result of those commands, he can call "display command" > or push a "display button" and the App will run the appropriate outside > programs to show the visualization. > > ============================================================ > Scripts loaded at runtime > ============================================================ > > If you prefer the user to write "scripts", and then have your App read > these scripts (and create visualizations from the commands within the > scripts) then the only difference between step 1 and step 2 is *when* the > commands are interpreted. In this case your app will *load* the scripts > AFTER they are completely written (this could be done automatically by the > app at runtime IF the path to these scripts is known, or could be > accomplished by the user picking files in a dialog (Menu->RunScript). > Please see my last response to Dave Angel. I think it is possible for a program to watch a file. I am not interested in menus which is why I am going this route. I could easily use PyQt to make this but I am not interested in graphical user interfaces. Are you are familiar with LaTeX? That is the system I very much want to emulate. > I think you are trying to create step 1 without the interactive > environment. This is your mistake. Having users work with "raw files" and > then *somehow* watching a "raw file" for certain "display commands" (in > real time) is folly. > It is possible to watch files for changes without user intervention. If a change is detected (whether by file size or time) the file can be executed as all python modules can be using "python FILENAME.py". How is this folly? > Heck, when you edit a file in a text editor you are only seeing a > representation of the file from the last time it was saved, and your app > could never know when the "file data" and the "file view" where > synchronized; without an asinine amount of foolish programming of course. > > If this is not what you want, then i suggest you create a simple > representation of your code (or link to the actual code). My code is available at http://sourceforge.net/projects/buildes. The documentation is at http://buildes.sourceforge.net/. -- Kene :::::::::::::::::: KeMeniru@gmail.com