[Draft] Development Environment for Python

Discussions about the wiki documentation of FreeCAD and its translation.
User avatar
shoogen
Posts: 2823
Joined: Thu Dec 01, 2011 5:24 pm

Re: [Draft] Development Environment for Python

Postby shoogen » Tue Mar 03, 2015 2:47 pm

If you don't like your default editor. you can use

Code: Select all

commit -m "commit message"
if you use vim you can hit Escape to enter the command mode and type capital Z twice to save and exit.
cox
Posts: 963
Joined: Wed Nov 26, 2014 11:37 pm

Re: [Draft] Development Environment for Python

Postby cox » Tue Mar 03, 2015 3:10 pm

To change editor systemwide for git

Replace nano with your favorit

git config --global core.editor "nano"
Need help? Feel free to ask, but please read the guidelines first
User avatar
piffpoof
Posts: 347
Joined: Sun Nov 30, 2014 11:00 am
Location: Mare Nostrum
Contact:

Re: [Draft] Development Environment for Python

Postby piffpoof » Tue Mar 03, 2015 3:38 pm

I now have two file in the gist repository
https://gist.github.com/piffpoof
The second is a binary file (I think) as no text displays when it is selected.

I have taken the Permalink for each and put it into a Wiki page as:

Code: Select all

[https://gist.github.com/piffpoof/735fee0727a038425a11/raw/#file-python-assistant-window Python script file]
[https://gist.github.com/piffpoof/735fee0727a038425a11/raw/#file-emptyhouse-fcstd FreeCAD FCStd file]
If I right-click and Save File As with the the first one it downloads as "Download.txt" (not Python Assistant Window.py), inside the file is the text of the Python script

If I right-click and Save File As with the second one it downloads the same as the first one, the Python script, not the FCStd file
cox
Posts: 963
Joined: Wed Nov 26, 2014 11:37 pm

Re: [Draft] Development Environment for Python

Postby cox » Tue Mar 03, 2015 4:08 pm

Need help? Feel free to ask, but please read the guidelines first
User avatar
piffpoof
Posts: 347
Joined: Sun Nov 30, 2014 11:00 am
Location: Mare Nostrum
Contact:

Re: [Draft] Development Environment for Python

Postby piffpoof » Tue Mar 03, 2015 4:23 pm

cox wrote:You might try the url tags instead of the code tag
I didn't realise there was a difference, yes that works now, with two exceptions,
  • the Python files downloads as "Python Assistant WIndow.txt" (instead of '.py')
  • the FreeCAD document downloads as "emptyHouse.FCStd.FCStd" (two file extensions instead of one)
I really don't have a guess who is playing with the file extensions...
cox
Posts: 963
Joined: Wed Nov 26, 2014 11:37 pm

Re: [Draft] Development Environment for Python

Postby cox » Tue Mar 03, 2015 4:59 pm

piffpoof wrote:I really don't have a guess who is playing with the file extensions...
You might have pasted the file content in to the paste window :D, when you initialy made the gist. And might have forgotten the .py in the name field.

Try copying the file to your local gist repo and repeat what you did with the binary file.
Need help? Feel free to ask, but please read the guidelines first
User avatar
piffpoof
Posts: 347
Joined: Sun Nov 30, 2014 11:00 am
Location: Mare Nostrum
Contact:

Re: [Draft] Development Environment for Python

Postby piffpoof » Tue Mar 03, 2015 5:19 pm

cox wrote:
piffpoof wrote:I really don't have a guess who is playing with the file extensions...
You might have pasted the file content into the paste window :D, when you initialy made the gist. And might have forgotten the .py in the name field.

Try copying the file to your local gist repo and repeat what you did with the binary file.
hard to say what I've done vs not done

I'm going to try and condense the steps into a document and then maybe it's easier to review once it's written down.

thanks for the info and help, I'll post a link to the document here when I get it finished
User avatar
piffpoof
Posts: 347
Joined: Sun Nov 30, 2014 11:00 am
Location: Mare Nostrum
Contact:

Re: [Draft] Development Environment for Python

Postby piffpoof » Wed Mar 04, 2015 8:19 pm

OK,
I got a draft of the process and have written it up, it is posted at:
Wiki Linking to Python scripts & FreeCAD binary files

It got so long that I decided to start a new topic for it, also it will get greater exposure as a new topic and hopefully that will bring in more comments and thereby raise the quality of it

It probably has errors in it, or at least typos, but for technical reader, hopefully it will understandable