Hi
I solved the problem
I created the file function fiboR_SG.py below
def fiboR_SG(n):
if n < 2:
return n
else:
return fiboR_SG(n-1) + fiboR_SG(n-2)
upload fiboR_SG.py using "DATA" in Worksheet menu. In the "You may download
fiboR_SG.py or create a link to this file in worksheet" select your
worksheet. Back worksheet and use:
import fiboR_SG ("no .py")
fiboR_SG. fiboR_SG(10)
55
OK :)
file.
Em domingo, 7 de fevereiro de 2016 20:00:14 UTC-2, [email protected]
escreveu:
>
> Hi Dima
>
> I disabled the firewall virtual machine and can send, but do not
> understand how to use the file. mensgem:
>
> Access fiboR_SG_PY.py in this worksheet by typing DATA+'fiboR_SG_PY.py'.
> *Here
> DATA is a special variable that gives the exact path to all data files
> uploaded to this worksheet.*
>
> How do? I use a local machine(netrunner) and sagemath is the virtual
> machine .
>
> Em domingo, 7 de fevereiro de 2016 15:32:39 UTC-2, Dima Pasechnik escreveu:
>>
>>
>>
>> On Sunday, February 7, 2016 at 3:20:07 PM UTC, [email protected]
>> wrote:
>>>
>>> my files are on the local machine(netrunner linux) and the sagemath runs
>>> on the virtual machine(lubuntu in another room ). I tried that way (%load
>>> /path/to/function.py or %attach /path/to/function.py) , but only import
>>> virtual machine files, not the host machine.
>>>
>>> Em sábado, 6 de fevereiro de 2016 20:11:57 UTC-2,
>>> [email protected] escreveu:
>>>>
>>>> I want to import a file function called "function.py" to my Worksheet.
>>>> How to do?
>>>>
>>>
>> What happens if you click on Data tab in the worksheet?
>> Can you upload any files this way?
>>
>>
>>
>
--
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.