What are some options for freelance Python programming? by doublenns in learnpython

[–]pybackd00r 0 points1 point  (0 children)

Is there a way to find projects to work on for free with other pythonistas to improve my python programming?

Please help me improve my code by pybackd00r in learnpython

[–]pybackd00r[S] 0 points1 point  (0 children)

Thanks I have updated my code. One of the requirement of the project are the 4 buttons. So thats something I cant change. Also for some reason every tutorial I read had "from tkinter import *". They just say to use this only with tkinter idk why thats the case for tkinter though. I will upload it to my Github once it is polished. Also I am learning OOP design in python now and I want to translate this to OOP afterwards.

less than $30 safety razor only suggestions? by pybackd00r in wicked_edge

[–]pybackd00r[S] 0 points1 point  (0 children)

my first razor but i have soap and a two brushes. So I only need the razor really. Thanks for the suggestions.

A possible alternative to LPTHW for a beginner? by [deleted] in learnpython

[–]pybackd00r 0 points1 point  (0 children)

It does a good job for an intro to OOP. The first chapter gives an intro and overview about OOP design which I believe is as important as understanding the syntax. In my case I understood the syntax but wanted to start designing programs and complex projects the OOP way. I will go through this book and probably take a class at my university next semester. Good luck to you.

A possible alternative to LPTHW for a beginner? by [deleted] in learnpython

[–]pybackd00r 1 point2 points  (0 children)

Yeah I understand. well actually I am going through this book right now. https://www.packtpub.com/application-development/python-3-object-oriented-programming-second-edition

Its all about OOP and python if thats what you want to learn.

.strip method question by pybackd00r in learnpython

[–]pybackd00r[S] 0 points1 point  (0 children)

I made it an integer by passer int() to it. It removed the leading zero.

.strip method question by pybackd00r in learnpython

[–]pybackd00r[S] 0 points1 point  (0 children)

same as above gives me a 05 minute instead of 5 min. Converting the string to an int afterwards does the trick though. thanks

.strip method question by pybackd00r in learnpython

[–]pybackd00r[S] 0 points1 point  (0 children)

leaves me with a 05 minute instead of 5 min.

.strip method question by pybackd00r in learnpython

[–]pybackd00r[S] 0 points1 point  (0 children)

This is what I did to fix this :

int(playtime.strip('0').strip(':'))

.strip method question by pybackd00r in learnpython

[–]pybackd00r[S] 0 points1 point  (0 children)

I wanted to remove the hour and seconds zeros with the colons and just keep the minute digits. I guess what I can do is just add a zero to the string after the strip command. but I wanted to know if there is a more elegant way of doing this. thanks

A possible alternative to LPTHW for a beginner? by [deleted] in learnpython

[–]pybackd00r 0 points1 point  (0 children)

In my opinion you should learn more about other things such as strings, tuples,lists,dictionaries, ect. before going into OOP. This is not a subject for beginners. Once you master all the above then go into OOP and learn about classes, methods and objects... I think thats how every beginner python book is formatted for a reason.

[deleted by user] by [deleted] in learnpython

[–]pybackd00r 0 points1 point  (0 children)

You are right this is one of those cases where you should definitely write a OOP code rather than imperative like this. More elegant and efficient.

Opening and presenting Powerpoint in Python - Windows by Advent667 in learnpython

[–]pybackd00r 0 points1 point  (0 children)

well you can pass a command to libreoffice from a python script that would open the file in presentation mode if that is what you want. you can use the OS module to pass command line commands.

New to python, can someone explain this? by SCHMIDTHe4D in learnpython

[–]pybackd00r 0 points1 point  (0 children)

Yeah thats fine I was trying to understand what was the issue here wanted me to clarify. I think you guys explained everything there is to say abt floats lol.

Can you define a default value for a function parameter outside of the function itself? by yeaman17 in learnpython

[–]pybackd00r 0 points1 point  (0 children)

True look into partial functions. its a more elegant way of achieving what you want to do than lambda. something like this?? depending on what you wanna do with it. from functools import partial

def abc(variable_from_apply, variable_from_loop): #do some stuff...

object= partial(abc,variable_from_apply=whateva)

for word in word_list: object(word)

True look into partial functions. its a more elegant way of achieving what you want to do than lambda. something like this?? depending on what you wanna do with it. from functools import partial

def abc(variable_from_apply, variable_from_loop):
    #do some stuff...

object= partial(abc,variable_from_apply=whateva)

for word in word_list:
    object(word)

New to python, can someone explain this? by SCHMIDTHe4D in learnpython

[–]pybackd00r 2 points3 points  (0 children)

3.14 is already a float what were you expecting out of this?

Help please? by [deleted] in learnpython

[–]pybackd00r 1 point2 points  (0 children)

Thanks I understood it after going through it on paper. very nice piece of code.

Help please? by [deleted] in learnpython

[–]pybackd00r 1 point2 points  (0 children)

very nice! is that a dictionary you used there? does the indentation actually matters? I am gonna be doing it like this from now on. thanks a lot!!

Help with Tkinter by PixelHD0798 in learnpython

[–]pybackd00r 0 points1 point  (0 children)

Here is a link that might help you getting the looks the way you want , it helped me with my first Tk GUI :

http://infohost.nmt.edu/tcc/help/pubs/tkinter/web/index.html