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 7186473
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T18:38:18+00:00 2026-05-28T18:38:18+00:00

I’m a newbie to programming and need some help with the set of fixers

  • 0

I’m a newbie to programming and need some help with the set of fixers to refactor code written for Python 3.x into code that can run on a 2.x interpreter.

I have Python 3.2, but the admissions for the Spotify Puzzle’s (http://www.spotify.com/us/jobs/tech/best-before/) requires that the code is written in 2.6. Therefore, I found the 3to2 coverter. I have the “3to2_py3k-1.0.tar.gz” vesion which you can download from here: https://bitbucket.org/amentajo/lib3to2.

The README file tells you to

(…)Run “./3to2” to convert stdin (“-“), files or directories given as
arguments.(…)

The text on this site is identical to the README file.

I understand this I’m supposed to run the commandline and then write:

C:\Python32>3to2 Spotify.py

3to2 is not recognized as an intern or extern command, a program a or batch file.

(Manually translated from norwegian).

I have tried to path to the spesific files, but there is no file that is named “3to2”. I Have tried to path to the “main.py” file and “Spotify.py” directly, and it seems like something happens(Like it takes a tiny bit of a second, and gives no errors), but when I open “Spotify.py” again, nothing have happend to the file.

I appreciate all help.


Thank you spatz, this helped a lot. Finally, I managed to install the package by cd C:\Python32>python.exe setup.py install

Anyway I still have some problems. Take the print("Hello World!") program as an example. When I run python.exe 3to2 HelloWorld.py(it did’t work without the python.exe) it answers:

 RefractingTool: Skipping implicit fixer: collections
 RefractingTool: Skipping implicit fixer: int
 RefractingTool: Skipping implicit fixer: memoryview
 RefractingTool: Skipping implicit fixer: printfunction
 RefractingTool: Skipping implicit fixer: inittest
 RefractingTool: Refactored HelloWorld.py
 --- HelloWorld.py   (original)
 +++ HelloWorld.py   (refactored)
 @@ -1 +1 @@
 -print("Hello World!")
 +print u"Hello World!"
 RefactoringTool: Files that need to be modified:
 RefactoringTool: HelloWorld.py

This is really mixed signals for me. First of all, it seems like it skips some fixers, for instance the printfunction. But later, it definitely looks like it changed print("Hello World!") with print u"Hello World!" as it should. The problem is that when I open this file in IDLE 3.2, the file has the original code. The exact same happens with the Spotify.py file. Is IDLE “smart” enough to change this simple code so it is compatible with 3.x, or doesn’t the 3to2 fixer set works?


SOLUTION:
I figured it out. I had to include -w as an argument. That converted the original file in addition to creating a backup fil .bak.

Thanks to anyone that helped me!

  • 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-28T18:38:19+00:00Added an answer on May 28, 2026 at 6:38 pm

    It seems you did not properly install 3to2. To install do the following:

    1. Unpack the .tar.gz file you downloaded to some directory
    2. cd to that directory and run python setup.py install

    Now you can cd to the directory where Spotify.py is and run 3to2 Spotify.py, and it should work.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I need a function that will clean a strings' special characters. I do NOT
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a jquery bug and I've been looking for hours now, I can't
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function

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.