Not sure if this is what you're asking, but you can invoke the Python
interpreter from the command line (Terminal)
Open a new terminal, and at the $ prompt just type "python"..
$ python
Python 2.6.1 (r261:67515, Jul 7 2009, 23:51:51)
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "co
On any platform, I use (gui) vim (gvim on Win/Linux, mvim/macvim on OSX)
with this plugin:
http://www.vim.org/scripts/script.php?script_id=30
On Tue, Feb 23, 2010 at 5:40 PM, Benno Lang wrote:
> On 24 February 2010 01:24, Giorgio wrote:
> > what text-editor do you use for python?
>
>
>
__
> On Sat, May 8, 2010 at 5:31 PM, Kirk Z Bailey wrote:
>>
>>> An instructor of mine is about to teach the FIRST EVER class in Python at
>>> Saint Petersburg College; knowing I am a snakecharmer, he asked me for
>>> referrals to online resources.
>>>
>>> Oh my.
>>>
>>
>
> Here is another resource, t
You can call a .py script from the command line, and it will run there. So,
in Windows XP: Start > Run > type "CMD"
Vista: Start > type "CMD" into the Start Search field.
If you're in Linux, get to a Terminal.
In Windows another window will open with something
like...C:\FolderWithMyPyFile>
Linux so
>>> config_names = {'start_time': '18:00:00', 'gray_scale': True, 'long':
120.0}
>>> config_names
{'start_time': '18:00:00', 'gray_scale': True, 'long': 120.0}
>>> for i, x in config_names.items():
... print i, x
...
start_time 18:00:00
gray_scale True
long 120.0
>>>
On Wed, Feb 11, 2009 at 7
But you need to have an order that will work with sorted().
> Its not just the order you add items to the dict. To store an
> arbitrary order I suspect you would need to maintain a
> secondary list with the keys in the order of insertion.
> The most reliable way to dop that would be to subclas
Greetings Tutor:
I've managed to install Python 2.6 on my Ubuntu VM from source, however, it
looks as though I missed something important along the way. My 2.6
interpreter does not have readline support (example: I cant hit up arrow to
repeat the last command) Is there a way to add this functionali
2009 22:34:23 -0700, Eric Dorsey wrote:
>
> > Greetings Tutor:
> > I've managed to install Python 2.6 on my Ubuntu VM from source, however,
> > it looks as though I missed something important along the way. My 2.6
> > interpreter does not have readline support (ex
18 Feb 2009 20:19:56 -0700
> Eric Dorsey wrote:
> > I did an aptitute install of ibreadline5-dev and then
> > did ./configure and make again, and still don't have any
> > functionality to be able to hit up-arrow and get a command repeated
> > while inside the int
ÙØ² Ø§ÙØ¨Ø§ØªÙÙ wrote:
>
> > On Wed, 18 Feb 2009 20:19:56 -0700
> > Eric Dorsey wrote:
> >> I did an aptitute install of ibreadline5-dev and then did ./configure
> >> and make again, and still don't have any functionality to be able to
> >> hit
Here is one possible implementation of your project.
*Code:*
#Dont use list as a variable name, its one of the reserved words.
mylist = []
#realize any values captured here are strings
x = raw_input('Enter num or text: ')
mylist.append(x)
x = raw_input('Enter num or text: ')
mylist.append(x)
#ou
Not sure if this is what you mean, but:
Say you have the files efunc.py and trytry.py in the same folder.
*The content of efunc.py is:*
def funky():
print 'funkytown'
*The content of trytry.py is:*
import efunc
efunc.funky()
*Output would be:*
n...@ububox:~$ python trytry.py
funkytown
n...@
*So here is my program, I'm pulling some information off of my Snipt feed ..
*
import feedparser
d = feedparser.parse('http://snipt.net/dorseye/feed')
x=0
for i in d['entries']:
print d['entries'][x].title
print d['entries'][x].summary
print
x+=1
*Output*
Explode / Implode List
Senthil,
That worked like a charm, thank you for the help! Now my Snipt's are
actually legible :)
On Wed, Mar 4, 2009 at 12:01 AM, Senthil Kumaran wrote:
> On Wed, Mar 4, 2009 at 11:13 AM, Eric Dorsey wrote:
> > I know, for example, that the > code means >, but what I don&
Hi tutors, I am studying classes a bit, and am having trouble with this
concept and would appreciate your help!
class A:
def __init__(self, name, value=1):
self.name = name
self.value = value
And now I want a subclass, one that overrides the value=1 and defaults to
value=2, h
Dayo,
I modified the code a little bit to make things work the way I think you
meant it to work(hopefully), and I changed the name of the function so that
its' not the same name as the python file itself, but hopefully this answers
your questions. Here is my countdown.py
def launchme(n):
while
Make sure you are in the same directory as your hello.py, then run the
interpreter/shell
Try this:
>>>import hello
then you can do things like:
>>>dir(hello)
and
>>>help(hello)
I'm not sure if that's what you were asking, but "import" is how you ..
import. HTH.
On Fri, Sep 4, 2009 at 5:31 P
Hi Corey,
If this is going to be a command line program, two things that immediately
come to mind for me are: validating user input and persistence. If you put
something like "(1) to attack, (2) to run" what if the user types "yes", or
"Y", or "9"? You'll want to make sure your program doesn't cra
Greetings,I have a program where I ask a user to enter a date in format
-MM-DD, and get a string like: '2008-10-25'
Can anyone tell me how I would verify this is a real date before allowing it
to be passed on to the next part of the program?
--
(e)
___
Hi Nick,
I don't know about the graphing portion of your question, but yes Python
does interact very well with databases. I have been working on a workout
tracking program the last two months or so, and I'm new to programming. I'd
highly recommend SQLite as a built-in database solution. I know it's
Dear Pythonistas:
Working in IDLE on Windows Vista, I have one program that I set to have 2
character spacing (due to the levels of if's and while's going on -- later
my brother called this a bit of a code smell, ie. logic shouldn't go that
deep, it should be broken out into separate functions ins
--
eric dorsey | www.perfecteyedesign.com
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
on? Or possibly nonprofits or the like that
need smaller-type applications worked on?
Much thanks!
--
eric dorsey | www.perfecteyedesign.com
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
.
> Jim
> _______
> Tutor maillist - Tutor@python.org
> http://mail.python.org/mailman/listinfo/tutor
>
--
eric dorsey | www.perfecteyedesign.com
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
I am trying to teach myself Linux, and so I'm running Ubuntu (Gutsy Gibbon)
as a virtual machine. I went to terminal, started up Python and realized it
was version 2.5 so I thought I'd just upgrade to 2.6.1 After doing some
Googling around, it seems that Ubuntu is highly reliant on Python 2.5, so
u
25 matches
Mail list logo