Python : The Indentation - How ?

free web hosting
Free Web Hosting > Computers & Tech > Programming > Scripting > Python

Python : The Indentation - How ?

Mathieu_021
Hi everyone ,

I program python since one month , and I have trouble with indentation with ....

- Blocks with more than 1 conditions
- Blocks with lists
- And with caracters " strings "

I'd like you to give me some examples if possible and explane me the bases of indentation. I need to know it if I want to progress.

Thanks biggrin.gif

Mathieu_021


Reply

thedevil
QUOTE(Mathieu_021 @ Dec 16 2004, 03:08 AM)
Hi everyone ,

I program python since one month , and I have trouble with indentation with ....

- Blocks with more than 1  conditions
- Blocks with lists
- And with caracters " strings "

I'd like you to give me some examples if possible and explane me the bases of indentation. I need to know it if I want to progress.

Thanks  biggrin.gif

Mathieu_021
*


Ok any one tell me what is Python? i know its a programming language but still in confusion where to use it... ??is it like php of Visual basic???

Reply

onstage
QUOTE(Mathieu_021 @ Dec 15 2004, 04:38 PM)
Hi everyone ,

I program python since one month , and I have trouble with indentation with ....

- Blocks with more than 1  conditions
- Blocks with lists
- And with caracters " strings "

I'd like you to give me some examples if possible and explane me the bases of indentation. I need to know it if I want to progress.

Thanks  biggrin.gif

Mathieu_021
*


Blocks with more than 1 conditions = http://pathfinder.scar.utoronto.ca/~dyer/c...k_P/node13.html
Blocks with lists
http://www.a-a-p.org/exec/user-python.html
And with characters " strings "
http://freebooks.by.ru/view/RedHatLinux6Un...ed/rhl6u350.htm

ok I think this is what you was talking about, if not let me know and I will get the information you need



 

 

 


Reply

Mathieu_021
Thanks , thanks biggrin.gif

But i'd prefer to know the number of spaces tou need to put in the blocks to have a correct indentation cool.gif

Reply

onstage
Show me an example of something you are haveing a problem with , but off the top of my head I cant think of what you need as far as indention, my main lang is vb, lol but I know some python

Reply


Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Similar Topics

Keywords : python indentation

  1. Python Mysqldb Threading - (0)
  2. Python (win32) - Anyone Experienced? (1)
    So of late I've become increasingly interested in the whole bitTorrent trend, and I was possibly
    looking into dabbling in a release of my own... I was wondering if anyone has any experience with
    Python, and if so, which IDE should I use... I have Emacs (of course), but it's more hackerish
    than userfriendly, and I'm so noob with python i need to use a p*ssy prog that spoils you with
    dropdowns and context-sensitive help... Maybe I'm a dreamer, but oh well... Thx in advance...
    Oh yeah, this is for win32 development, as the people I would distribute my...
  3. Python Versus Java ? - Which of this language is the best? Why? (4)
    Chandler choosed Python, arguing that Python is more open source than Java. Apache brought an open
    source java to the market. Is Python covering so many domains than Java? Would it be possible to
    code every kind of application with Python? For wich reason would you choose Python for an
    application development? ...
  4. Python - just some questions about it. (5)
    I was wondering if anyone on here has used python. I want to create a program to handle some stuff
    in my table top RPGs, and that language was suggested to me as a good combination of speed and ease
    of learning. What do people on here think? Have any of you used python before? if so, what is a
    good IDE for mac, if you know? ...
  5. Localizing Python - Some hacking to force python accept more natural languages words (1)
    Overall idea about this topic was inspired by my childrens. Some time ago I started to teach them
    programming. As a base language I choose Python. So the next step was an attractive subject to
    program examples and exercises . I create some "robot" program. There is nothing new in it: yet
    another logo-style game. (See attacments) The "robot" is actually lorry which moves at squire cells,
    concrete or ground and can't move through walls. It understands commands like "forward",
    "backward" and so on. All sounds good as for now. We started from program like this: CODE ...
  6. Lpt Port And Python - Using SWIG to build python wrappers (0)
    Some time ago i was asked to program device, connected to PC parallel port. Main program was written
    in python. First of all i found nice C library which perform the task: parapin . Building and
    installation is straightforward, so i don't stop on this. Then i start to build python wrapper.
    With SWIG its easy. First create file parapin.i , here is head of it: QUOTE %module parapin %{
    #include %} int pin_init_user(int lp_base); #define LPT1 0x378 #define LPT2 0x278 void
    set_pin(int pins); void clear_pin(int pins); void change_pin(int pins, int state); #define...
  7. Pagerank Checksum Algo For Python - Google toolbar 4.0.x (0)
    google pagerank checksum algorithm in python Python is the best dynamic language:P...
  8. Prove Yourself As A Python Coder - Challenge Site - (4)
    Recently I found a great site for python programmers. You have to find the url for the next level by
    solving a puzzle that requires Python (most other languages will also do quite well, but it's
    meant for python). The first levels you could do with some pen and paper or a calculator. But after
    a few puzzles they start to become more complicated and realy have to do more programming. Tell us
    how far you have comes. The challenge has 33 levels, but I only beated the first 3. That doesn't
    say much since I'm a total newbie at Python. -=jeroen=-...
  9. [python]got A Problem In My Little Program - No reaction when button was pressed (1)
    I am a newbie in Python. After read some parts of 《OReilly -
    ProgrammingPython2ndEd.chm》, I try to write a small problem as following. But it is no
    reaction when I press the button. Does anyone can tell me why? CODE from Tkinter import * #
    get widget classes class Inputer(Frame): # subclass our GUI def __init__(self,
    parent=None): # constructor method  Frame.__init__(self, parent)
     self.pack()  ent = Entry(self)  ent.insert(0, 'Type words here')
    # set text  ent.pack(side=LEFT...
  10. Python For Series 60 - (0)
    Python for Series 60 brings the Python programming language to the Series 60 Platform. With Python
    for Series 60 installed, developers can write Series 60 applications in Python, or embed the Python
    interpreter into Symbian C++ applications for the platform. Python for Series 60 is based on Python
    2.2.2; However, in addition to supporting many of the Python Standard Library modules, Python for
    Series 60 includes a number of Platform-specific modules for access to native GUI widgets, Bluetooth
    and GPRS networking, GSM Location information, SMS Messaging, and more! P...



Looking for python, indentation

Searching Video's for python, indentation
advertisement




Python : The Indentation - How ?



 

 

 

 

ADD REPLY / Got an Opinion! a humble request :-) RAPID SEARCH! Free Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE