Use code tags. Keep your post short (10-20 lines of code is often on the higher end). Ask us your question for us, not your instructor's question for you. Provide your exact error message and desired output, "my code doesn't work" isn't enough
Following these instructions helps us to help you. Believe it or not, reading this whole thing and making a good first post will be faster than the back-and-forth we often have to go through due to people not acting in their own best interest.
Subject/Title of post
Please try to use a subject line that describes your problem well.
From the subject line alone it should give a good indication of what the problem is, 'Please Help' is not a good subject line, for example.
How to post code
Because Python uses indentation for blocks, it is essential to use code tags when posting code in the forums. Code in code tags makes it easier for us to read, and indented the way you meant it to be.
- Above the text area box, there are tag buttons (B, i, u, Code, etc.)
- click the code tag "Code" to insert code tags into the text area
- You can either click the code tag, and paste your code between the two tags or:
- You can copy just your code, and click the code tag, which will wrap your code in code tags
- Code: Select all
[code]Put Your Code Here[/code]
"Newly Registered User" restrictions:
- Your first post will be moderated. The post will not be visible until a moderator approves it. Please do not make duplicate first posts as this will have no effect. You will be taken out of newly registered users and into registered users, and from thereafter you may post freely. Sorry for the inconvenience, as this filters the spam from real posts, and keeps our forum spam free. To quicken the process of getting approved, you can join and notify moderators on our IRC channel of your newly post.
- You are not allowed to have a signature
How to ask good questions
Below are some general guidelines for this site, and they often apply to other programming forums, but How to ask good questions in general is a well-explored topic. It is seriously recommended that you read this link.
Describe the goal, not the step... begin by describing the goal. Only then describe the particular step towards it that you are blocked on.
Often, people who need technical help have a high-level goal in mind and get stuck on what they think is one particular path towards the goal. They come for help with the step, but don't realize that the path is wrong. It can take substantial effort to get past this.
Stupid: How do I get the color-picker on the FooDraw program to take a hexadecimal RGB value?
Smart: I'm trying to replace the color table on an image with values of my choosing. Right now the only way I can see to do this is by editing each table slot, but I can't get FooDraw's color picker to take a hexadecimal RGB value.
This should be taken extra seriously for students, to prevent yourself from being perceived as academically dishonest and reported to your school. We will not delete your posts on request; be sure that you are not violating the rules of your class by posting. Your deadline may be urgent to you, but don't assume it is to us.
Naturally, we understand that some students will use this forum to get assistance with their homework, and as a community, we are happy to help. We are not, however, going to do your homework for you. Read the What to include in a post section!
If you are asking for help with homework, we ask that you be honest and admit that it's a homework related question; if we can tell and you don't say it then it looks bad. Show what you've done on your own, and post the code that is causing you problems. Post the exact assignment you've been given, so we know what we're working with, but be sure to include your question too.
If you're answering a question that seems like it might be homework, please quote the original post (unless a moderator has locked the post), so that the original question will not be lost if someone edits their old post.
What to include in a post (read this! seriously!)
- If you're asking a question about code, don't make a post without your own code. Post any code (even if one line) in code tags to help differentiate code from text.
- Always add the entire traceback that you get. For example, the code.
- Code: Select all
1 + '2'
when put into a Python shell will give you the following traceback (the error message)
- Code: Select all
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
1 + '2'
TypeError: unsupported operand type(s) for +: 'int' and 'str'
don't just post the "TypeError: unsupported operand type(s) for +: 'int' and 'str'" part. Do not attempt to summarize or interpret for our benefit, although you're welcome to do so if you want us to let you know that you have it right.
- Post as much code as necessary and as little as possible to reproduce your error, as well as instructions for how to run that code (what input it needs, what files need to be present). If "as much code as necessary" is all your code, then so be it, but if you have a thousand line script and you're getting a traceback similar to the above, you could reproduce the error in one line and posting too much makes it very difficult to answer your question. (As a bonus, reducing your code like this often makes it easier for you to figure out the solution on your own!) Also, the less code you post, the more likely you will get a good, fast, correct response.
- If your program has a GUI (graphical user interface, such as Tkinter, wx, pyqt, etc.) and your problem is with something other than the GUI programming, you will be more likely to get help if you only the post code that you need help with. Separating program logic from user interface is good practice anyway
- It never hurts to include your Python version and operating system (OS). If you're not sure whether to include them, then do so.
- Longer posts should include succinct summarizing questions (questions have question marks (?)). The faster we can read/skim your post, the better for you.
What to NOT include in a post
- For testing purposes, don't include raw_input() calls if you can hard-code the value that reproduces your problem.
- Line Numbers. Your own line numbers with the code. Anyone who wants to help you, has to copy the code, and delete EVERY single number. You will end up with no responses.
- Code: Select all
- Images of text. Please do not take a screenshot of your traceback or code, just copy and paste the text of it in the post. If this text is within a popup that you cannot copy the text out of, please use this tool to acquire the text from within it (for windows users).
- BBCode in Code Tags. Do not wrap code within code tags with additional underline or bold BBCode. It does not make it underlined or bolds it. What it does is just adds the BBcode inside the code tags, ruining your indentation. If you want to signify a line of code in code tags, make an addition code tag with only that line in it to show what line you are referring to.
- Code: Select all
[b][u] else: [/u][/b]
- Text Talk. Leave out the text talk. atm (at the moment), IIRC (if i recall correctly). Stop assuming everyone knows what it means. You are on a forum, not texting your girl friend. Follow to spell check makes things easier to read.
Posts to not make
- The same post in multiple sub forums.
- A new redundant thread on your same question. If someone has told you to include more information, edit your original post or create a new post in your thread. If you don't like the answer, talk about it.
- A post in someone else's thread for your own separate problem. If you wish to reference the other thread, link to it in your own thread. This is especially true for "necro" posts, which is a post which has gone a great deal of time without any posts.
- Asking for help via Skype or other personal avenue. There is a reason we operate a public forum and not a programming help line. Advice given in a thread you post is not just meant to help you, but any others that come across a similar problem or just want to learn.
Modification of your posts
- Some posts may be locked by moderators if they seem more likely to be removed/modified with ill-intent. Don't take this personally.
- You are (generally) free to modify the title to more explicitly explain your problem better
- If you need to modify a section of a post, please either make a new post, or append to the bottom of the post your corrected part. Please leave the rest of the post alone to not disrupt the flow of dialog.
- Removal of the original post (OP) will get you a warning, continued locked posts, or even banned. Please do not do it. If you feel you need to remove the OP or change it, please ask a moderator/admin before doing so.
It is better to just post in the section that best suits your question. Because if it is not, your post will be moved, and will be mentioned on your thread anyway. It is better to just take a second before posting to decide where the post should be in the first place. This makes it a lot easier on us moderators and makes the whole forum database better organized.
- General Discussions is just that...discussions. It is for questions about the Python language in general. For example: "How long did it take you to learn Python basics". It is not meant for questions about code. That is for General Coding Help.
- Tutorials is an accumulation of tutorials that are approved by the majority of the forum moderators/admin.
- Tutorial Submissions are for if you want to submit a tutorial of any kind. If it is approved, it will be moved to Tutorials.
- Completed Scripts are for you completed programs. If you have multiple files, it is better to upload your code to Github and post a link to the repo as opposed to posting each file on the forum.
- Jobs are for if you want to pay a Python programmer to do the work for you. Or it is for if you have a job opening for a programmer and want to announce it.
- General Coding Help is where you post all your code and beginner questions that do not fit into other categories.
- GUI is where you post code regarding GUI code, such as Tkinter, wxPython, Qt, etc.
- Game Development is where you ask questions regarding a gaming GUI framework such as Pygame, or the logic behind game development.
- Networking is for networking related questions about code. Such as sockets, Twisted, etc.
- Web Development is for web dev related questions about code. Web frameworks such as Django, etc.
- Challenges are for posting a challenge for the forum to tackle.
- Project Euler is for Project Euler related questions.
- Suggestions are for suggestions related to the forum itself. Such as forum placement, adding/removing a forum, hosting, etc.
- Bar is for anything off topic. Free to discuss almost anything.
Following these guidelines will make it easier for everyone to see, understand, and organize your code and help you get an answer promptly. Ignoring these guidelines will make your post turn into a mirror of these guidelines from numerous users.