[IronPython] Preprocessor directives in IronPython 2.0

Curt Hagenlocher curt at hagenlocher.org
Mon Dec 15 15:27:05 CET 2008


Nope.  Why do you think you want them?  Or rather, what's wrong with this:

debug = False

def Main():
    if debug:
        print 'DEBUG is set'
    else:
        print 'DEBUG is not set'

On Mon, Dec 15, 2008 at 5:46 AM, Yash Ganthe <yashgt at gmail.com> wrote:

> In C# we can code for conditional compilation such as:
> public static void Main()
> {
> #if DEBUG
> Console.WriteLine("DEBUG is defined");
> #else
> Console.WriteLine("DEBUG is not defined");
> #endif
> }
>
> Is it possible to do the same in IronPython? Does it support preprocessor
> directives?
>
> Thanks,
> Yash
>
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20081215/7dad4c5f/attachment.html>


More information about the Ironpython-users mailing list