I've got a python project I've been making in terminal with vim etc.. I've read that XCode supports Python development at that it supports SVN (which I am using) but I can't find documentation on how to start a new XCode project from an existing code repository.
我有一个我在终端用vim等制作的python项目。我已经读过XCode支持Python开发,它支持SVN(我正在使用)但我找不到如何启动的文档来自现有代码存储库的新XCode项目。
Other developers are working on the project not using XCode - They won't mind if I add a project file or something, but they will mind if I have to reorganise the whole thing.
其他开发人员正在研究不使用XCode的项目 - 他们不介意我添加项目文件或其他东西,但他们会介意我是否必须重组整个事情。
4 个解决方案
#1
I don't think it's worth using Xcode for a pure python project. Although the Xcode editor does syntax-highlight Python code, Xcode does not give you any other benefit for writing a pure-python app. On OS X, I would recommend TextMate as a text editor or Eclipse with PyDev as a more full-featured IDE.
我不认为使用Xcode进行纯python项目是值得的。尽管Xcode编辑器使用语法高亮的Python代码,但Xcode并没有为编写纯python应用程序带来任何其他好处。在OS X上,我建议使用TextMate作为文本编辑器,或者将PyDev作为更全功能的IDE使用Eclipse。
#2
I recommend against doing so. Creating groups (which look like folders) in Xcode doesn't actually create folders in the filesystem. This wreaks havoc on the module hierarchy.
我建议不要这样做。在Xcode中创建组(看起来像文件夹)实际上并不在文件系统中创建文件夹。这会对模块层次结构造成严重破坏。
Also, the SCM integration in Xcode is very clunky. After becoming accustomed to using Subversion with Eclipse, the Subversion support in Xcode is hopelessly primitive. It's almost easier to just do svn commands on the command line just so it's clear what's going on.
此外,Xcode中的SCM集成非常笨重。习惯于在Eclipse中使用Subversion后,Xcode中的Subversion支持无可救药。在命令行上执行svn命令几乎更容易,因此很清楚发生了什么。
If you must use Xcode, use it to open individual py
files. Use it as a slow, relatively featureless text editor.
如果必须使用Xcode,请使用它打开单个py文件。将它用作缓慢,相对无特征的文本编辑器。
If you must use Xcode for SCM, take a look at their guide to using Xcode with Subversion.
如果必须使用Xcode进行SCM,请查看他们使用Xcode和Subversion的指南。
#3
There are no special facilities for working with non-Cocoa Python projects with Xcode. Therefore, you probably just want to create a project with the "Empty Project" template (under "Other") and just drag in your source code.
使用Xcode的非Cocoa Python项目没有特殊的工具。因此,您可能只想使用“空项目”模板(在“其他”下)创建项目,然后只需拖动源代码即可。
For convenience, you may want to set up an executable in the project. You can do this by ctrl/right-clicking in the project source list and choosing "Add" > "New Custom Executable...". You can also add a target, although I'm not sure what this would buy you.
为方便起见,您可能希望在项目中设置可执行文件。您可以通过在项目源列表中按住Ctrl键/右键单击并选择“添加”>“新建自定义可执行文件...”来执行此操作。你也可以添加一个目标,虽然我不确定这会给你带来什么。
#1
I don't think it's worth using Xcode for a pure python project. Although the Xcode editor does syntax-highlight Python code, Xcode does not give you any other benefit for writing a pure-python app. On OS X, I would recommend TextMate as a text editor or Eclipse with PyDev as a more full-featured IDE.
我不认为使用Xcode进行纯python项目是值得的。尽管Xcode编辑器使用语法高亮的Python代码,但Xcode并没有为编写纯python应用程序带来任何其他好处。在OS X上,我建议使用TextMate作为文本编辑器,或者将PyDev作为更全功能的IDE使用Eclipse。
#2
I recommend against doing so. Creating groups (which look like folders) in Xcode doesn't actually create folders in the filesystem. This wreaks havoc on the module hierarchy.
我建议不要这样做。在Xcode中创建组(看起来像文件夹)实际上并不在文件系统中创建文件夹。这会对模块层次结构造成严重破坏。
Also, the SCM integration in Xcode is very clunky. After becoming accustomed to using Subversion with Eclipse, the Subversion support in Xcode is hopelessly primitive. It's almost easier to just do svn commands on the command line just so it's clear what's going on.
此外,Xcode中的SCM集成非常笨重。习惯于在Eclipse中使用Subversion后,Xcode中的Subversion支持无可救药。在命令行上执行svn命令几乎更容易,因此很清楚发生了什么。
If you must use Xcode, use it to open individual py
files. Use it as a slow, relatively featureless text editor.
如果必须使用Xcode,请使用它打开单个py文件。将它用作缓慢,相对无特征的文本编辑器。
If you must use Xcode for SCM, take a look at their guide to using Xcode with Subversion.
如果必须使用Xcode进行SCM,请查看他们使用Xcode和Subversion的指南。
#3
There are no special facilities for working with non-Cocoa Python projects with Xcode. Therefore, you probably just want to create a project with the "Empty Project" template (under "Other") and just drag in your source code.
使用Xcode的非Cocoa Python项目没有特殊的工具。因此,您可能只想使用“空项目”模板(在“其他”下)创建项目,然后只需拖动源代码即可。
For convenience, you may want to set up an executable in the project. You can do this by ctrl/right-clicking in the project source list and choosing "Add" > "New Custom Executable...". You can also add a target, although I'm not sure what this would buy you.
为方便起见,您可能希望在项目中设置可执行文件。您可以通过在项目源列表中按住Ctrl键/右键单击并选择“添加”>“新建自定义可执行文件...”来执行此操作。你也可以添加一个目标,虽然我不确定这会给你带来什么。