-
Marked Solved Status for Pycharm or gedit for Python (Programming in general) beginner?
Pycharm or gedit for Python (Programming in general) beginner? -
Marked Solved Status for problem with function arguments
Hi, me again :) Look at this error please: File "./kivycal-1", line 103, in number_two self.check() TypeError: check() takes exactly 2 arguments (1 given) The error is pointing to here: … -
Marked Solved Status for I started to learn python today and i need your help
I started to learn python today by myself using this course: https://www.youtube.com/watch?v=bX3jvD7XFPs&list=PLB2BE3D6CA77BB8F7 Is that a good start? which book for beginners do you recommend ? *the problem with that course … -
Marked Solved Status for How to get selected items in ttk treeview??
I want to send an email using python. The contents of the message is from a sql querry placed inside a ttk treeview widget. so how do i select and … -
Marked Solved Status for getting the current date
Hi friends. With `datetime.datetime.now()` or `datetime.datetime.today()` i can get the current date (English calendar) for my program but what about if i want to get the current date (from Persian … -
Replied To a Post in Python Text Adventure
Module json is built in, but module rpg_data is custome made. -
Replied To a Post in Raspberry Pi LED control (Python)
Please list your traceback error message, so somebody can help you! -
Replied To a Post in Old old programmer needs some personal help!
IMHO, exercising your brain with Python programming might jut keep Alzheimer's at bay. -
Replied To a Post in looking for a reference for python url lib tutorial?
This might help ... http://pymotw.com/2/urllib/ -
Replied To a Post in problem with kivy label
To return several labels, return the layout in which the labels are ... from kivy.app import App from kivy.uix.label import Label from kivy.uix.boxlayout import BoxLayout class LabelApp(App): def build(self): mytext2 … -
Created Is Go a legacy language?
Just wondering. Exploring Google's Go language, a modern day C with the Google in it. -
Replied To a Post in Is lisp a legacy language?
I read that some of the other languages are called **curly brace** languages. -
Replied To a Post in Google Go OOP
Yes, math big works ... // nine_ones.go package main import "fmt" import "math/big" func main() { nine_ones := "111111111" // nine ones big_nine_ones := big.NewInt(0) big_nine_ones.SetString(nine_ones, 10) big_result := big.NewInt(0) … -
Replied To a Post in problem with kivy label
How about ... from kivy.app import App from kivy.uix.label import Label class LabelApp(App): def build(self): mytext = str(1234567) # you can only return one widget, aka the root widget return … -
Replied To a Post in PyEditor1.2
The Raspberry Pi has Python and Tkinter on it, so give it a try! Of course the Raspberry Pi comes with Idle/Idle3 and a nice general editor called Leafpad. -
Replied To a Post in problem with kivy label
days may not be a string do a test print with `print(type(days))` -
Edited Starting Python
The idea of this thread is to help the beginning Python programmer with hints and helpful code. Please feel free to contribute! If you have any questions start your own … -
Replied To a Post in Old old programmer needs some personal help!
At first create a folder like **Atest** in your Python directory **C:\Python34** where you can save your newly created Python files. On your Windows machine there should be a file … -
Replied To a Post in Memorable Quotations
Maybe Wesley Clark was referring to virus/malware software? "Everybody in the military has a reputation, and usually it doesn't come out to the public." ... General Wesley Clark -
Replied To a Post in There is an elephant on the loo!
"The best thing since sliced bread", before sliced bread it was probably the wheel or the bow and arrow. -
Replied To a Post in error with a .py and .kv
Error messages are poor with .kv files. One reason I don't like them. Check your log file. -
Replied To a Post in How to get selected items in ttk treeview??
Here is one example that might help ... """ tk_treeview101.py see also ... http://stackoverflow.com/questions/16746387/tkinter-treeview-widget """ import os try: # Python2 import Tkinter as tk import ttk except ImportError: # Python3 … -
Marked Solved Status for How do I change the text within an already existing tkinter text widget
I have a Tkinter GUI that is composed of two widgets, the first is a widget class with an entry field and a button and the second is a scrollable … -
Revoked Solved Status for How do I change the text within an already existing tkinter text widget
I have a Tkinter GUI that is composed of two widgets, the first is a widget class with an entry field and a button and the second is a scrollable … -
Replied To a Post in How do I change the text within an already existing tkinter text widget
It took a little detective work, I saw the line `text = Text(self, relief=SUNKEN, width=self.width, height=self.height)` but the line `self.text = text` where you make text part of the instance … -
Replied To a Post in How do I change the text within an already existing tkinter text widget
In hindsight, using class is excellent in this case, but you need to study up on the the class object and the meaning of instance 'self'. -
Replied To a Post in How do I change the text within an already existing tkinter text widget
Well, your class is okay, but the way it is written you can access the Text widget inside the class this way self.top_right = ScrolledText(self, text=self.text, width=50, height=15) text_widget = … -
Replied To a Post in How do I change the text within an already existing tkinter text widget
Your class is written "incorrectly", creating two instances via `__init__()` in the same class. Only the last instance (self) created is used. Note: Sorry, the class is written quite well. … -
Replied To a Post in Python tkinter window
This might give you a hint ... ''' tk_label_lift_lower.py hide and show labels sharing the same grid position with lift and lower ''' try: # Python2 import Tkinter as tk … -
Replied To a Post in How do I change the text within an already existing tkinter text widget
`self.top_right = ScrolledText(self, text=self.text, width=50, height=15)` the instance you get refers to the Frame object and that does not have a 'text' argument. The line `Frame.__init__(self, parent)` in class ScrolledText … -
Marked Solved Status for How to take numbers out from a list to get number 244
Hello. I have a list: mylist = [2,4,4] How can i take number 244 out from the list? Something like: number = 244 Here 244 is integer. -
Marked Solved Status for Import from ???
I'm new to Python, but have a long background in Perl, Ksh &c, C, and others. """One of the different things about Python is the import statement. How do you … -
Marked Solved Status for Creating time for new year beginning
Hello friends. I want to create a countdown program for the new year that is comming. I know i can use this code for example, for short certain time: from … -
Marked Solved Status for "Hello World" Fun
I thought it would be fun to code all the different ways to show Hello World on the display. Let's start simple ... `print("Hello World")` Can anybody print out "Hello … -
Replied To a Post in "Hello World" Fun
I thought it might be interesting to show a typical Hello World program in several popular languages, adding a for loop to the fray. Since the C based languages have … -
Replied To a Post in Projects for the Beginner
Write a program that scrambles each word in a sentence preserving the spaces. For fun unscamble this sentence ... scramble = "yaplgoo eeltrt mrfo het ondomc ocarfty" -
Replied To a Post in "Hello World" Fun
Unscramble this ... `scramble = "lelHo dorlW"` -
Replied To a Post in Google Go OOP
As I keep playing with Go I keep finding little gems. You can use `var name string = "Frank"` or its shorthand version `name := "Frank"` The **:=** operator is … -
Replied To a Post in Google Go OOP
A service called "Go Playground" allows you to test Go code online. It does not allow for user input however. https://play.golang.org/ I am quickly finding out that integers are rather … -
Replied To a Post in Google Go OOP
Darn, Go is somewhat addictive! Has a lot of good Python stuff in it, like dictionaries (map), closures that can be used as generators, anonymous functions etc. On the other … -
Replied To a Post in Google Go OOP
My problem with Go is that multiple Scanf() functions in a row seem to pick up an Enter key bounce (?) and skip, very annoying! Haven't found a solution yet. … -
Replied To a Post in How to take numbers out from a list to get number 244
str(n) is there because you can only join strings. -
Replied To a Post in Creating time for new year beginning
You can only edit within one hour after posting. Try this ... import datetime as dt now = dt.datetime.today() year = now.year # Persian new year march 21 at 2:15:11 … -
Replied To a Post in How to take numbers out from a list to get number 244
Something like this ... mylist = [2,4,4] number = int("".join(str(n) for n in mylist)) print(number, type(number)) -
Replied To a Post in Get a Python module's location
Get more detail this way ... ''' inspect101.py explore Python module inspect ''' import inspect import glob # check if there is a file glob.py try: print(inspect.getsourcefile(glob)) except TypeError: print("source … -
Replied To a Post in Get a Python module's location
You can also get the location from help(module) under FILE ... import collections help(collections) -
Replied To a Post in "Hello World" Fun
Pygame can do it ... import pygame as pg pg.init() yellow = (255, 255, 0) screen = pg.display.set_mode((640, 280)) # pick a font you have and set its size myfont … -
Replied To a Post in Get a Python module's location
Getting the needed information can be as simple as ... import pip print(pip) -
Replied To a Post in Import from ???
Can be as simple as ... import pip print(pip) -
Replied To a Post in Pycharm or gedit for Python (Programming in general) beginner?
PyCharm is a pretty complex IDE for beginners. Why not start with the Idle IDE that comes with Python? Also check out ... http://ninja-ide.org/ Ninja is free
The End.