At final step I get this error :
C:\My Documents\Delovni\_Godec\Delo\PyMite\pymite-09\src\tools>python ipm.py --desktop
Traceback (most recent call last):
File "ipm.py", line 419, in <module>
main()
File "ipm.py", line 382, in main
conn, pmfeatures_filename = parse_cmdline()
File "ipm.py", line 378, in parse_cmdline
return (c, pmfeatures_filename)
UnboundLocalError: local variable 'pmfeatures_filename' referenced before assignment
What am I doing wrong ?
Thanks,
Bulek.
Hi Dean, any progress on the adaption of Python 2.7? Can we help you on something with it?
Sent from my Android cell phone, please forgive the lack of format on the text, and my fat thumbs :-P
Traceback (most recent call last):
File "ipm.py", line 418, in <module>
main()
File "ipm.py", line 381, in main
conn, pmfeatures_filename = parse_cmdline()
File "ipm.py", line 377, in parse_cmdline
return (c, pmfeatures_filename)
UnboundLocalError: local variable 'pmfeatures_filename' referenced before assignment
C:\My Documents\Delovni\_Godec\Delo\Interpreterji\PyMite\svn\src\tools>c:\Python26\python ipm.py -f ..\platform\windows\pmfeatures.py --desktopIf I run main.exe from command line it just prints "Hello" and finishes.
Python-on-a-Chip is Copyright 2003, 2006, 2007, 2009, 2010 Dean Hall and others.
Python-on-a-Chip is licensed under the GNU LESSER GENERAL PUBLIC LICENSE V 2.1
PyMite is Copyright 2003, 2006, 2007, 2009, 2010 Dean Hall.
PyMite is licensed under the GNU GENERAL PUBLIC LICENSE V 2.
This software is offered with NO WARRANTY. See LICENSE for details.
Type the Python code that you want to run on the target device.
If you see no prompt, type two consecutive returns to exit multiline mode.
Type Ctrl+C to interrupt and Ctrl+D to quit (or Ctrl+Z <enter> on Win32).
ipm> help
Type the Python code that you want to run on the target device.
If you see no prompt, type two consecutive returns to exit multiline mode.
Type Ctrl+C to interrupt and Ctrl+D to quit (or Ctrl+Z <enter> on Win32).
ipm> import sys
Connection write error, type Ctrl+Z to quit.
Hello
ipm> print "a"
Connection write error, type Ctrl+Z to quit.
Connection read error, type Ctrl+Z to quit.
ipm>
ipm>
ipm>
print "Dialog D13:"It works ok under Python 2.6 on desktop, but works only until "count = 0" statement. Nothing else is printed on cmd console.... Have no clue why that would happen. If I compile Release version, I get error in this line :
i = 0
print "Cnt = %d\n" % (i)
i += 1
print "Cnt = %d\n" % (i)
i += 1
print "Cnt = %d\n" % (i)
i += 1
print "-------------\n"
fruits = ['banana', 'apple', 'mango']
for index in range(len(fruits)):
print 'Current fruit :', fruits[index]
print "-------------\n"
for i in range(1,5,1):
print 'For, range is:', i
print "-------------\n"
count = 0
while count < 9:
print 'The count is:', count
count = count + 1
print "-------------\n"
i = 0
while i < 10:
print i
print "Cnt = %d\n" % (i)
i += 1
print "-------------\n"
for num in range(10,20): #to iterate between 10 to 20
for i in range(2,num): #to iterate on the factors of the number
if num%i == 0: #to determine the first factor
j=num/i #to calculate the second factor
print '%d equals %d * %d' % (num,i,j)
break #to move to the next number, the #first FOR
else: # else part of the loop
print num, 'is a prime number'
print "-------------\n"
print "Done."
Traceback (most recent call first):
File "main.py", line 34, in main
ImportError detected by FileId 0x00 line 0