User avatar
RDK
Posts: 254
Joined: Wed Aug 13, 2014 10:19 am
Location: Wyoming and France

What are the issues or using Python on Windows 7

Wed Oct 01, 2014 5:00 pm

Folks....Are there any issues around using Python on Windows 7 to create code and then moving the .py files to the Pi?

Are there "things" that will work on the Windows 7 box but will not on the Pi. And vice-versa?

Of course, I realize that programming to use Pi functions (pins, etc) will not work on the Windows box.

Thanks.....RDK

riklaunim
Posts: 265
Joined: Tue Apr 22, 2014 7:34 pm

Re: What are the issues or using Python on Windows 7

Wed Oct 01, 2014 5:09 pm

Raspberry specific modules won't be available, but IDEs can often use Python envs over network (like PyCharm) which will give autocompletion or code browsing. With some deployment scripts (or SSHFS alike solution) good IDEs will also be able to push and execute the code on RPi when needed.

User avatar
joan
Posts: 14174
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: What are the issues or using Python on Windows 7

Wed Oct 01, 2014 5:18 pm

RDK wrote:Folks....Are there any issues around using Python on Windows 7 to create code and then moving the .py files to the Pi?

Are there "things" that will work on the Windows 7 box but will not on the Pi. And vice-versa?

Of course, I realize that programming to use Pi functions (pins, etc) will not work on the Windows box.

Thanks.....RDK
I rarely use Windows but I often write small Python programs on a laptop to run on the Pi.

You could probably minimise problems by using the same Python version on your Windows and Pi machines.

The pigpio Python module should run on Windows. It will let you control the gpios of a networked Pi from a program running on your Windows box.

gkreidl
Posts: 6037
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: What are the issues or using Python on Windows 7

Wed Oct 01, 2014 5:35 pm

RDK wrote:Folks....Are there any issues around using Python on Windows 7 to create code and then moving the .py files to the Pi?

Are there "things" that will work on the Windows 7 box but will not on the Pi. And vice-versa?

Of course, I realize that programming to use Pi functions (pins, etc) will not work on the Windows box.

Thanks.....RDK
Code is usually not a problem (except for some OS specific things), but line ends are, if you want to run the python files stand-alone with a shebang line on top
#!/usr/bin/env python
This will not work if written on a Windows machine with CR/LF line ends.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

User avatar
elParaguayo
Posts: 1943
Joined: Wed May 16, 2012 12:46 pm
Location: London, UK

Re: What are the issues or using Python on Windows 7

Wed Oct 01, 2014 6:19 pm

Some editors should let you select a "UNIX style" line ending though.
RPi Information Screen: plugin based system for displaying weather, travel information, football scores etc.

ghp
Posts: 1399
Joined: Wed Jun 12, 2013 12:41 pm
Location: Stuttgart Germany
Contact: Website

Re: What are the issues or using Python on Windows 7

Wed Oct 01, 2014 7:58 pm

Hello, I usually develop all my code with eclipse on a win7-machine. In eclipse, I have pyDev installed. This allows debugging. Of course, the GPIO-Modules, I2C or SPI need mockup libraries.
Testing of code on RPi means to ftp it there (here, ant-scripts are convenient to pack everything as needed on target machine). Consequently, I fix bugs also in eclipse and send code back to Pi.

Regards,
Gerhard

kghunt
Posts: 383
Joined: Sun Mar 04, 2012 9:28 am

Re: What are the issues or using Python on Windows 7

Wed Oct 01, 2014 8:46 pm

RDK wrote:Folks....Are there any issues around using Python on Windows 7 to create code and then moving the .py files to the Pi?
Apart from the fact that windows sucks? :-p

Queue Linux/Windows flame war...

Return to “Python”