On 01/06/2012 03:04 AM, Andres Soto wrote:
Please, see my comments between your lines. Thank you very much for
your explanation!
*
*
*From:* Lie Ryan
*To:* python-list@python.org
*Sent:* Thursday, January 5, 2012 2:30 AM
*Subject:* Re: a little help
On 01/05
Please, see my comments between your lines. Thank you very much for your
explanation!
>
>
>From: Lie Ryan
>To: python-list@python.org
>Sent: Thursday, January 5, 2012 2:30 AM
>Subject: Re: a little help
>
>On 01/05/2012 11:29 AM, Andres Soto wrote:
>> my mistake i
could you be a little bit more explicit. I am a begginer and I don't understand
you quite well
Thanks
Andres Soto
>
> From: 8 Dihedral
>To: python-list@python.org
>Cc: python-list@python.org
>Sent: Thursday, January 5, 2012 2:48 AM
&g
Chris Angelico於 2012年1月5日星期四UTC+8上午7時29分21秒寫道:
> On Thu, Jan 5, 2012 at 10:25 AM, Andres Soto wrote:
> > My situation is the following: I am developing some code. I use the IDLE
> > Editor to write it down. Then, I save it and import it from the command line
> > interface, so it is already availab
On 01/05/2012 11:29 AM, Andres Soto wrote:
my mistake is because I have no problem to do that using Prolog which
use an interpreter as Python. I thought that the variables in the main
global memory space (associated with the command line environment) were
kept, although the code that use it could
On 1/4/2012 7:29 PM, Andres Soto wrote:
As you explain me, Python behave like a compiled language: any time I
make a change in the code, I have to "compile" it again, and re-run (and
re-load the data).
While you are developing a program and expect to make changes, you can
try working with a s
>To: python-list@python.org
>Sent: Wednesday, January 4, 2012 6:02 PM
>Subject: Re: a little help
>
>I think you meant to send that to the list; hope you don't mind my
>replying on-list.
>
>On Thu, Jan 5, 2012 at 10:56 AM, Andres Soto wrote:
>> the problem is tha
On Thu, Jan 5, 2012 at 11:29 AM, Andres Soto wrote:
> my mistake is because I have no problem to do that using Prolog which use an
> interpreter as Python. I thought that the variables in the main global
> memory space (associated with the command line environment) were kept,
> although the code t
I think you meant to send that to the list; hope you don't mind my
replying on-list.
On Thu, Jan 5, 2012 at 10:56 AM, Andres Soto wrote:
> the problem is that if I re-run the program, every time I change some
> instructions, I have to read (load) again the data and that is what I want
> to avoid.
On Thu, Jan 5, 2012 at 10:25 AM, Andres Soto wrote:
> My situation is the following: I am developing some code. I use the IDLE
> Editor to write it down. Then, I save it and import it from the command line
> interface, so it is already available from the prompt.
> Then I load (read) some data from
Hi,
I am new using Python, although I have experience using other
programming languages like Pascal, FORTRAN, C, Prolog, etc. I am using IDLE
Editor for Python in coordination with the command line interface.
My situation is the
following: I am developing some code. I use the IDLE Editor to write
> Piet van Oostrum (PvO) wrote:
[snip]
>PvO> You can also consider using paramiko instead of pexpect.
[snip]
> chan = t.open_session()
> chan.exec_command('cat')
> chan.send('abcdefghijklmn\n')
In a real program it is better to use sendall here, as send may decide
to send only pa
> Hussein B (HB) wrote:
>HB> Hey,
>HB> I'm trying to execute a command over a remore server using pexpect
>HB> +
>HB> url = 'ssh internalserver'
>HB> res = pexpect.spawn(url)
>HB> print '1'
>HB> res.expect('.*ssword:')
>HB> print '2'
>HB> res.sendline('mypasswd')
>HB> print '3
Hey,
I'm trying to execute a command over a remore server using pexpect
+
url = 'ssh internalserver'
res = pexpect.spawn(url)
print '1'
res.expect('.*ssword:')
print '2'
res.sendline('mypasswd')
print '3'
res.sendline('ls -aslh')
+
What I want to do is to send a coup
Thanks all for your help. I appreciate it. The problem was in the
function. A simple bug which I should have caught but I had my mental
blinders on and was sure the problem was outside the function. The
answers have given me a lot to learn so thanks for that as well.
--
http://mail.python.org/m
> Nile (N) wrote:
>N> I initialized the dictionary earlier in the program like this -
>N> hashtable = {}
>N> I changed the "dict" to hashtable but I still get the same result
>N> I will try to learn about the defaultdict but I'm just trying to keep
>N> it as simple as I can for now
>N> R
En Mon, 06 Jul 2009 19:49:41 -0300, MRAB
escribió:
Chris Rebert wrote:
from collections import defaultdict
counts = defaultdict(lambda: 0)
Better is:
counts = defaultdict(int)
For speed? This is even faster:
zerogen = itertools.repeat(0).next
counts = defaultdict(zerogen)
--
Gabriel Ge
MRAB wrote:
Nile wrote:
[snip]
I initialized the dictionary earlier in the program like this -
hashtable = {}
I changed the "dict" to hashtable but I still get the same result
I will try to learn about the defaultdict but I'm just trying to keep
it as simple as I can for now
Revised code
f
On Tue, 07 Jul 2009 00:29:36 +0100, Nile wrote:
Revised code
for x in range(len(file_list)):
d = open(file_list[x] , "r")
data = d.readlines()
k = 0
k = above_or_below(data)
print "here is the value that was returned ",k
hashtable[k] = hashtable.
Nile wrote:
[snip]
I initialized the dictionary earlier in the program like this -
hashtable = {}
I changed the "dict" to hashtable but I still get the same result
I will try to learn about the defaultdict but I'm just trying to keep
it as simple as I can for now
Revised code
for x in range
On Jul 6, 5:22 pm, Chris Rebert wrote:
> On Mon, Jul 6, 2009 at 3:02 PM, Nile wrote:
> > I am trying to write a simple little program to do some elementary
> > stock market analysis. I read lines, send each line to a function and
> > then the function returns a date which serves as a key to a
> >
On Jul 6, 5:30 pm, "Pablo Torres N." wrote:
> On Mon, Jul 6, 2009 at 17:02, Nile wrote:
> > Code
>
> > for x in range(len(file_list)):
> > d = open(file_list[x] , "r")
> > data = d.readlines()
> > k = above_or_below(data) # This
> > function seems to work
Chris Rebert wrote:
On Mon, Jul 6, 2009 at 3:02 PM, Nile wrote:
I am trying to write a simple little program to do some elementary
stock market analysis. I read lines, send each line to a function and
then the function returns a date which serves as a key to a
dictionary. Each time a date is re
On Mon, Jul 6, 2009 at 17:02, Nile wrote:
> Code
>
> for x in range(len(file_list)):
> d = open(file_list[x] , "r")
> data = d.readlines()
> k = above_or_below(data) # This
> function seems to work correctly
> print "here is the value that was returned
On Mon, Jul 6, 2009 at 3:02 PM, Nile wrote:
> I am trying to write a simple little program to do some elementary
> stock market analysis. I read lines, send each line to a function and
> then the function returns a date which serves as a key to a
> dictionary. Each time a date is returned I want t
I am trying to write a simple little program to do some elementary
stock market analysis. I read lines, send each line to a function and
then the function returns a date which serves as a key to a
dictionary. Each time a date is returned I want to increment the value
associated with that date. The
I gues, it was rather simple...
Begin with simple tasks, figure out how to do them. If you are
proceding well, then increase difficulty/complexity.
Gabor
--
Linux: Choice of a GNU Generation
--
http://mail.python.org/mailman/listinfo/python-list
Thank you to all who responded. You were right about the solution. That
helped alot. Now maybe i can ask if anyone has any ideas for learning, such
as websites or videos. I found one that i liked alot.
http://iamar.net/subpages/PythonVid.html
But i wondered how other people learned as beginners i
On Wed, May 13, 2009 at 12:22 PM, warhammer1...@gmail.com
wrote:
> On May 12, 9:27 pm, Chris Rebert wrote:
>> On Tue, May 12, 2009 at 9:18 PM, warhammer1...@gmail.com
>>
>>
>>
>> wrote:
>> > I loaded python 3.1
>> > I can use the gui and i see the following:
>>
>> > Python 3.0.1 (r301:69561, Feb
On May 13, 12:18 pm, "warhammer1...@gmail.com"
wrote:
> I loaded python 3.1
> I can use the gui and i see the following:
>
> Python 3.0.1 (r301:69561, Feb 13 2009, 20:04:18) [MSC v.1500 32 bit
> (Intel)] on win32
> Type "copyright", "credits" or "license()" for more information.
>
>
>
> It would s
On May 12, 11:18�pm, "warhammer1...@gmail.com"
wrote:
> I loaded python 3.1
> I can use the gui and i see the following:
>
> Python 3.0.1 (r301:69561, Feb 13 2009, 20:04:18) [MSC v.1500 32 bit
> (Intel)] on win32
> Type "copyright", "credits" or "license()" for more information.
>
>
>
> It would s
On Tue, May 12, 2009 at 9:18 PM, warhammer1...@gmail.com
wrote:
> I loaded python 3.1
> I can use the gui and i see the following:
>
> Python 3.0.1 (r301:69561, Feb 13 2009, 20:04:18) [MSC v.1500 32 bit
> (Intel)] on win32
> Type "copyright", "credits" or "license()" for more information.
>
>
On Wed, May 13, 2009 at 12:18 AM, warhammer1...@gmail.com <
warhammer1...@gmail.com> wrote:
> Python 3.0.1 (r301:69561, Feb 13 2009, 20:04:18) [MSC v.1500 32 bit
> (Intel)] on win32
> Type "copyright", "credits" or "license()" for more information.
> >>> print "hello world!"
> SyntaxError: invalid
I loaded python 3.1
I can use the gui and i see the following:
Python 3.0.1 (r301:69561, Feb 13 2009, 20:04:18) [MSC v.1500 32 bit
(Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
>>>
It would seem that this is working correctly and there is no path
problem.
I am
Is there a pdf file or downloadable file of the Tkinter material? I like to
put stuff in notebooks.
W. Watson wrote:
> Thanks for your responses. I've located the URL from the post above and
> will check out the two books mentioned here. I used to do a lot of
> scientific programming, but now j
Thanks for your responses. I've located the URL from the post above and will
check out the two books mentioned here. I used to do a lot of scientific
programming, but now just concentrate on science.
Martin Blume wrote:
> "W. Watson" schrieb
>> I have about a 1600 line Pythron program I'd like t
"W. Watson" schrieb
> I have about a 1600 line Pythron program I'd like to
> make some simple mods to, but have really just a nodding
> acquaintance with Python and Tkinter.
> [...]
> Let's change that.
>
The book "Learning Python" from O'Reilly is excellent.
If you are into scientific progr
On 6 Jun, 00:58, "W. Watson" <[EMAIL PROTECTED]> wrote:
> is there a Tkinter intro manual somewhere
Take a look at http://www.pythonware.com/library/tkinter/introduction
Glenn
--
http://mail.python.org/mailman/listinfo/python-list
I have about a 1600 line Pythron program I'd like to make some simple mods
to, but have really just a nodding acquaintance with Python and Tkinter. I
know quite a few languages, including C++. Let's change that. I've not used
anything but C in recent years, and C++ was in my bag before that alon
thanks
--
http://mail.python.org/mailman/listinfo/python-list
iminal wrote:
> what i have so far is :
>
> # Get values needed to make time calculations
> CT = input("input your chronometer time (ex. 07:21:46): ")
> CE = input("input your chronometer correction (ex. 00:01:32): ")
> CEfastslow = raw_input("is your chronometer correction fast or
what i have so far is :
# Get values needed to make time calculations
CT = input("input your chronometer time (ex. 07:21:46): ")
CE = input("input your chronometer correction (ex. 00:01:32): ")
CEfastslow = raw_input("is your chronometer correction fast or
slow: ")
#decide eit
iminal wrote:
> I am trying to make a very simple program and am very new to the whole
> programming thing. my program is supposed to ask a user for any time in
> the for format XX:XX:XX and then ask for a time corrrection to add or
> subtract to this. my only problem is that once the user inputs t
iminal wrote:
> I am trying to make a very simple program and am very new to the whole
> programming thing. my program is supposed to ask a user for any time in
> the for format XX:XX:XX and then ask for a time corrrection to add or
> subtract to this. my only problem is that once the user inputs t
I am trying to make a very simple program and am very new to the whole
programming thing. my program is supposed to ask a user for any time in
the for format XX:XX:XX and then ask for a time corrrection to add or
subtract to this. my only problem is that once the user inputs the time
and the correc
i am doing disgusting looking junk based on calendar. example
now = calendar.timegm(time.gmtime())
aWeek = 7*24*60*60
print time.strftime('%Y-%m-%d %H:%M:%S', time.gmtime(now + aWeek))
randy
--
http://mail.python.org/mailman/listinfo/python-list
the mxDateTime thing should be great, i have to pass this stuff back
and forth with MySQL DateTime fields,
thanks a lot !
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] writes:
>Hey there.
>i have a time string (created with strftime) then read from a file,
>i am having some trouble understanding how to get the difference
>between times.
>i know i can structime(timestring) and get a time value, but i dont
>know how to manipulate it.
>basically,
[EMAIL PROTECTED] wrote:
> Hey there.
> i have a time string (created with strftime) then read from a file,
> i am having some trouble understanding how to get the difference
> between times.
> i know i can structime(timestring) and get a time value, but i dont
> know how to manipulate it.
>
> bas
Hey there.
i have a time string (created with strftime) then read from a file,
i am having some trouble understanding how to get the difference
between times.
i know i can structime(timestring) and get a time value, but i dont
know how to manipulate it.
basically, if i have string 2005-08-24 09:25
Hi,
What I want to do is create a module that offers a generic set of
functions (send, recieve, etc...) and reffers the request to the
correct module (rs-232, tcp/ip, etc..).
I want all this to be unseen by the script that calls this module.
I want the script to specify the communication type, and
51 matches
Mail list logo