RE: [PyCrust] .pycrustrc files
Brought to you by:
pobrien
|
From: Patrick K. O'B. <po...@or...> - 2001-08-12 18:22:26
|
Relative works as well. So shell.runfile('.pycrustrc.py') should pick up the
one in the current directory.
---
Patrick K. O'Brien
Orbtech
"I am, therefore I think."
-----Original Message-----
From: pyc...@li...
[mailto:pyc...@li...]On Behalf Of Kevin Altis
Sent: Sunday, August 12, 2001 1:19 PM
To: pyc...@li...
Subject: RE: [PyCrust] .pycrustrc files
I forgot shell.runfile() existed. I just pass it a full path name?
ka
> -----Original Message-----
> From: pyc...@li...
> [mailto:pyc...@li...]On Behalf Of Patrick
> K. O'Brien
> Sent: Sunday, August 12, 2001 11:17 AM
> To: pyc...@li...
> Subject: RE: [PyCrust] .pycrustrc files
>
>
> shell.runfile() would be better short-term, than iterating shell.run().
>
> I haven't given enough thought to the long-term plan.
>
> ---
> Patrick K. O'Brien
> Orbtech
> "I am, therefore I think."
>
> -----Original Message-----
> From: pyc...@li...
> [mailto:pyc...@li...]On Behalf Of Kevin Altis
> Sent: Sunday, August 12, 2001 12:38 PM
> To: Pycrust-Users
> Subject: [PyCrust] .pycrustrc files
>
> Patrick,
> have you settled on a name for files to be automatically executed when
> PyCrust starts up? .pycrustrc sounds like what we were talking
> about a week
> ago. I'm going to change how the shell starts up in PythonCard.
> If there is
> a .pycrustrc file (or whatever the name is going to be) in the package
> directory, then it will load that file first, then it will load any
> .pycrustrc file it finds in the current working directory.
>
> So, my generic .pycrustrc will probably have:
> bg = pcapp.getCurrentBackground()
> comp = bg.components
>
> The .pycrustrc for the turtle sample will have:
> from wxTurtle import *
> dc = TurtleDC(pcapp.getCurrentBackground().panel)
> t = Pen(dc)
>
> The turtle sample .pycrustrc won't rely on the main .pycrustrc , because
> users could define their own .pycrustrc that wouldn't define 'bg'
> and 'comp'
>
> I'm just going to use readlines and pass each line to
> shell.run()
>
> Does this sound reasonable? Maybe PyCrust should have its own method that
> looks for a .pycrustrc in the directory passed in as a parameter,
> and if one
> exists, it reads it in and does the shell.run() commands? The
> return result
> would indicate success (1) or failure (0). That would increase the chance
> that all apps using PyCrust follow the same rules.
>
> ka
>
>
> _______________________________________________
> PyCrust-users mailing list
> PyC...@li...
> http://lists.sourceforge.net/lists/listinfo/pycrust-users
>
>
> _______________________________________________
> PyCrust-users mailing list
> PyC...@li...
> http://lists.sourceforge.net/lists/listinfo/pycrust-users
>
_______________________________________________
PyCrust-users mailing list
PyC...@li...
http://lists.sourceforge.net/lists/listinfo/pycrust-users
|