This is an example : the value of np transmitted through the defined
integer_box fonction is effective in that function but is not
transmitted outside by the "return npmax" so the second while does not
"feels" the change.
npmax=8
np=0
@interact
#np=integerbox(message="entrez le nb de paroies du projet",title="Les
paroies du projet")
def integer_box(np=('entrez le nb de paroies du projet',0)):
print "votre projet comporte "+str(np)+" paroies"
npmax=np
n = 0
while n < npmax:
print n
n += 1
return npmax
print '******'
print
print
print npmax
print
n = 0
while n < npmax:
print n
n += 1
if(np==0 or np==' '):
print 'np should be between 1 and npmax','npmax=',npmax,'np=',np
Le mercredi 27 janvier 2016 à 16:08 -0800, William Stein a écrit :
> On Tue, Jan 26, 2016 at 10:00 AM, peigneux
> <[email protected]> wrote:
> > I am sorry to disturb with probably an evident problem.
> > I tested a lot of exemples in sage cloud with @interact to pass parameter
> > values , but these parameter are local
> > to the def function which follows @interact and I don't know how to pass
> > these parameters values outside this function
> > to continue . As I tried to use several @interact and their def function
> > inside a larger code, which was running locally in python before and where
> > the parameters was entered with using "easygui" that I have locally.Thanks
> > for hints
>
> Provide a complete minimal example that illustrates the question you
> are trying to ask.
>
> William
>
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "sage-support" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> > email to [email protected].
> > To post to this group, send email to [email protected].
> > Visit this group at https://groups.google.com/group/sage-support.
> > For more options, visit https://groups.google.com/d/optout.
>
>
>
> --
> William (http://wstein.org)
>
--
You received this message because you are subscribed to the Google Groups
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.