 		   py-which-args py-jpython-command-args))
 	    (t (error "Illegal value for `py-default-interpreter': %s"
 		      py-default-interpreter))))
-  (switch-to-buffer-other-window
-   (apply 'make-comint py-which-bufname py-which-shell nil py-which-args))
-  (make-local-variable 'comint-prompt-regexp)
-  (setq comint-prompt-regexp "^>>> \\|^[.][.][.] \\|^(pdb) ")
-  (add-hook 'comint-output-filter-functions 'py-comint-output-filter-function)
-  (set-syntax-table py-mode-syntax-table)
-  (use-local-map py-shell-map)
-  )
+  (let ((args py-which-args))
+    (when (and argprompt
+	       (interactive-p)
+	       (fboundp 'split-string))
+      ;; TBD: Perhaps force "-i" in the final list?
+      (setq args (split-string
+		  (read-string (concat py-which-bufname
+				       " arguments: ")
+			       (concat
+				(mapconcat 'identity py-which-args " ") " ")
+			       ))))
+    (switch-to-buffer-other-window
+     (apply 'make-comint py-which-bufname py-which-shell nil args))
+    (make-local-variable 'comint-prompt-regexp)
+    (setq comint-prompt-regexp "^>>> \\|^[.][.][.] \\|^(pdb) ")
+    (add-hook 'comint-output-filter-functions
+	      'py-comint-output-filter-function)
+    (set-syntax-table py-mode-syntax-table)
+    (use-local-map py-shell-map)
+    ))
 
 (defun py-clear-queue ()
   "Clear the queue of temporary files waiting to execute."

    (setq py-output-buffer (format "*%s Output*" py-which-bufname))))

;;;###autoload
(defun py-shell ()
  "Start an interactive Python interpreter in another window.
This is like Shell mode, except that Python is running in the window
instead of a shell.  See the `Interactive Shell' and `Shell Mode'
sections of the Emacs manual for details, especially for the key
bindings active in the `*Python*' buffer.

Note: You can toggle between using the CPython interpreter and the
JPython interpreter by hitting \\[py-toggle-shells].  This toggles

interaction between undo and process filters; the same problem exists in
non-Python process buffers using the default (Emacs-supplied) process
filter."
  (interactive "P")
  (if (null py-which-shell)
      (cond ((eq py-default-interpreter 'cpython)
	     (setq py-which-shell py-python-command
