• Member Avatar for vegaseat
    vegaseat

    Marked Solved Status for problem with deleting a list indexes with both int and str

    Hello. mylist = [6, '/', 3, '+', 9, '+', 8, '+', 1, '/', 2] How can i delete that list indexes? I tried: def clear(self, event): global numbers for i …
  • Member Avatar for vegaseat
    vegaseat

    Marked Solved Status for How to limit list indexes

    Hello again. How can i limit my list indexes? I want my list to take only 3 indexes for example.
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in How to limit list indexes

    if you use list("string"), it will give you a list of the characters in "string".
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in problem with function arguments

    I don't get the error with check(), besides you really don't need it. You may have something like 123+45 to solve. My (still brute force code) suggestion ... from kivy.app …
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in How to limit list indexes

    This will do, create a custom list append ... def list_append(item, tlist=[], limit=3): ''' append max limit items to a list list cannot exceed given limit size ''' if len(tlist) …
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in problem with deleting a list indexes with both int and str

    mylist = [6, '/', 3, '+', 9, '+', 8, '+', 1, '/', 2] print(mylist) # replace mylist with an empty list mylist = [] print(mylist) # --> [] mylist = …
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in problem with function arguments

    numbers should be part of the instance, bad to use a global
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in How to limit list indexes

    Not sure why you want to do this, but one way is to build a ringbuffer ... import collections def ringbuffer_append(item, dq=collections.deque(maxlen=3)): ''' mimics a ringbuffer of length 3 you …
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in "Hello World" Fun

    Using Windows .NET or Linux Mono with IronPython ... import clr clr.AddReference("System.Windows.Forms") clr.AddReference('System.Drawing') from System.Windows.Forms import Application, Form from System.Drawing import Color class IForm(Form): def __init__(self): # set form title, …
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in "Hello World" Fun

    Using Java libraries with Jython ... from javax.swing import JFrame f = JFrame('Hello, World!') f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE) f.setSize(300, 300) f.setLocationRelativeTo(None) f.setVisible(True)
  • Member Avatar for vegaseat
    vegaseat

    Edited Python GUI Programming

    This 'sticky' thread is for working examples of Python GUI code. Note that most wxPython examples have their own thread. Please use comments in your code to help the reader. …
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in Starting Python

    You can use Python module json to save (dump) and read (load) certain Python objects ... ''' json_dictionary1.py Python module json can be used to dump and load dictionay objects …
  • Member Avatar for vegaseat
    vegaseat

    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 …
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in Learning Python

    You might want to look at: https://www.daniweb.com/software-development/python/reviews/380143/review-of-python-tools-for-visual-studio#post1636501
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in Drop-down menu in Tkinter

    Make sure the data is presented to the OptionMenu() as a list that is unpacked with the * operator. Testprint choices and use *choices as an argument.
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in Raspberry Pi LED control (Python)

    The Raspberry Pi has 2 connectors that can be used with an inexpensive video camera element. There seem to be a lot of folks that use the RBP as a …
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in Raspberry Pi LED control (Python)

    I am using my Raspberry Pi (RBP) as my Linux machine too. Some innovative folks have stacked a number of RBPs to successfully model an inexpensive super computer. Sounds: I …
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in Learning Python

    Ruby skills are not much in demand. My prediction is that Java demand will slowly fizzle and will be replaced by a combination of Python and C++. Python for the …
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in Feeling demotivated

    I keep reading that at least the US will be facing an unbelievable shortage of people with good programming skills. I am not sure about other countries. The problem with …
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in Review of Python Tools for Visual Studio

    C# was Microsoft's answer to Java after Oracle gave them a hard time. It was designed by the same parson that did the original Turbo Pascal, Turbo C and Delphi. …
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in Feeling demotivated

    I am a scientist and studied biology. chemistry, computers, process automation, physics, management and engineering. I am gainfully retired now, but had one heck of a good time in my …
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in "Hello World" Fun

    @pyTony, for some odd reason the '\n' only line does not copy and paste well on my Linux machine using IDLE, so I modified your clever code like this ... …
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in "Hello World" Fun

    Some less common string methods anyone? s = "hello world" print(" ".join(word.capitalize() for word in s.split())) # simpler ... print(s.title()) # more ... print(s.title().center(20)) print(s.title().swapcase())
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in Feeling demotivated

    My horror would be to end up with a dull and boring job/career.
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in Projects for the Beginner

    A mildly more advanced project. Write a Python program that lists and connects the functions, responsibilities and interactions of the branches and agencies of the federal government. The program should …
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in Not sure what this chunk of code is doing

    You need to double click on the code field which will highlight the code. Now you can copy and paste it to an IDE editor. The code works. Initially you …
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in "Hello World" Fun

    Pyside/PyQT allows you to use HTML code ... from PySide.QtGui import * app = QApplication([]) s_html = '''\ <font face="Courier" color=red size=7><p><i> {} </i></p></font> '''.format("Hello World") label = QLabel(s_html) label.show() …
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in "Hello World" Fun

    Vertical slanted left to right ... print('\n'.join(" "*ix + c for ix, c in enumerate("Hello World"))) Now if I only could slant it right to left.
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in Python GUI Tkinter Calculator

    Also, when you see very repetitive code, then a function or a loop comes to mind.
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in Raspberry Pi LED control (Python)

    People have connected the Arduino with a Raspberry Pi via a USB cable and get the best of both worlds since the Raspberry Pi lacks analog IO and the Arduino's …
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in GUI programming

    For small projects in Python I use Tkinter quite a bit. Generally I haven't used **tkdocs** for a reference because the information is scatterd amongst so many languages. The Python …
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in Drop-down menu in Tkinter

    No idea what your file looks like. # let's assume your data is read from a file like this data = '''\ red green blue yellow white ''' choices = …
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in There is an elephant on the loo!

    Birds need gravity to swallow. No space trips for them!
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in There is an elephant on the loo!

    Every person has a unique tongue print.
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in There is an elephant on the loo!

    Canada is an American Indian word meaning "Big Village".
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in There is an elephant on the loo!

    Baseball Great **Babe Ruth** wore a cabbage leaf under his cap to keep him cool. He changed it every 2 innings.
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in Random Facts

    A whale's penis is called a dork.
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in Random Facts

    A quarter (US 25 cents) has 119 grooves on its edge, a dime (US 10 cents) has one less groove.
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in There is an elephant on the loo!

    99% of the solar system's mass is concentrated in the sun.
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in Memorable Quotations

    "We will perhaps eventually be writing only small modules which are identified by name as they are used to build larger ones, so that devices like indentation, rather than delimiters, …
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in I started to learn python today and i need your help

    Actually https://www.youtube.com/watch?v=tKTZoB2Vjuk and its sequals are pretty good. For a whole collection of Python videos take a look at https://www.youtube.com/playlist?list=PL61E606149255B362
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in What does epsilon in python mean?

    Highlight your code and press **Code** on the bar above to preserve your indentations.
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in which is your favourite game?

    An oldy but goody: Age of Empires II I find it very relaxing, yet challenging.
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in Memorable Quotations

    “This book was written using 100% recycled words.” ... Terry Pratchett (Wyrd Sisters)
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in Memorable Quotations

    “Oh Beautiful for smoggy skies, insecticided grain, For strip-mined mountain's majesty above the asphalt plain. America, America, man sheds his waste on thee, And hides the pines with billboard signs, …
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in Would you play your laptop in bed???

    Using a note book in bed is a bit awkward, have to wait until brain wave readers come out.
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in Random Facts

    Apple CEO Tim Cook is attending a White House cybersecurity summit, where he's expected to discuss whether Apple's encryption policies are aiding criminals.
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in Random Facts

    Apple creates its own chips for the iPhone and the iPad based on designs from ARM and then has manufacturers like Samsung build them.
  • Member Avatar for vegaseat
    vegaseat

    Marked Solved Status for python caesar cipher

    memoryc = open("cipher.txt", "a") memoryd = open("decipher.txt", "a") #------------------------------------------------------------------------------- choice = input("cipher, decipher or memory") #------------------------------------------------------------------------------- if choice == "cipher": message = input("What is your message?") key = int(input("What is …
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in Why the kivy file doesn't work?!!

    Oh, I see you are using things like ... https://www.youtube.com/watch?v=ZVWAKzR63ig&feature=youtu.be These videos are hard to follow and you can make a lot of typos trying to copy the code.

The End.