I Need a Couple of Tips for Windows to Get Started on IPython

I've seen the tutorial, but need something more. How do I know what folder I'm in? How do I move from where I am to, for example, C:\abc\def? So far I've tried various combinations like this:

cd ..
cd C:\
pwd (yes, I know it's not windows)

I tried %cd .., and that may have moved me but I seem to get back to the same place.

I seem to be in C:\Documents and Settings\administrator. If I doa %cp ..\\ it looks like I get to C:\, but follwing that with pwd gets me back to where I started--C:\Documents and Settings\administrator.

If I want to execute a program with %run, I need to be where abc.py is or, perhaps say something like %run C:\myPyPrograms\abc.py.
Dir doesn't work and I haven't been able to even see what's in the folder.

···

--
           Wayne Watson (Watson Adventures, Prop., Nevada City, CA)

             (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time)
              Obz Site: 39� 15' 7" N, 121� 2' 32" W, 2700 feet
                             "... humans'innate skills with numbers isn't much
              better than that of rats and dolphins." -- Stanislas Dehaene, neurosurgeon
                     Web Page: <www.speckledwithstars.net/>

Wayne,

Are you using the IPython shell? If so, cd, pwd, ls, etc will work just fine.

If you using the standard python shell, AFAIK, you need to import the os module and use that to navigate.

Ipython session:
C:\Documents and Settings\phobson>ipython
Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit (Intel)]
Type "copyright", "credits" or "license" for more information.

IPython 0.10 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object'. ?object also works, ?? prints more.

In [1]: pwd
Out[1]: 'C:\\Documents and Settings\\phobson'

In [2]: cd c:\stuff\utils\py
c:\stuff\utils\py

In [3]: pwd
Out[3]: 'c:\\stuff\\utils\\py'

In [4]: cd c:\
c:\

In [5]: cd c:\stuff\utils\py
c:\stuff\utils\py

In [6]: ls *.pdf
Volume in drive C has no label.
Volume Serial Number is 24FD-DA13

Directory of c:\stuff\utils\py

09/11/2009 11:39 AM 1,515,182 elev_test5.pdf
10/18/2009 01:06 PM 147,663 frLarch_elev.pdf
05/12/2009 10:30 AM 28,029 gear.pdf
03/11/2009 09:56 AM 30,622 test.pdf
08/27/2009 09:18 AM 17,175 tidal_cdf.pdf
11/16/2009 08:20 AM 118,902 zoom_test.pdf
11/16/2009 08:18 AM 124,000 zoom_test_final.pdf
               7 File(s) 1,981,573 bytes
               0 Dir(s) 82,894,716,928 bytes free

Paul M. Hobson
Senior Staff Engineer

···

--
Geosyntec Consultants
55 SW Yamhill St, Ste 200
Portland, OR 97204
Phone: (503) 222-9518
www.geosyntec.com

-----Original Message-----
From: Wayne Watson [mailto:sierra_mtnview@…209…]
Sent: Sunday, December 06, 2009 3:02 PM
To: matplotlib-users@lists.sourceforge.net
Subject: [Matplotlib-users] I Need a Couple of Tips for Windows to Get
Started on IPython

I've seen the tutorial, but need something more. How do I know what
folder I'm in? How do I move from where I am to, for example,
C:\abc\def? So far I've tried various combinations like this:

cd ..
cd C:\
pwd (yes, I know it's not windows)

I tried %cd .., and that may have moved me but I seem to get back to the
same place.

I seem to be in C:\Documents and Settings\administrator. If I doa %cp
..\\ it looks like I get to C:\, but follwing that with pwd gets me back
to where I started--C:\Documents and Settings\administrator.

If I want to execute a program with %run, I need to be where abc.py is
or, perhaps say something like %run C:\myPyPrograms\abc.py.
Dir doesn't work and I haven't been able to even see what's in the
folder.

--
           Wayne Watson (Watson Adventures, Prop., Nevada City, CA)

             (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time)
              Obz Site: 39° 15' 7" N, 121° 2' 32" W, 2700 feet

             "... humans'innate skills with numbers isn't much
              better than that of rats and dolphins."
                       -- Stanislas Dehaene, neurosurgeon

                    Web Page: <www.speckledwithstars.net/>

-------------------------------------------------------------------------
-----
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing.
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Hi, I'm using IPython raw. I guess I'm not sure what a shell is in this
case. I used to work with Linux years ago and the shell concept was
clear there. I'm now simply a Win XP user. What advantages would be
available to use a shell?

In part of the thread above,(posted 57 minutes after the hour, I asked
how copy and paste operate? Quick IPyton seems to think it works quite
like a Win copy and paste. It doesn't work for me.

Below you've manage to post a session. How did that happen? Is there a
file that I can pick up that contains the log? From the ref manual, I
see this:

···

===============

      Manual capture of command output�
<http://ipython.scipy.org/doc/manual/html/interactive/reference.html#manual-capture-of-command-output>

If the input line begins with two exclamation marks, !!, the command is
executed but its output is captured and returned as a python list, split
on newlines. Any output sent by the subprocess to standard error is
printed separately, so that the resulting list only captures standard
output. The !! syntax is a shorthand for the %sx magic command.

Finally, the %sc magic (short for �shell capture�) is similar to %sx,
but allowing more fine-grained control of the capture details, and ...
===============end

Maybe this is somehow you did it?

PHobson@...2792... wrote:

Wayne,

Are you using the IPython shell? If so, cd, pwd, ls, etc will work just fine.

If you using the standard python shell, AFAIK, you need to import the os module and use that to navigate.

Ipython session:
C:\Documents and Settings\phobson>ipython
Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit (Intel)]
Type "copyright", "credits" or "license" for more information.

IPython 0.10 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object'. ?object also works, ?? prints more.

In [1]: pwd
Out[1]: 'C:\\Documents and Settings\\phobson'

In [2]: cd c:\stuff\utils\py
c:\stuff\utils\py

In [3]: pwd
Out[3]: 'c:\\stuff\\utils\\py'

In [4]: cd c:\
c:\

In [5]: cd c:\stuff\utils\py
c:\stuff\utils\py

In [6]: ls *.pdf
Volume in drive C has no label.
Volume Serial Number is 24FD-DA13

Directory of c:\stuff\utils\py

09/11/2009 11:39 AM 1,515,182 elev_test5.pdf
10/18/2009 01:06 PM 147,663 frLarch_elev.pdf
05/12/2009 10:30 AM 28,029 gear.pdf
03/11/2009 09:56 AM 30,622 test.pdf
08/27/2009 09:18 AM 17,175 tidal_cdf.pdf
11/16/2009 08:20 AM 118,902 zoom_test.pdf
11/16/2009 08:18 AM 124,000 zoom_test_final.pdf
               7 File(s) 1,981,573 bytes
               0 Dir(s) 82,894,716,928 bytes free

Paul M. Hobson Senior Staff Engineer
  
--
           Wayne Watson (Watson Adventures, Prop., Nevada City, CA)

             (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time)
              Obz Site: 39� 15' 7" N, 121� 2' 32" W, 2700 feet

             "... humans'innate skills with numbers isn't much
              better than that of rats and dolphins."
                       -- Stanislas Dehaene, neurosurgeon

                    Web Page: <www.speckledwithstars.net/>