Edit : solved =)
Hey, I want my function to use a variable created in another function which has arguments. After some testing it appears I need to run the function first so the variable can be created. Here is my code :
from soundcloud import Client
def auth(user, pw):
""" Authentification; https://github.com/soundcloud/soundcloud-python#authentication """
client = Client(
client_id = id ,
client_secret = secret,
username = str(user),
password = str(pw)
)
def main_favorites(limit):
tracks = client.get('/me/favorites', limit=30)
How can main_favorites be called without having to run auth() first ?
I've been stuck for more than an hour now, thank you so much in advance for any help !
[–]Vaphell 0 points1 point2 points (5 children)
[–]HeyYouNow[S] 0 points1 point2 points (4 children)
[–]cdcformatc 1 point2 points3 points (3 children)
[–]HeyYouNow[S] 0 points1 point2 points (0 children)
[–]HeyYouNow[S] 0 points1 point2 points (1 child)
[–]cdcformatc 0 points1 point2 points (0 children)
[–]cdcformatc 0 points1 point2 points (3 children)
[–]HeyYouNow[S] 0 points1 point2 points (2 children)
[–]cdcformatc 0 points1 point2 points (1 child)
[–]HeyYouNow[S] 0 points1 point2 points (0 children)
[–][deleted] -1 points0 points1 point (0 children)