| | |
indentation error
Please support our Python advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved |
•
•
Join Date: Feb 2008
Posts: 21
Reputation:
Solved Threads: 0
Hi,
This is the existing code:
when i wanted to insert a line before
by putting the cursor to the end of the
and pressing an enter I get compile error.
what's happening here?
This is the existing code:
Python Syntax (Toggle Plain Text)
for c in chartNames: chartUrl = baseChartUrl+c hd = extractChart(chartUrl) writeChart(hd,c) for key in hd: if key in chart: chart[key].append(c) else: chart[key] = [c]
when i wanted to insert a line before
Python Syntax (Toggle Plain Text)
chartUrl = baseChartUrl+c
by putting the cursor to the end of the
Python Syntax (Toggle Plain Text)
for c in chartNames:
and pressing an enter I get compile error.
what's happening here?
•
•
Join Date: Oct 2004
Posts: 20
Reputation:
Solved Threads: 2
1. Can you please make the indentation level to 4 spaces.
2. Please use 'code=python' surrounded by square '[ ]' bracets so that it will be correctly cololur coded and end with '\code' enclosed in the same square brackets. Click on the link below for mode details on code tags
http://www.daniweb.com/forums/misc-e...=400&width=680
OR you can click the link on the right side in the box below called '
Help with Code Tags'
This is what your code should look like:
3. Please provide hard coded values and to the list / tuple / dictionary & variables and function so that it is executable and gives an output or atleast a traceback
2. Please use 'code=python' surrounded by square '[ ]' bracets so that it will be correctly cololur coded and end with '\code' enclosed in the same square brackets. Click on the link below for mode details on code tags
http://www.daniweb.com/forums/misc-e...=400&width=680
OR you can click the link on the right side in the box below called '
Help with Code Tags'
This is what your code should look like:
python Syntax (Toggle Plain Text)
for c in chartNames: chartUrl = baseChartUrl+c hd = extractChart(chartUrl) writeChart(hd,c) for key in hd: if key in chart: chart[key].append(c) else: chart[key] = [c]
3. Please provide hard coded values and to the list / tuple / dictionary & variables and function so that it is executable and gives an output or atleast a traceback
Atheist: God is man made imagination, he doesn't exist!
Theist: It's okay, can you imagine anything else that doesn't exist?
Junior MD --- Python, C++ and PHP
Theist: It's okay, can you imagine anything else that doesn't exist?
Junior MD --- Python, C++ and PHP
•
•
Join Date: Dec 2006
Posts: 1,045
Reputation:
Solved Threads: 294
•
•
•
•
by putting the cursor to the end of the
for c in chartNames:
and pressing an enter I get compile error.
Python Syntax (Toggle Plain Text)
try: for c in chartNames: chartUrl = baseChartUrl+c hd = extractChart(chartUrl) writeChart(hd,c) for key in hd: if key in chart: chart[key].append(c) else: chart[key] = [c] except: import traceback traceback.print_exc() raise
Last edited by woooee; Jul 1st, 2009 at 2:09 pm.
Linux counter #99383
How long have you known about this?
And why haven't you told us until now?!
And why haven't you told us until now?!
![]() |
Similar Threads
- Indentation? (Python)
- Problems on my first project (Python)
- Help newbie : need simple code (Python)
- Indentation Error (Python)
- what is error with this ... (C++)
- jpg with Python (Python)
- Big Problem, Generic Error (VB.NET)
Other Threads in the Python Forum
- Previous Thread: A little help
- Next Thread: String Conversion in Python
| Thread Tools | Search this Thread |
abrupt ansi anti approximation assignment avogadro backend beginner binary bluetooth calculator character cmd code customdialog decimals dictionaries dictionary directory drive dynamic error examples excel exe file float format function gnu graphics gui heads homework http ideas import input java launcher leftmouse line linux list lists logging loop module mouse number numbers output parsing path pointer port prime programming progressbar projects push py2exe pygame pyqt python random recursion schedule scrolledtext sqlite statistics stdout string strings sudokusolver sum table terminal text thread threading time tkinter tlapse tricks tuple tutorial twoup ubuntu unicode update urllib urllib2 variable ventrilo wikipedia windows write wxpython xlib






