Hans Larsen wrote:
Help!
I'm begginer in Python 3.+!
If i wih to update a module after an import and chages,
How could I do:
By "from imp import reload" and then reload(mymodule)
or how to use "exec(?)", it is mentoined in docs.
In Python ver. <3 reload(module) writes some
On 2 Nov, 10:49, "Hans Larsen" wrote:
> Help!
> I'm begginer in Python 3.+!
> If i wih to update a module after an import and chages,
> How could I do:
> By "from imp import reload" and then reload(mymodule)
> or how to use "exec(?)", it is mentoined in docs.
> In Python ve
Help!
I'm begginer in Python 3.+!
If i wih to update a module after an import and chages,
How could I do:
By "from imp import reload" and then reload(mymodule)
or how to use "exec(?)", it is mentoined in docs.
In Python ver. <3 reload(module) writes something back to interpr
On Fri, 02 Jan 2009 14:39:25 +0100, Stef Mientki wrote:
> thanks for all the answers,
> but I still don't understand it yet :-( So maybe someone could explain
> why the next few lines of code don't work:
>
> Code = ''
> Code += """multiline comment
> and more lines"""
> exec ( Code )
You don't
On Jan 3, 12:39 am, Stef Mientki wrote:
> Stef Mientki wrote:
> > hello,
>
> > I'm running scripts, with the execute function (Python 2.5),
> > and it seems that triple quoted strings are not allowed.
>
> > Is there a workaround,
> > or is thi
Stef Mientki wrote:
hello,
I'm running scripts, with the execute function (Python 2.5),
and it seems that triple quoted strings are not allowed.
Is there a workaround,
or is this a fundamental problem of the exec-function ?
thanks,
Stef Mientki
thanks for all the answers,
but I still
Steven D'Aprano wrote in news:016abfa1$0$6988$c3e8...@news.astraweb.com in
comp.lang.python:
> On Tue, 30 Dec 2008 15:35:28 -0600, Rob Williscroft wrote:
>
>> Stef Mientki wrote in news:mailman.6399.1230668197.3487.python-
>> l...@python.org in comp.lang.python:
>>
> And, by the way, exec i
e execute function (Python 2.5),
> >>>> and it seems that triple quoted strings are not allowed.
> >>>> Is there a workaround,
> >>>> or is this a fundamental problem of the exec-function ?
>
> >>> If you think about it, it should be obvi
On Tue, 30 Dec 2008 15:35:28 -0600, Rob Williscroft wrote:
> Stef Mientki wrote in news:mailman.6399.1230668197.3487.python-
> l...@python.org in comp.lang.python:
>
And, by the way, exec is a *statement*, not a function!
>> exec ( Init_Code, PG.P_Globals )
>>
>> I've really
On Tue, 30 Dec 2008 21:16:39 +0100, Stef Mientki wrote:
> I guess I've to remove all triple quoted strings from my code.
There's no problem with triple-quoted strings. You just have to quote
them properly.
>>> text = """x = 1
... y = x+2
... del x
... print y
... """
>>> exec text
3
You can
En Tue, 30 Dec 2008 18:16:39 -0200, Stef Mientki
escribió:
ibpe...@gmail.com wrote:
the message Steven sent you is ok to explain how to work with triple
quote
Yes, but not to work around my problem.
I guess I've to remove all triple quoted strings from my code.
Why so?
You only have to a
Stef Mientki wrote in news:mailman.6399.1230668197.3487.python-
l...@python.org in comp.lang.python:
>>> And, by the way, exec is a *statement*, not a function!
>>>
> exec ( Init_Code, PG.P_Globals )
>
> I've really doubt that this is a statement,
> unless I don't understand what a sta
it seems that triple quoted strings are not allowed.
>>>> Is there a workaround,
>>>> or is this a fundamental problem of the exec-function ?
>>>>
>>> If you think about it, it should be obvious that you can't surround a
>>> strin
ere a workaround,
or is this a fundamental problem of the exec-function ?
If you think about it, it should be obvious that you can't surround a
string to be compiled with any of the quotes that appear inside the
string to be compiled. That's about the only limitation I am aware of.
em of the exec-function ?
If you think about it, it should be obvious that you can't surround a
string to be compiled with any of the quotes that appear inside the
string to be compiled. That's about the only limitation I am aware of.
And, by the way, exec is a *statement*,
On Dec 30, 2:48 pm, Steve Holden wrote:
> Stef Mientki wrote:
> > hello,
>
> > I'm running scripts, with the execute function (Python 2.5),
> > and it seems that triple quoted strings are not allowed.
>
> > Is there a workaround,
> > or is this a funda
Stef Mientki wrote:
> hello,
>
> I'm running scripts, with the execute function (Python 2.5),
> and it seems that triple quoted strings are not allowed.
>
> Is there a workaround,
> or is this a fundamental problem of the exec-function ?
>
If you think about it,
hello,
I'm running scripts, with the execute function (Python 2.5),
and it seems that triple quoted strings are not allowed.
Is there a workaround,
or is this a fundamental problem of the exec-function ?
thanks,
Stef Mientki
--
http://mail.python.org/mailman/listinfo/python-list
Mosas wrote:
> Dear All,
> Php has exec function to run system commands and
> this function return last line of system command
> result. But in Python I can see only os.system()
> function to run system command but it doesn't return
> any result like php exec function
Dear All,
Php has exec function to run system commands and
this function return last line of system command
result. But in Python I can see only os.system()
function to run system command but it doesn't return
any result like php exec function.
I want to know about php equivalent
Thanks, both of these examples will help me clean my code and improve
it.
Scott
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
I'm a newbie to pthyon and I am creating an app with wxPython.
I have 7 tables (more on the way... they are feed from a database) that
need to be formatted in a certain way (DataTable() does this) and I am
just looking for a cleaner way to pass all of the Grids (grid_1,
gri
In this case, you can use getattr() instead of the exec statement:
getattr(self.frame, t).SetTable(DataTable(d, r[0]), True)
Jeff
pgp6KrffC7xJf.pgp
Description: PGP signature
--
http://mail.python.org/mailman/listinfo/python-list
I'm a newbie to pthyon and I am creating an app with wxPython.
I have 7 tables (more on the way... they are feed from a database) that
need to be formatted in a certain way (DataTable() does this) and I am
just looking for a cleaner way to pass all of the Grids (grid_1,
grid_2, etc) through the sam
24 matches
Mail list logo