Steven D'Aprano a écrit :
On Mon, 06 Sep 2010 00:57:30 +0200, bussiere bussiere wrote:
i've got a python.txt that contain python and it must stay as it
(python.txt)
Why? Is it against the law to change it? *wink*
how can i include it in my program ?
import python.txt doesn't work
You co
Thanks all for your response i will try out this week, you have give
me sufficient hints.
Thanks again.
Bussiere
--
http://mail.python.org/mailman/listinfo/python-list
Thanks all for your response i will try out this week, you have give
me sufficient hint.
Thanks again.
Bussiere
On Mon, Sep 6, 2010 at 9:50 AM, Niklasro(.appspot) wrote:
> On Sep 5, 10:57 pm, bussiere bussiere wrote:
>> i've got a python.txt that contain python and it must stay as it (python.txt
On Sep 5, 10:57 pm, bussiere bussiere wrote:
> i've got a python.txt that contain python and it must stay as it (python.txt)
>
> how can i include it in my program ?
> import python.txt doesn't work
> is there a way :
> a) to make an include("python.txt")
> b) tell him to treat .txt as .py file th
On Mon, 06 Sep 2010 00:27:13 +0100, MRAB wrote:
> import imp
> python = imp.load_source("python", "python.txt")
Nice!
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
On 9/5/2010 7:12 PM, Steven D'Aprano wrote:
fp = open("python.txt")
text = fp.read()
fp.close()
exec(text)
But keep in mind that the contents of python.txt will be executed as if
you had typed it yourself. If you don't trust the source with your life
(or at least with the contents of your compu
On 9/5/2010 6:57 PM, bussiere bussiere wrote:
i've got a python.txt that contain python and it must stay as it (python.txt)
If you are working for someone who is such an idiot as to impose such a
condition on you, you have our condolences.
how can i include it in my program ?
import python.
On 05/09/2010 23:57, bussiere bussiere wrote:
i've got a python.txt that contain python and it must stay as it (python.txt)
how can i include it in my program ?
import python.txt doesn't work
is there a way :
a) to make an include("python.txt")
b) tell him to treat .txt as .py file that i can ma
In article <4c8423d3$0$28657$c3e8...@news.astraweb.com>,
Steven D'Aprano wrote:
> fp = open("python.txt")
> text = fp.read()
> fp.close()
> exec(text)
> But keep in mind that the contents of python.txt will be executed as if
> you had typed it yourself. If you don't trust the source with your
In article ,
bussiere bussiere wrote:
> i've got a python.txt that contain python and it must stay as it (python.txt)
>
> how can i include it in my program ?
> import python.txt doesn't work
> is there a way :
> a) to make an include("python.txt")
> b) tell him to treat .txt as .py file that i
On Mon, 06 Sep 2010 00:57:30 +0200, bussiere bussiere wrote:
> i've got a python.txt that contain python and it must stay as it
> (python.txt)
Why? Is it against the law to change it? *wink*
> how can i include it in my program ?
> import python.txt doesn't work
You could write a custom impor
11 matches
Mail list logo