G'day everyone.
I'm experimenting with a custom console application, and trying to add
command history functionality to it. It seems to basically work ok
except for the fact that when I press the Up arrow key to run previous
commands, the right commands are not displayed. It displays a wierd
On Wed, Sep 17, 2008 at 6:20 PM, James <[EMAIL PROTECTED]> wrote:
> Kent,
>
> Thanks for the response. As a personal opinion, do you find it more
> appropriate to use something like curses (since it's already built
> into the standard Python library), or to use something "third party"
> like urwid?
Hi,
I want to search through a directory and re-arrange all the files into e.g
All .doc files go into MS WORD folder, all .pdf files goes into PDF Folder.
I`m thinking of doing something with the os.walk(path) method from os
module, I need some ideal how the algorithm should look like, maybe
rec
On Wed, Sep 17, 2008 at 5:08 PM, Kamisetty, Rajendra
<[EMAIL PROTECTED]> wrote:
> Hi,
> I am new to Python and need your help to generate an output file as
> explained below.
>
> I need to generate an output text file based on the input text file data .
>
> Input.txt contents:
> ('146 - Message',
"Wayne Watson" <[EMAIL PROTECTED]> wrote
I was surprised to find the result below.
Well done, you just found one of the standard beginners gotchas!
a =[4,2,5,8]
b = a
This makes b refer to the *same list* as a.
a.sort()
This sorts the list contents in-place
a
[2, 4, 5, 8]
As sh
"Kamisetty, Rajendra" <[EMAIL PROTECTED]> wrote
I am new to Python and need your help
It will help if you start a new thread by posting a new message rather
than replying to an existing one and changing the subject. Those of
us with threaded readers don;t see your post because it is hidden
ins
"James" <[EMAIL PROTECTED]> wrote
Thanks for the response. As a personal opinion, do you find it more
appropriate to use something like curses (since it's already built
into the standard Python library), or to use something "third party"
like urwid?
urwid is just a wrapper around curses.
curse
On Wed, Sep 17, 2008 at 5:20 PM, James <[EMAIL PROTECTED]> wrote:
> Kent,
>
> Thanks for the response. As a personal opinion, do you find it more
> appropriate to use something like curses (since it's already built
> into the standard Python library), or to use something "third party"
> like urwid
Kent,
Thanks for the response. As a personal opinion, do you find it more
appropriate to use something like curses (since it's already built
into the standard Python library), or to use something "third party"
like urwid?
This program will be distributed to lots of individuals that will
likely no
On Wed, Sep 17, 2008 at 5:02 PM, James <[EMAIL PROTECTED]> wrote:
> Kent / Alan,
>
> Thanks for the responses. I'm not completely certain that urwid is
> appropriate for the program I'm writing, as it seems to be more of a
> framework for developing a text GUI application. (similar to curses?)
It
Hi,
I am new to Python and need your help to generate an output file as
explained below.
I need to generate an output text file based on the input text file data
.
Input.txt contents:
('844 - Open File Message', '011 - System Trace Audit Number: 823301',
'012 - Local Time: 033543', '013 - Loc
Kent / Alan,
Thanks for the responses. I'm not completely certain that urwid is
appropriate for the program I'm writing, as it seems to be more of a
framework for developing a text GUI application. (similar to curses?)
The behavior of the program I'm writing is actually identical to that
of an op
Solution 1:
>>> a=[2,3,1,4]
>>> b=a[:]
>>> a
[2, 3, 1, 4]
>>> b
[2, 3, 1, 4]
>>> a.sort()
>>> a
[1, 2, 3, 4]
>>> b
[2, 3, 1, 4]
>>>
Solution 2:
>>> from copy import deepcopy
>>> a=[2,1,3,4]
>>> b=deepcopy(a)
>>> a
[2, 1, 3, 4]
>>> b
[2, 1, 3, 4]
>>> a.sort()
>>> a
[1, 2, 3, 4]
>>> b
[2, 1, 3, 4]
On Wed, Sep 17, 2008 at 3:30 PM, Wayne Watson
<[EMAIL PROTECTED]>wrote:
> I'm using Python 2.4 in Win XP. I was surprised to find the result below.
>
> >>> a =[4,2,5,8]
> >>> b = a
> >>> a.sort()
> >>> a
> [2, 4, 5, 8]
> >>> b
> [2, 4, 5, 8]
>
> b no longer has the same value as it began. Apparen
On Wed, Sep 17, 2008 at 3:30 PM, Wayne Watson
<[EMAIL PROTECTED]> wrote:
> I'm using Python 2.4 in Win XP. I was surprised to find the result below.
>
a =[4,2,5,8]
b = a
This binds the name "b" to the same object that "a" is bound to.
a.sort()
a
> [2, 4, 5, 8]
b
> [2, 4,
On Wed, Sep 17, 2008 at 3:30 PM, Wayne Watson
<[EMAIL PROTECTED]> wrote:
> I'm using Python 2.4 in Win XP. I was surprised to find the result below.
>
a =[4,2,5,8]
b = a
a.sort()
a
> [2, 4, 5, 8]
b
> [2, 4, 5, 8]
>
> b no longer has the same value as it began. Apparently to
If you use sort(a), it will be ok.
>>>a =[4,2,5,8]
>>>b=a
>>> sort(a)
: array([2, 4, 5, 8])
>>> b
[4, 2, 5, 8]
>>> a
[4, 2, 5, 8]
On Wed, Sep 17, 2008 at 12:30 PM, Wayne Watson <[EMAIL PROTECTED]
> wrote:
> I'm using Python 2.4 in Win XP. I was surprised to find the result below.
>
> >>> a
Title: Signature.html
I'm using Python 2.4 in Win XP. I was surprised to find the result
below.
>>> a =[4,2,5,8]
>>> b = a
>>> a.sort()
>>> a
[2, 4, 5, 8]
>>> b
[2, 4, 5, 8]
b no longer has the same value as it began. Apparently to prevent sort
from making it the same I have to resort to copy
Here's a trivial example using backquotes. The tricky part is getting bash to
use them in conditionals, variable assignments, and such.
0 % cat > /tmp/fie.py
print "Fie!"
[ctrl-d]
0 % cat > /tmp/echo.sh
echo `python /tmp/fie.py`
[ctrl-d]
0 % sh /tmp/echo.sh
Fie!
0 %
Cheers
On Wednesday 17 Sep
If you want the return code, there are at least two ways to do it. My zsh
shell is configured to print the last return code in the prompt:
0 % python
Python 2.4.4 (#2, Apr 15 2008, 23:43:20)
[GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2
Type "help", "copyright", "credits" or "lice
"Patrick" <[EMAIL PROTECTED]> wrote
I was just wondering if there was a way to return the results of a
python script to the bash shell?
Here is a silly pseudo code example:
bash command | some-python-script.py | some.other-script.sh
That's called pipelining and uses standard input/outpu
On Wed, Sep 17, 2008 at 11:37:39AM -0600, Spencer Parker wrote:
> Yes...you do have it all correct. Luckily this is all behind a private
> network that is firewalled. There is no way to get to this network unless
> you are physically on site. Since there isn't even VPN access to this
> network c
Yes...you do have it all correct. Luckily this is all behind a private
network that is firewalled. There is no way to get to this network unless
you are physically on site. Since there isn't even VPN access to this
network currently. This was done for the security problems associated with
rando
On Wed, Sep 17, 2008 at 10:52:33AM -0600, Spencer Parker wrote:
> We have a web interface where people can provision virtual machines.
> Currently we do this with Linux machines and it sets a unique IP, username,
> startup services, and a password. This is all triggered at startup of the
> linux m
What I am doing is this:
We have a web interface where people can provision virtual machines.
Currently we do this with Linux machines and it sets a unique IP, username,
startup services, and a password. This is all triggered at startup of the
linux machines with perl and an xml file. We are try
On Wed, Sep 17, 2008 at 10:31:50AM -0600, Spencer Parker wrote:
> Is there a way to remotely trigger an event from Linus to a windows machine?
> I have basically a virtual machine that this script would run from. I need
> to find a way to trigger this event from a linux machine that handles all of
On Wed, Sep 17, 2008 at 12:30:58PM -0400, Patrick wrote:
> I was just wondering if there was a way to return the results of a
> python script to the bash shell? I was thinking about using the output
> as an argumen for another shell command. I know that we can use the
> shell from within Python via
I meant to hit reply to all...stupid Gmail(not really...all on me...LOL)
Is there a way to remotely trigger an event from Linus to a windows machine?
I have basically a virtual machine that this script would run from. I need
to find a way to trigger this event from a linux machine that handles al
I was just wondering if there was a way to return the results of a
python script to the bash shell? I was thinking about using the output
as an argumen for another shell command. I know that we can use the
shell from within Python via the OS module but I believe this is usually
used to feed input i
Spencer Parker wrote:
I just need to create a local user.
[copying back to the list in case it helps others]
See if this sets you on the way:
http://timgolden.me.uk/python/win32_how_do_i/create-a-local-group-with-a-new-user.html
TJG
___
Tutor maill
Spencer Parker wrote:
Is there a way to create new users in WMI? I was trying to research
this on MSDN, but couldn't find it anywhere...
Not possible as far as I know. Do you need a
domain user or a local user?
TJG
___
Tutor maillist - Tutor@pyth
Is there a way to create new users in WMI? I was trying to research this on
MSDN, but couldn't find it anywhere...
On Tue, Sep 16, 2008 at 2:10 PM, Tim Golden <[EMAIL PROTECTED]> wrote:
> Spencer Parker wrote:
>
>> It does of course help to spell IPAddress correctly to get this to work in
>> the
Hi,
I am new to Python and need your help to generate an output file as
explained below.
I need to generate an output text file based on the input text file data
which has fixed length format of 142 bytes each line.
Input.txt contents:
('844 - Open File Message', '011 - System Trace Audit Number:
33 matches
Mail list logo