Posts: 50
Joined: Sun Jun 22, 2014 11:20 am

Transferring Projects

Sun Jun 22, 2014 11:33 am

Is There Any Way To Transfer A Python Project From The Raspberry Pi To The Computer Without Needing Python Software e.g IDLE On The Computer .
I've Heard Of CX_Freeze But I'm Not Sure What This Is And If It's The Right Thing :?: :?: :?: :?: :?: :?:

~ python101

Code: Select all

if human contains caffeine:

Posts: 7882
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Transferring Projects

Wed Jun 25, 2014 7:09 pm

"Transfer" ? Copy ? Use an USB stick ... or WinSCP.

• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere

User avatar
Posts: 2563
Joined: Sat Jan 28, 2012 11:57 am
Location: UK

Re: Transferring Projects

Wed Jun 25, 2014 7:41 pm

Or you can take the SD card (once you've shut down linux on the RPi) and put it in The Computer's SD slot if it has one. You will need to have python installed obviously. You don't need to have IDLE to run python, if you use windows then the python installer will probably set 'open' to start python and feed it the file you've clicked.

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

Re: Transferring Projects

Wed Jun 25, 2014 8:51 pm


I usually develop python code on my laptop in eclipse, using pydev as a plugin.
Advantage is the build in debugger, and ant script support to distribute code.

Then I send the files 'as is' to raspberry with ftp (filezilla is the tool to choose) and execute there.

The only problems are:
- in windows, GPIO is not available. I use a dummy implementation to avoid compile errors.
- you need the same packages installed.
- for some strange, hardware dependend stuff I check the operating system in python code and bypass/work around this.


Posts: 26
Joined: Tue Sep 11, 2012 9:24 pm

Re: Transferring Projects

Wed Jun 25, 2014 9:17 pm

Kia ora,

Looks like cx-freeze won't do it. from the document's FAQ:
cx_Freeze works on Windows, Mac and Linux, but on each platform it only makes an executable that runs on that platform. So if you want to freeze your program for Windows, freeze it on Windows; if you want to run it on Macs, freeze it on a Mac.

At a pinch, you can try to make a Windows executable using Wine. Our experience is that you need to copy some files in manually after cx_Freeze has run to make the executable work. We don’t recommend this option.
Really looks like you will need python installed on at least one Windows machine, even if only to run cx_freeze on it.


Return to “Python”