Hello,
a fucking indentation error screwed up my testing-.-
I cant believe it!!
I was testing my code all the time in the simulator and wouldnt have
send it before havent tested it thouroughly!!
Well I cant proof that it wasnt my mistake(already had similar indentation issues when transferring code from my windows machine to my pi via WinSCP), but this happend to me before -.-
#
Just too bad I wasnt able to test a newly added, very important new function =(
best regards,
xStatic
I understand you frustration, I have had this exact problem with Python a few times myself :(
Personally I find the way Python uses indentation to be helpful writing short bits of code, but clunky and error-prone for larger bits of code like this. It does not help that different editors do different things with tab characters.
As for copying code or other files between a Raspberry Pi and a Windows machine, I usually create a network share in Windows and mount that share on the Pi. It is not hard to do, but you will need to run the command to mount the share each time the Pi has been restarted.
First you will need to create a directory to mount the Windows share to. I usually create mine in the
/mnt
directory like this:You only need to do this the first time, the next time the directory will already exist.
You can then run a rather long command to mount the Windows share onto this directory:
but replace:
192.168.0.100
with the IP address of the Windows machineSHARENAME
with the name of the Windows share/mnt/windows
with the directory you createdUSERNAME
with your Windows usernameWhen you run the
mount.cifs
command it will ask for your Windows password to access the share. After that you can then copy to and from the/mnt/windows
directory like any other one on the Pi :)I will be looking at all of the entries which did not work sometime later tomorrow. I will confirm with you if the indentation is indeed the cause of problem.
If you're working command line on the Pi, then a very useful utility to install is 'mc' (Midnight Commander): it's a text based file management system very similar to an old DOS application called 'XTree' for the days of yore.
install it with
and just run it with
mc
It's extremely useful for when you've got an external drive mounted because it has two panes for you to copy between.
One of the first things I tend to install on a headless machine.
Add new comment