Search:

Type: Posts; User: c0dist

Search: Search took 0.00 seconds.

  1. Replies
    7
    Views
    24,516

    Parsing configuration files in Python

    There are various situations where instead of keeping configurations in the python script, we might need to keep an external config file. The advantage of keeping a config file is that then multiple...
  2. Replies
    7
    Views
    24,516

    File Handling Using "with" Statement

    In Python, if you want to read/write from a file, you might call "open()" first, and then read() or write() accordingly and then finally a close() to close that file handle.

    For example, one way...
  3. Replies
    7
    Views
    24,516

    Handy Python Cheat Sheet

    Just came across a handy Python cheat sheet via @Punter. Posting this here so others could benefit from it and also so that I don't forget. :D

    Here it is - http://overapi.com/python/
    Enjoy. :)
    ...
  4. Replies
    7
    Views
    24,516

    Reversing a String

    In Python, you can reverse a string simply by using this syntax,



    >>> string = "Garage4Hackers"
    >>> print string[::-1]
    srekcaH4egaraG


    The way this works is by using something known as...
  5. Replies
    7
    Views
    24,516

    Quick Web Server

    Hi,

    Want to share files between PCs? Want to test your html page? Need a quick simple http server? Call python. :D

    Here's the one liner that will start serving a web server on port 8000


    ...
  6. Replies
    7
    Views
    24,516

    Just Some Python Things

    Hello,

    This post is here so people can share their Python tips, tricks, hacks and best practices. This post follows the footsteps of bash cheat sheet here -...
Results 1 to 6 of 6