On Wed, Sep 16, 2009 at 6:43 PM, Laurii wrote:
> The exercise to modify a number guessing program from a fixed number "number
> = 78" to using the time module and use the seconds at the time the program
> is used to be the number. (i.e. if the clock on your computer says 7:35:25
> then it would t
On Wed, Sep 16, 2009 at 8:04 PM, Jeff Peery wrote:
>
> Hello,
> Does anyone know if there is there a way to look at a queue's contents? Or
> prevent duplicate messages from being put into a queue? The docs don't show
> anything useful. The reason is that I'm collecting and drawing data. one
> t
Hello,
Does anyone know if there is there a way to look at a queue's contents? Or
prevent duplicate messages from being put into a queue? The docs don't show
anything useful. The reason is that I'm collecting and drawing data. one thread
collects, and one thread draws. each time one sample is co
Hi Katt,
The following does the trick for me:
number = int(time.strftime("%S", time.localtime()))
There may be better ways to do it though.
-Mal
On Thu, Sep 17, 2009 at 8:43 AM, Laurii wrote:
> Hello all,
>
> I am currently reading through the Tutorial for Non-Programers by Josh
> Cogliati.
Hello all,
I am currently reading through the Tutorial for Non-Programers by Josh
Cogliati. I have had great success until now.
The exercise to modify a number guessing program from a fixed number "number
= 78" to using the time module and use the seconds at the time the program
is used to
2009/9/16 Carnell, James E :
>
> I am needing to access the text in hundreds of Microsoft .doc files on an
> Ubuntu OS. I looked at win32 , but only saw support for windows. I am going
> through all of these files to create a fairly simple text delimited file for
> a spreadsheet.
>
> A) Batch conve
Carnell, James E wrote:
I searched through archives and wasn't able to find the solution.
Using IDLE, python 3, Ubuntu (default installations).
Using command line:
> if 1 == 1:
print "equal"
> equal
Using IDLE:
>if 1 == 1:
print "equal"
I searched through archives and wasn't able to find the solution.
Using IDLE, python 3, Ubuntu (default installations).
Using command line:
> if 1 == 1:
print "equal"
> equal
Using IDLE:
>if 1 == 1:
print "equal"
>SyntaxError: in
On Wed, Sep 16, 2009 at 3:03 PM, Carnell, James E <
jecarn...@saintfrancis.com> wrote:
>
> I am needing to access the text in hundreds of Microsoft .doc files on an
> Ubuntu OS. I looked at win32 , but only saw support for windows. I am going
> through all of these files to create a fairly simple
I am needing to access the text in hundreds of Microsoft .doc files on
an Ubuntu OS. I looked at win32 , but only saw support for windows. I am
going through all of these files to create a fairly simple text
delimited file for a spreadsheet.
A) Batch convert to text files so I can access them
B)
> Ansuman Dash wrote:
> >Now I am trying to validate that the command is executed successfully.
> >I have written following script to validate the log file which is created
> >after running the command.
Notice what's happening here:
> >for line in f.readlines():
> >a=l
(Don't top-post; it makes reading the thread quite confusing)
Ansuman Dash wrote:
Hi,
Thank you very much for the quick response.
Code is working fine.
Now I am trying to validate that the command is executed successfully.
I have written following script to validate the log file which is cr
Hi,
Below is the content of __init__.py
import sys
from django.core.signals import got_request_exception
from . import log
logger = log._get_logger()
def got_request_exception_callback(sender, **kwargs):
"""Logging all unhandled exceptions."""
type, exception, traceback = sys.exc_info()
On Wed, Sep 16, 2009 at 11:45 AM, Igor Mavrović - ma...@irb
wrote:
> Sorry Kent, I should have put it in the original message...
> This is the way I call the sorted function:
>
> # resultSet looks like: [[("DN", {"":["", ...], ...})], ...]
>
> resultSetSortedByCn = sorted(resultSet, key=lambda
Sorry Kent, I should have put it in the original message...
This is the way I call the sorted function:
# resultSet looks like: [[("DN", {"":["", ...], ...})], ...]
resultSetSortedByCn = sorted(resultSet, key=lambda x:(x[0][1]["sn"],
x[0][1]["givenName"]))
resultSetSortedByOu = sorted(
2009/9/16 Igor Mavrović - ma...@irb :
> Hi,
>
> I know about the use of locale module:
>
import locale
locale.setlocale(locale.LC_ALL, "hr_HR.UTF8")
print sorted(words, key=locale.strxfrm)
>
> but I have specific and complicated data structure (list of lists containing
> strings, tup
On Wed, Sep 16, 2009 at 9:51 AM, Igor Mavrović - ma...@irb
wrote:
> Hi,
>
> I know about the use of locale module:
>
import locale
locale.setlocale(locale.LC_ALL, "hr_HR.UTF8")
print sorted(words, key=locale.strxfrm)
>
> but I have specific and complicated data structure (list of li
Please always reply-all so a copy goes to the Tutor list.
Olli Virta wrote:
Hi! Thanks for advice. I was thinking, if is there was other ways to
get the wanted data out, than with that strip() method. Say what if
I had to use it hundred times.
Are you concerned with ease of coding or with per
On Wed, Sep 16, 2009 at 10:33 AM, Jojo Mwebaze wrote:
> Hello There Again
>
> Might be a silly question but it has played me for the last two days!
>
> I have a string 'mystring' (pasted below), what i want to do is to change
> the values of of NAXIS1 (=1024) and NAXIS2 (=2048) to some other va
Hello There Again
Might be a silly question but it has played me for the last two days!
I have a string 'mystring' (pasted below), what i want to do is to change
the values of of NAXIS1 (=1024) and NAXIS2 (=2048) to some other values!
say NAXIS1 = 999 and NAXIS2 = 888.
These old values that i
Hi,
I know about the use of locale module:
import locale
locale.setlocale(locale.LC_ALL, "hr_HR.UTF8")
print sorted(words, key=locale.strxfrm)
but I have specific and complicated data structure (list of lists containing
strings, tuples and dictionaries) due to LDAP search result data.
So I u
On Wed, 2009-09-16 at 18:03 +0530, Ansuman Dash wrote:
> if "Request timed out.." not in a:
> print("Ping is not successful.")
> pLogger.info("Ping is not successful.")
This will check for the string "Request timed out.." is NOT in a. Now
when the ping i
Hi,
Thank you very much for the quick response.
Code is working fine.
Now I am trying to validate that the command is executed successfully.
I have written following script to validate the log file which is created
after running the command.
=
On Sun, Sep 13, 2009 at 9:59 AM, ad...@gg-lab.net wrote:
> Hi All,
>
> i've started earning python sone months ago (on Google App Engine
> unfortunately).
>
> I have some doubts reagrding "import", and have asked a similar
> question here months ago, but without finding a solution.
>
> So:
>
> wit
On Wed, Sep 16, 2009 at 6:07 AM, C or L Smith wrote:
>>> Serdar wrote:
> ...
>>> So again, is there a way to place a time limit on the execution of a
>>> function, after which you can break out of it and then retry it or
>>> move along with the rest of your program?
>
> At http://tinyurl.com/rbre9
ad...@gg-lab.net wrote:
The "google" directoy has an empty __init__.py file (well, if we want
to be completely correct it contains some commented -#- lines). Same
for "appengine", "net" and "pyglib". As they all have an __init__.py
file, they should be consiedered as modules from the python
inter
David Kim wrote:
Hello all,
I've finally gotten around to my 'learn how to parse html' project. For
those of you looking for examples (like me!), hopefully it will show you
one potentially thickheaded way to do it.
[...]
The code can be found at pastebin:
http://financialpython.pastebin.com
David wrote:
kreglet wrote:
This is my first Python project. I am doing this to help me learn the
language. I was wondering if someone could give
me some advice as I have a lot of questions.
1. I would like to have someone look over the code and tell me how
to improve it. I am sure that a
>> Serdar wrote:
...
>> So again, is there a way to place a time limit on the execution of a
>> function, after which you can break out of it and then retry it or
>> move along with the rest of your program?
At http://tinyurl.com/rbre9n you can find a recipe that tells you how to
decorate a funct
"Ansuman Dash" wrote
In Python scripting, how can I execute a command (which can be run from
spcific directory) and then retrieve the result (after executing the
command
it give the command is executed successfull or not), so that I can
validate
it.
There are sweveral ways to do this but
"David Kim" wrote
> The code can be found at pastebin:
> http://financialpython.pastebin.com/f4efd8930
Nothing to do with the parsing but I noticed:
def get_files(path):
''' Get a list of all files in a given directory.
Returns a list of filename strings. '''
files = os
Ansuman Dash schrieb:
Hello Everybody,
In Python scripting, how can I execute a command (which can be run from
spcific directory) and then retrieve the result (after executing the
command it give the command is executed successfull or not), so that I
can validate it.
Thanks,
AD
import
32 matches
Mail list logo