##// END OF EJS Templates
profile list prints just profile names
MinRK -
Show More
@@ -137,31 +137,38 b' class ProfileList(Application):'
137 profiles.append(profile)
137 profiles.append(profile)
138 return profiles
138 return profiles
139
139
140 def _print_profiles(self, profiles):
141 """print list of profiles, indented."""
142 for profile in profiles:
143 print ' %s' % profile
144
140 def list_profile_dirs(self):
145 def list_profile_dirs(self):
141 profiles = self._list_bundled_profiles()
146 profiles = self._list_bundled_profiles()
142 if profiles:
147 if profiles:
143 print
148 print
144 print "Available profiles in IPython:"
149 print "Available profiles in IPython:"
145 for profile in profiles:
150 self._print_profiles(profiles)
146 print ' ipython --profile=%s' % profile
147 print
151 print
148 print " The first request for a bundled profile will copy it"
152 print " The first request for a bundled profile will copy it"
149 print " into your IPython directory (%s)," % self.ipython_dir
153 print " into your IPython directory (%s)," % self.ipython_dir
150 print " where you can customize it to your needs."
154 print " where you can customize it."
151
155
152 profiles = self._list_profiles_in(self.ipython_dir)
156 profiles = self._list_profiles_in(self.ipython_dir)
153 if profiles:
157 if profiles:
154 print
158 print
155 print "Available profiles in %s:" % self.ipython_dir
159 print "Available profiles in %s:" % self.ipython_dir
156 for profile in profiles:
160 self._print_profiles(profiles)
157 print ' ipython --profile=%s' % profile
158
161
159 profiles = self._list_profiles_in(os.getcwdu())
162 profiles = self._list_profiles_in(os.getcwdu())
160 if profiles:
163 if profiles:
161 print
164 print
162 print "Available profiles in current directory (%s):" % os.getcwdu()
165 print "Available profiles in current directory (%s):" % os.getcwdu()
163 for profile in profiles:
166 self._print_profiles(profiles)
164 print ' ipython --profile=%s' % profile
167
168 print
169 print "To use any of the above profiles, start IPython with:"
170 print " ipython --profile=<name>"
171 print
165
172
166 def start(self):
173 def start(self):
167 self.list_profile_dirs()
174 self.list_profile_dirs()
General Comments 0
You need to be logged in to leave comments. Login now