[Pythonmac-SIG] pragma mark with python in xcode?

Mike Covill mcovill at mac.com
Tue Aug 12 14:49:04 CEST 2008


On 11-Aug-08, at 11:10 AM, Daniel Ashbrook wrote:

> Nehemiah Dacres wrote:
> > What are u using a #pragma for in python? You See that POUND sign  
> your
>> using, thats a COMPILER DIRECTIVE, python is an interpreted  
>> scripting language, no PREPROCESSING allowed , (except for the .pyc  
>> code but thats compiled if you want to get technical with me)
>> Am I misinterpreting you intentions?
>
> Yes.
>
> Xcode supports "#pragma mark foo" that puts "foo" into a dropdown  
> menu above your code in the editor so you can quickly jump between  
> sections.
>
>
> dan


 From Apple's "Xcode Workspace Guide:, chapter 6, section 2:

http://developer.apple.com/documentation/DeveloperTools/Conceptual/XcodeWorkspace/600-The_Text_Editor/chapter_6_section_2.html

you can use these inside a comment and the drop down will display them  
in bold, like the #pragma mark does in C code:

MARK:
TODO:
FIXME:
!!!:
???:

You can use "MARK:" just like you use "#pragma mark" in C code, and it  
("MARK:") will not show up in the drop down, just the comment  
following it.  The others will be included in the drop down item.

#MARK: Section 1
   displays as:   "Section 1"

#!!!: Look at this now!
   displays as:   "!!! Look at this now"

Mike



More information about the Pythonmac-SIG mailing list