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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T08:15:56+00:00 2026-06-08T08:15:56+00:00

I am a Python guy new to Clojure. I like a bit of air

  • 0

I am a Python guy new to Clojure.

I like a bit of “air” around my REPL prompt. By air I mean a blank line between prompts.

In a Python REPL I can import sys and write sys.ps1='\n>>> '

Alternatively I could modify sys.ps1 in the code.interact source.

I found the following code in c:\clojure\src\clj\clojure\main.clj

(defn repl-prompt  
  "Default :prompt hook for repl"  
  []  
  (printf "%s=> " (ns-name *ns*)))

I added a newline at "\n%s=>" and fired up the REPL.

Wait …that didn’t work. <sad face>

My question is, why didn’t it work?

I am using the basic Clojure 1.4.0 REPL on Windows XP (JVM=1.6.0).

  • 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-06-08T08:15:57+00:00Added an answer on June 8, 2026 at 8:15 am

    E.g.

    user=> (defn prompt [] (printf "my\n%s=>" (ns-name *ns*)))
    #'user/prompt
    user=> (clojure.main/repl :prompt prompt)
    my
    user=>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

new guy here and I'm slowly getting the hang of python, but I have
I'm a Python guy. Learning C language and I've been trying to implement Binary
Python allows aliasing of imports, through ...as <ALIAS> clauses in the import statement, like
Basically I want to do the opposite of what this guy did... hehe. Python
I am horrible with JS more a Python guy :) and I have this
I've spent a fair bit of time with PHP & Python frameworks and recently
I want to do exactly what this guy did: Python - count sign changes
Possible Duplicate: Integrate Python And C++ I am the python GUY and do web
I'm a PHP guy on my first day in Python-land, trying to convert a
Python is installed in a local directory. My directory tree looks like this: (local

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.