I believe you can submit the new config content as a blob where blob =
string.join(lines). It looks like your "switch" uses IOS, not CatOS, so
make sure you send "config t" first.
And I would strip out the \r's.
Then maybe:
tn.write("\03") # Assures the device
Hi all,
I've got the following snippet in a script I'm playing around with and
need some help.
Basically the script telnets to a cisco switch, "tn.read_until" a
subsection of the config, outputs to a file, then using readlines brings
it back into the script as a list where I'm changing some fiel
On 03/03/06, Rakesh Mishra <[EMAIL PROTECTED]> wrote:
> hi
>
> i wanted to create my own web server, can any body suggest any tutorial,
> by the way i have gone through book Core Python Programing, in this book
> one example is given but it is to abstract, that i am unable to understand
Do you
hi
i wanted to create my own web server, can any body suggest any tutorial,
by the way i have gone through book Core Python Programing, in this book
one example is given but it is to abstract, that i am unable to understand .
Thanks in advance
rakesh
__
> You can do this by setting an environment variable named PYTHONSTARTUP to
> name of a file containing your start-up commands
>
> How do I set environmental variables in Windows?
If it's Windows 9x/Me use AUTOEXEC.BAT.
SET PTYTHONSTARTUP C:\mypath\myfile.py
If its Windows NT/2000/XP
right click
In the primary tutor file,
in section
2.2.4 The Interactive Startup File .
It states:
You can do this by setting an environment variable named PYTHONSTARTUP to
the
name of a file containing your start-up commands
How do I set environmental variables in Windows?
Kermit< [EM
On Thu, 2 Mar 2006, Terry Carroll wrote:
> Thanks, Kent! I didn't know about "key=". I see it's new in 2.4.
> I was thinking I'd have to put in a method for each potentially sortable
> field.
And, in the spirit of RTFM, I should have been looking here first:
http://wiki.python.org/moin/How
On Thu, 2 Mar 2006, Kent Johnson wrote:
> In [9]: lst.sort(key=attrgetter('b')); print lst
Thanks, Kent! I didn't know about "key=". I see it's new in 2.4.
I was thinking I'd have to put in a method for each potentially sortable
field.
___
Tutor ma
Terry Carroll wrote:
> I have a list (or a list-like object, doesn't matter) of objects, each of
> which has multiple fields. I want to be able to arbitrarily sort the list
> on any of them, or at least on several of them.
>
> To make this a little more concrete, here's a simplified idea. Say th
I have a list (or a list-like object, doesn't matter) of objects, each of
which has multiple fields. I want to be able to arbitrarily sort the list
on any of them, or at least on several of them.
To make this a little more concrete, here's a simplified idea. Say the
objects each represent a fil
Ben Vinger wrote:
> Thanks to all who responded. I ended up using a sender parameter as
> suggested by Andre and Alan, as this was very simple to do.
When confronted with problems like this I tend to create classes, then
subclass as needed for special circumstances. You might consider that
app
On Thu, 2 Mar 2006, Carroll, Barry wrote:
> Go to
>
> http://catb.org/esr/faqs/hacker-howto.html#MS_hater
>
> and read Eric's excellent essay on hacking. If you're still interested,
> come on back and we'll help you get started.
And, as long as you're visiting Eric's site, check out
Hi Joaquin,
Remember to Reply-All for the whole list to receive the message.
Joaquin Sanchez Sanchez wrote:
> Im proving pickle in python.
> As I mentioned before, i do pickle.dump for two times,
> because I want to save two dictionaries.
>
> Then to save the dictionaries, with one pickle.load()
Jacob,
What, exactly, do you mean by 'hack'? The free dictionary wiktionary
http://en.wiktionary.org/wiki
gives the following definitions
hack
Verb
to hack (third-person singular simple present hacks, present participle
hacking, simple past hacked, past participle hacked)
1. To coug
Hi Joaquin,
Make sure you hit Reply-all in your mail program, so the whole list can
get the message. I'm forwarding for visibility anyway.
>Thank you for your response, but now i have more
>doubts:
>the file must exist before that, or it can be created
>at the same time I do th
Andre Engels wrote:
> Thanks for your help; it brought me quite a bit farther, but not as
> far as I wanted to come. The authentication is basic authentication,
> and I have been able to adapt the programs so that I now get my pages
> correctly.
>
> However, the program uses not only 'GET' operati
Thanks to all who responded. I ended up using a sender parameter as suggested by Andre and Alan, as this was very simple to do.
Ben
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Jacob Simonovich wrote:
> I want to learn how to hack but don't know where to start. I have been
> searching all over the internet to try to find things out but none of
> the websites have helped me. I would like to know the tools needed and
> just a step by step process on how to do it using
Noufal Ibrahim wrote:
> On Thu, March 2, 2006 3:55 pm, Ben Vinger wrote:
>
>>Hello
>>
>>I want myfunction in the pseudocode below return something different if it
>>was called from indexfunction.
>
>
> I'm new to this but maybe it would be good if you passed the appropriate
> "version" of "myfun
Thanks for your help; it brought me quite a bit farther, but not as
far as I wanted to come. The authentication is basic authentication,
and I have been able to adapt the programs so that I now get my pages
correctly.
However, the program uses not only 'GET' operations, but also 'PUT'
operations.
Hi Ben!
After looking at the modules I detected the traceback-Module in my installation:
>>> import traceback
>>> def two():
... one()
...
>>> two()
>>> def one():
... print traceback.extract_stack()
...
>>> def two():
... one()
...
>>> two()
[('', 1, '?', None), ('', 2, 'two', None),
On Thu, March 2, 2006 3:55 pm, Ben Vinger wrote:
> Hello
>
> I want myfunction in the pseudocode below return something different if it
> was called from indexfunction.
I'm new to this but maybe it would be good if you passed the appropriate
"version" of "myfunction" to indexfunction from where t
Ben,
> I want myfunction in the pseudocode below return something
> different if it was called from indexfunction.
There are several approaches to this.
> def indexfunction(): blah
>
> def myfunction():
>if : return x
>else: return + x +
The simplest approach simply includes a "
On 3/2/06, Ben Vinger <[EMAIL PROTECTED]> wrote:
>
> Hello
>
> I want myfunction in the pseudocode below return something different if it
> was called from indexfunction.
>
How about adding a parameter to myfunction itself:
def indexfunction():
blah
myfunction(fromindexfunction=True)
d
Hello
I want myfunction in the pseudocode below return something different if it was called from indexfunction.
def indexfunction(): blah
def myfunction(): x = 'whatever' if : return x else: return + x +
Thanks
Ben
___
Tuto
I want to learn how to hack but don't know where to
start. I have been searching all over the internet to try to find things
out but none of the websites have helped me. I would like to know the
tools needed and just a step by step process on how to do it using widows xp
home edition.
26 matches
Mail list logo