Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 628473
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T19:38:27+00:00 2026-05-13T19:38:27+00:00

I have two separate python scripts. One is for getting user location information (which

  • 0

I have two separate python scripts. One is for getting user location
information (which I get from web based geofeed provider.User Gsm is registerd
with that services).Another is for retrieving lastfm user track history.I have already
able to get user location data and user music track information.

Goal is to map those two script in such a way that I could be
able to make relation from those information” Users in certain location are listening certain music in certain time”.

Can anybody have nice idea to get this out?Thanks in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T19:38:27+00:00Added an answer on May 13, 2026 at 7:38 pm

    Write a third script that import both of the other as modules, and make sure each module’s functionality is embodied in a function (as is Python’s best practice), not just “floating” as module-level code — a module’s top-level statements should usually be limited to import, from, def, class, and simple assignments of names to constants (possibly initial values for global variables), with all actual logic within functions and classes.

    So in your third script, after importing the other two as modules, you have a main function that calls the operating functions of the others to get location and track info, calls a function from standard module datetime (e.g. datetime.datetime.now()) — or possibly time — to get the current time, and finally formats all this information in the way you desire and writes it somewhere (where and how do you want to “publish” this info?).

    At the end of the script you do

    if __name__ == '__main__':
        main()
    

    which is the usual Python idiom to ensure the module’s main function executes when the file’s being used as the main script rather than just being imported from elsewhere.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i'm using python twisted and i have two separate servers working, one that recieves
We have two separate web-apps, say 'retailUI' and 'bulkUI'. These two are basically two
I have two separate caches running in a JVM (one controlled by a third
We have two databases, in two separate locations. One of the databases resides in
I have two physically-separate MySQL databases on which I have to run a single
I have two separate Python List that have common key names in their respective
I have two String.printable mysteries in the one question. First, in Python 2.6: >>>
I'm working on a Python web application in which I have some small modules
I have two separate applications (both part of the same system) that share a
I have two separate sets of tables in the same database that model the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.