{ "info": { "author": "Pooya Eghbali", "author_email": "persian.writer@gmail.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3" ], "description": "======\ncstyle\n======\nUse c-style braces instead of indentation. This is an encoding, you can also import this module in sites.py, it will register the encoding on import.\n\nto use this, add the magic encoding comment to your source file::\n\n # coding: cstyle\n \nThen you can import it to run it. or if you added the encoding to your sites.py, you can use idle to view the decoded file.\nUse notepad++ or the editor of your choice.\nDo not use this. DO NOT USE THIS. and do not use this. this works, but this is not a good idea.\n\nCurrently just works for \"if|elif|else|for|while|def|with\" statements. do not mix indentation and braces. you can do that, but it is not recommended.\nTreat this module just as a toy, or if you have any special purpose to use it. This program is open source, lgpl, you can edit or use it for free.\n\nOne usage for this module can be reducing source code size (compressing).\n\nYou can also decode cstyle literals::\n\n import cstyle\n\ta = b'cstyle code'\n\ta.decode('cstyle')\n\t\nTo know how to code with cstyle examine the examples provided here. This is not an alpha release, this is not a beta release, this is not a release at all. this is not a real program, at least at this point. use for educational purposes or whatever. There's no warranty. There might be parsing errors, it is tested on the code provided in the examples here.\n\t\nWhat this can do?\n=================\nThis will convert::\n\n if(1 in {1,2,3}){\n print(5)\n for(x in c){\n print(c)\n }\n }\n\t\nTo this::\n\n if(1 in {1,2,3}):\n print(5)\n for x in c:\n print(c)\n\t\t\nit works for messy code too. see how this can work on this long oneline code::\n\n import time;while(1){while(3){break}if(999>x){time.sleep(1);if(2){print(\"This is a BAD idea.\");print(\"Or a good one?\");print(\"For me, this is just for fun.\");print(\"C-Style Coding\");if(1){def xyz(a,b,c){\"\"\"this is a stupid function\"\"\";print(\"if(2){print(\\\\\"hi\\\\\")}\");if(a>b){return c}elif(a>c){return b}else{return a}}}with(open(\"file\") as f){pass}}}if(1 in {1,2,3}){print(5);for(x in c){print(c)}}}\n\t\nThe result from the previous is::\n\n import time\n while(1):\n while(3):\n break\n if(999>x):\n time.sleep(1)\n if(2):\n print(\"This is a BAD idea.\")\n print(\"Or a good one?\")\n print(\"For me, this is just for fun.\")\n print(\"C-Style Coding\")\n if(1):\n def xyz(a,b,c):\n \"\"\"this is a stupid function\"\"\"\n print(\"if(2){print(\\\"hi\\\")}\")\n if(a>b):\n return c\n elif(a>c):\n return b\n else:\n return a\n with open(\"file\") as f:\n pass\n if(1 in {1,2,3}):\n print(5)\n for x in c:\n print(c)\n\n\n\nProject Info\n============\n\nGithub project page: https://github.com/pooya-eghbali/cstyle\nMail me at: persian.writer [at] Gmail.com", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/pooya-eghbali/cstyle", "keywords": "cstyle,c style,braces,indentation,indent,indenting,parser,encoding", "license": "LGPLv3", "maintainer": null, "maintainer_email": null, "name": "cstyle", "package_url": "https://pypi.org/project/cstyle/", "platform": "Any", "project_url": "https://pypi.org/project/cstyle/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/pooya-eghbali/cstyle" }, "release_url": "https://pypi.org/project/cstyle/0.1.0/", "requires_dist": null, "requires_python": null, "summary": "Use c-style braces instead of indentation.", "version": "0.1.0" }, "last_serial": 862918, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "b9c2445cf57ae79e83142c2fe6486c79", "sha256": "0531955438444b7a7ab751c203268e5b3e98e0f6b9e7abd3bf10f38941b91c54" }, "downloads": -1, "filename": "cstyle-0.1.0.zip", "has_sig": false, "md5_digest": "b9c2445cf57ae79e83142c2fe6486c79", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8672, "upload_time": "2013-09-11T17:11:20", "url": "https://files.pythonhosted.org/packages/23/85/c3aaa984bbd9f32e724960ecc48648e29ea72d2425b1689a02602d02b56c/cstyle-0.1.0.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b9c2445cf57ae79e83142c2fe6486c79", "sha256": "0531955438444b7a7ab751c203268e5b3e98e0f6b9e7abd3bf10f38941b91c54" }, "downloads": -1, "filename": "cstyle-0.1.0.zip", "has_sig": false, "md5_digest": "b9c2445cf57ae79e83142c2fe6486c79", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8672, "upload_time": "2013-09-11T17:11:20", "url": "https://files.pythonhosted.org/packages/23/85/c3aaa984bbd9f32e724960ecc48648e29ea72d2425b1689a02602d02b56c/cstyle-0.1.0.zip" } ] }