Welcome to iraf.net Wednesday, May 01 2024 @ 02:18 PM GMT


 Forum Index > Help Desk > Python New Topic Post Reply
 scanf problem
   
ovince
 10/08/2018 08:05AM (Read 493 times)  
++---
Junior

Status: offline


Registered: 05/16/2006
Posts: 15
Hi All,

For demonstration of a prombel, I have an IRAF script which use scanf()

PHP Formatted Code
procedure proba ()
begin
  real ra
  scan("%f", ra)
  print (ra)
end  


I try to call this script from python like

PHP Formatted Code
$python
>>> from pyraf import iraf
>>> iraf.proba()



but I get error

ValueError: Attempt to access undefined local variable `ra'


How can I prevent this?

Thanks
Oliver

 
Profile Email
 Quote
   
Content generated in: 0.13 seconds
New Topic Post Reply

Normal Topic Normal Topic
Sticky Topic Sticky Topic
Locked Topic Locked Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Anonymous users can post 
Filtered HTML Allowed 
Censored Content 
dog allergies remedies cialis 20 mg chilblain remedies


Privacy Policy
Terms of Use

User Functions

Login