On Wed, 26 Mar 2014 20:23:29 -0700, James Smith wrote:
> I can't get this to work.
> It runs but there is no output when I try it on a file.
Simplify, simplify, simplify. Either you will find the problem, or you
will find the simplest example that demonstrates the problem.
In this case, the pro
On Thursday, March 27, 2014 4:15:19 AM UTC+5:30, Marko Rauhamaa wrote:
> Chris Angelico :
> > You prove here that Python has first-class expressions in the same way
> > that 80x86 assembly language has garbage collection. Sure, you can
> > implement it using the primitives you have, but that's not
On Thu, Mar 27, 2014 at 3:14 PM, James Smith wrote:
> I tried the re.M in the compile and that didn't help.
Okay. Try printing out the repr of the line at the point where you
have the commented-out write to stdout. That might tell you if there's
some other difference. At that point, you'll know i
On Thursday, March 27, 2014 8:53:29 AM UTC+5:30, James Smith wrote:
> I can't get this to work.
> It runs but there is no output when I try it on a file.
> #!/usr/bin/python
> import os
> import sys
> import re
> from datetime import datetime
> #logDir = '/nfs/projects/equinox/platformTools/RTLG
On Wednesday, March 26, 2014 11:23:29 PM UTC-4, James Smith wrote:
> I can't get this to work.
>
> It runs but there is no output when I try it on a file.
>
>
>
>
>
> #!/usr/bin/python
>
>
>
> import os
>
> import sys
>
> import re
>
> from datetime import datetime
>
>
>
> #logDir =
On Thu, 27 Mar 2014 00:16:57 +, Steven D'Aprano wrote:
> py> divmod(-30, 24)
> (-2, 18)
>
> If an event happened 30 hours ago, it is correct to say that it
> occurred "18 hours after 2 days ago", but who talks that way?
Well, not *exactly*, but:
If today happens to be Wednesday, and an even
On Thu, Mar 27, 2014 at 2:23 PM, James Smith wrote:
> re.M
> p = re.compile('^\s*\"SHELF-.*,SC,.*,:\\\"Log Collection In Progress\\\"')
If you're expecting this to be parsed as a multiline regex, it won't
be. Probing re.M doesn't do anything on its own; you have to pass it
as an argument to compi
I can't get this to work.
It runs but there is no output when I try it on a file.
#!/usr/bin/python
import os
import sys
import re
from datetime import datetime
#logDir = '/nfs/projects/equinox/platformTools/RTLG/RTLG_logs';
#os.chdir( logDir );
programName = sys.argv[0]
fileName = sys.argv[1]
On Wed, 26 Mar 2014 20:44:17 -0400, Terry Reedy wrote:
> I agree that we have not been understanding each other.
>
> From you original post that I responded to:
>> The thing is, we can't just create a ∑ function, because it doesn't
>> work the way the summation operator works. The proble
On Thursday, March 27, 2014 5:13:21 AM UTC+5:30, Steven D'Aprano wrote:
> On Thu, 27 Mar 2014 09:24:49 +1100, Chris Angelico wrote:
> > wrote:
> >> Now actual python
> >> def sumjensen(i_get, i_set,lower,upper,exp):
> >> tot = 0
> >> i_set(lower)
> >> while i_get() <= upper:
> >>
In article ,
Chris Angelico wrote:
> On Thu, Mar 27, 2014 at 11:16 AM, Steven D'Aprano
> wrote:
> > If an event happened 30 hours ago, it is correct to say that it occurred
> > "18 hours after 2 days ago", but who talks that way?
>
> That response demonstrates real genius. Rue the datetime? Wh
On Thu, Mar 27, 2014 at 11:16 AM, Steven D'Aprano
wrote:
> If an event happened 30 hours ago, it is correct to say that it occurred
> "18 hours after 2 days ago", but who talks that way?
That response demonstrates real genius. Rue the datetime? Who talks like that?
ChrisA
--
https://mail.python
On Thu, Mar 27, 2014 at 12:16 PM, Rhodri James wrote:
> It's not quite that simple, sadly (for me). I have mild dyscalculia, which
> in my case is another way of saying that collections of digits *aren't*
> tokens to me unless I ascribe a specific meaning to them. I don't work with
> day-level t
On Tue, 25 Mar 2014 06:12:50 -, Chris Angelico
wrote:
Because the shorter symbols lend themselves better to the
"super-tokenization" where you don't read the individual parts but the
whole. The difference between "40" and "forty" is minimal, but the
difference between "86400" and "eighty-
在 2014年3月26日星期三UTC+8下午3时10分23秒,dieter写道:
> Wesley writes:
>
> > ...
>
> > Actually, I can now see the varialbe names at Python level and C level.
>
> > I just want to verify x command to monitor the memory content.
>
> > So, in my origin post, I can get variable i's address, and see the value
On Tue, 25 Mar 2014 18:17:30 -, wrote:
Thanks for your comment but i also edited httpd.conf file then my wamp
not running
LoadModule php5_module "c:/wamp/bin/php/php5.3.0/php5apache2_2.dll"
This line i added on line 128 but nothing. Wampserver showing yellow.
I'm not getting what happe
I agree that we have not been understanding each other.
From you original post that I responded to:
The thing is, we can't just create a ∑ function, because it doesn't
work the way the summation operator works. The problem is that we
would want syntactic support, so we could write something like
On Wed, 26 Mar 2014 19:25:45 -0400, Dennis Lee Bieber wrote:
> On Tue, 25 Mar 2014 20:58:27 -0400, Roy Smith declaimed
> the following:
>
>>One of my roles on this newsgroup is to periodically whine about
>>stupidities in the Python datetime module. This is one of those times.
>>
>>I have some
On 03/26/2014 04:25 PM, Dennis Lee Bieber wrote:
On Tue, 25 Mar 2014 20:58:27 -0400, Roy Smith declaimed the
following:
One of my roles on this newsgroup is to periodically whine about
stupidities in the Python datetime module. This is one of those times.
I have some code which computes how
On Thu, 27 Mar 2014 09:24:49 +1100, Chris Angelico wrote:
> On Thu, Mar 27, 2014 at 4:32 AM, Rustom Mody
> wrote:
>> Now actual python
>>
>> def sumjensen(i_get, i_set,lower,upper,exp):
>> tot = 0
>> i_set(lower)
>> while i_get() <= upper:
>> tot += exp_get()
>> i_set(
On Wed, 26 Mar 2014 15:19:03 -0600, Ian Kelly wrote:
> You want to access object "attributes", not "variables".
In fairness to the OP, the terminology "instance variables" meaning
attributes or members of an instance is (sadly, in my opinion) common in
some other languages, such as Java, and oc
Chris Angelico :
> You prove here that Python has first-class expressions in the same way
> that 80x86 assembly language has garbage collection. Sure, you can
> implement it using the primitives you have, but that's not support.
I was more reminded of STL and Boost. For example:
std::for_each
On Thu, Mar 27, 2014 at 4:32 AM, Rustom Mody wrote:
> Now actual python
>
> def sumjensen(i_get, i_set,lower,upper,exp):
> tot = 0
> i_set(lower)
> while i_get() <= upper:
> tot += exp_get()
> i_set(i_get() + 1)
> return tot
>
>
> i=0
> a=[3,4,5]
> i_get = lambda :
Chris Angelico wrote:
By showing those last ones as 1̅.091... and 2̅.091..., you emphasize
the floating-point nature of the data: everything after the decimal is
the mantissa, and everything before the decimal is the exponent.
The reason for writing them that way is so that you
can look the las
Victor Engle writes:
> It would be convenient if datetime.date.today() accepted an argument
> as an offset from today, like datetime.date.today(-1). Is there an
> easy way to do this with datetime?
The types defined in ‘datetime’ can perform calendar arithmetic::
import datetime
today
Victor Engle wrote:
> I want to keep a collection of data organized by collection date and I'll
> use datetime like this...
>
datetime.date.today()
>
> datetime.date(2014, 3, 26)
>
>
> I'll format the date and create directories like /mydata/-mm-dd
>
>
> When I create a directory fo
On 26Mar2014 05:49, Martin Landa wrote:
> Dne středa, 26. března 2014 13:29:47 UTC+1 Martin Landa napsal(a):
> > not really, I am just searching for a better solution based on virtualenv
> > or something similar...
>
> particularly I am using something like
>
> if sys.platform == "win32
I want to keep a collection of data organized by collection date and I'll
use datetime like this...
>>> datetime.date.today()
datetime.date(2014, 3, 26)
I'll format the date and create directories like /mydata/-mm-dd
When I create a directory for today, I need to know the directory name f
- Original Message -
> One of my roles on this newsgroup is to periodically whine about
> stupidities in the Python datetime module. This is one of those
> times.
>
> I have some code which computes how long ago the sun set. Being a
> nice
> pythonista, I'm using a timedelta to represent
On Mar 26, 2014 5:48 AM, "Ben Collier" wrote:
>
> Sorry, subject was wrong. Please see below:
>
> On Wednesday, 26 March 2014 11:43:49 UTC, Ben Collier wrote:
> > Hi all,
> > I know that I can dynamically reference a variable with locals()["i"],
for instance, but I'd like to know how to do this w
Grant Edwards writes:
> We're still just papering-over the basic problem: the entire
> time/calendar system use by "western civilization" is a mess. I don't
> know a lot about other systems in use, but from what I have seen they
> were all pretty much just as bad. We should fix the basic problem
On 2014-03-26, Skip Montanaro wrote:
> On Wed, Mar 26, 2014 at 10:58 AM, Marko Rauhamaa wrote:
>> Fractions of seconds are supported -- the other fields can't be
>> fractional.
>
> Actually, it appears that whatever the last value you give can be
> fractionated. From the Wikipedia page you refer
On Wednesday, March 26, 2014 11:02:04 PM UTC+5:30, Rustom Mody wrote:
> On Wednesday, March 26, 2014 9:35:53 PM UTC+5:30, Steven D'Aprano wrote:
> > On Wed, 26 Mar 2014 00:30:21 -0400, Terry Reedy wrote:
> > > One passes an unquoted expression in code by quoting it with either
> > > lambda, paired
On Wednesday, March 26, 2014 9:35:53 PM UTC+5:30, Steven D'Aprano wrote:
> On Wed, 26 Mar 2014 00:30:21 -0400, Terry Reedy wrote:
> > On 3/25/2014 8:12 PM, Steven D'Aprano wrote:
> >> On Tue, 25 Mar 2014 19:55:39 -0400, Terry Reedy wrote:
> >>> On 3/25/2014 11:18 AM, Steven D'Aprano wrote:
>
Skip Montanaro :
> There is a good reason that the internal units of timedelta objects
> are days, seconds, and microseconds. They are well-defined outside of
> a calendar context.
>
> So, I guess Roy is back to square one. He can always roll his own
> timedelta subclass and give it a __str__ impl
On Wed, Mar 26, 2014 at 2:52 AM, Antoon Pardon
wrote:
> On 26-03-14 03:56, MRAB wrote:
>> Or as a root operator, e.g. 3 √ x (the cube root of x).
>>
> Personally I would think such an operator is too limited to include in a
> programming language.
> This kind of notation is only used with a const
On Wed, Mar 26, 2014 at 10:58 AM, Marko Rauhamaa wrote:
> Fractions of seconds are supported -- the other fields can't be
> fractional.
Actually, it appears that whatever the last value you give can be
fractionated. From the Wikipedia page you referenced:
"The smallest value used may also have
On Wed, 26 Mar 2014 00:30:21 -0400, Terry Reedy wrote:
> On 3/25/2014 8:12 PM, Steven D'Aprano wrote:
>> On Tue, 25 Mar 2014 19:55:39 -0400, Terry Reedy wrote:
>>
>>> On 3/25/2014 11:18 AM, Steven D'Aprano wrote:
>>>
The thing is, we can't just create a ∑ function, because it doesn't
wor
Skip Montanaro :
> Note though, that the ISO8601 representation isn't without its own
> flaws (which might explain why Tim avoided it BITD):
>
> * It doesn't appear to provide a way to represent fractions of a
> second (though perhaps all the fields can be fractional)
> * How many days are in a mo
On Mar 26, 2014, at 11:39 AM, Skip Montanaro wrote:
> The point of my post was that there is no obvious one best way to
> present negative timedeltas in a human readable form.
I agree that there are a number of possible representations which might make
sense. But, using negative days and positi
On Wed, Mar 26, 2014 at 10:04 AM, Roy Smith wrote:
> No, what you said was "negative four days, positive 3605 seconds".
My apologies for not showing all my work, professor. I use datetime
and timedelta objects all the time. I did the arithmetic to go from
3605 to one hour, five minutes in my head
On Wednesday, March 26, 2014 9:37:06 AM UTC-4, Skip Montanaro wrote:
> The problem gets more challenging once you get into magnitudes > one
> day:
>
> >>> e = datetime.timedelta(days=-4, seconds=3605)
> >>> e
> datetime.timedelta(-4, 3605)
> >>> print e
> -4 days, 1:00:05
>
> Hmmm... It's printi
Antoon Pardon :
> On 26-03-14 01:58, Roy Smith wrote:
>> previous sunset: -1 day, 22:25:26.295993
>>
>> The idea of str() is that it's supposed to return a human-friendly
>> representation of a value. Humans do not say things like, "The sun set
>> 1 day ago plus 22 hours and 25 minutes".
> Ther
On Tuesday, March 25, 2014 2:15:11 PM UTC-7, enesk...@gmail.com wrote:
> Exception in Tkinter callback
>
> Traceback (most recent call last):
>
> File "C:\Python33\lib\tkinter\__init__.py", line 1475, in __call__
>
> return self.func(*args)
>
> File "C:/Users/User/PycharmProjects/Cesari
On Thu, Mar 27, 2014 at 1:02 AM, Antoon Pardon
wrote:
> There is a difference between how people say things and what is useful.
> I remember when I was studying logarithms, a negative number like -5.73
> was written down as ̅6.27 (with a bar only over the six). That notation
> had the advantage th
On 26-03-14 01:58, Roy Smith wrote:
> One of my roles on this newsgroup is to periodically whine about
> stupidities in the Python datetime module. This is one of those times.
>
> I have some code which computes how long ago the sun set. Being a nice
> pythonista, I'm using a timedelta to repre
Good job men :D
2014-03-17 14:18 GMT-03:00 Alioune Dia :
> yeah , asyncio is a great module, congrat for all jobs you are doing
> --Ad | Dakar
>
>
> 2014-03-17 18:11 GMT+01:00 Giampaolo Rodola' :
>
>> The what's new looks truly amazing, with pathlib and asyncio being my
>> favourite additions.
>
It's not clear to me what the correct str should be. I think the
desired format changes depending on the relative magnitude of the
timedelta object. For small values (less than a day), I agree, the
behavior is, well, odd. You can get around that easily enough:
>>> d = datetime.timedelta(seconds=-
Dne středa, 26. března 2014 13:54:02 UTC+1 Chris Angelico napsal(a):
> On Wed, Mar 26, 2014 at 11:49 PM, Martin Landa wrote:
>
> > # get full path including file extension for scripts
>
> > fcmd = get_real_command(args[0])
this function returns a full path including file
On Wed, Mar 26, 2014 at 11:49 PM, Martin Landa wrote:
> # get full path including file extension for scripts
> fcmd = get_real_command(args[0])
What's that function do?
ChrisA
--
https://mail.python.org/mailman/listinfo/python-list
Dne středa, 26. března 2014 13:29:47 UTC+1 Martin Landa napsal(a):
> not really, I am just searching for a better solution based on virtualenv or
> something similar...
particularly I am using something like
if sys.platform == "win32":
# get full path including file extensio
Hi,
> it should be possible to specify the path of the desired python
>
> interpreter along with the executed script as an argument to
>
> Popen(...). This should make the selection of the used python
>
> explicit.
>
> Or are there any other disadvantages of the current approach, which
>
> y
On Wed, Mar 26, 2014 at 10:49 PM, Ben Collier wrote:
> I know that I can dynamically reference a variable with locals()["i"], for
> instance, but I'd like to know how to do this with a variable in an object.
>
> If I have an object called "device", with variables called attr1, attr2 ..
> attr50,
On 26-03-14 12:49, Ben Collier wrote:
> Hi all,
>
> I know that I can dynamically reference a variable with locals()["i"], for
> instance, but I'd like to know how to do this with a variable in an object.
>
> If I have an object called "device", with variables called attr1, attr2 ..
> attr50, h
Hi all,
I know that I can dynamically reference a variable with locals()["i"], for
instance, but I'd like to know how to do this with a variable in an object.
If I have an object called "device", with variables called attr1, attr2 ..
attr50, how could I dynamically reference these?
It's fai
Sorry, subject was wrong. Please see below:
On Wednesday, 26 March 2014 11:43:49 UTC, Ben Collier wrote:
> Hi all,
>
>
>
> I know that I can dynamically reference a variable with locals()["i"], for
> instance, but I'd like to know how to do this with a variable in an object.
>
>
>
> If I h
Hi all,
I know that I can dynamically reference a variable with locals()["i"], for
instance, but I'd like to know how to do this with a variable in an object.
If I have an object called "device", with variables called attr1, attr2 ..
attr50, how could I dynamically reference these?
It's fairly
2014-03-26 10:40 GMT+01:00 Martin Landa :
> Hi all,
>
> I am trying to fix a bug in the project which I am working for. The program
> starts on Windows via bat file which calls a Python script to set up the
> environment including GUI and allow to launch program-specific tools. Some of
> the too
Hi,
I have posted the same question to python-tutor list *, but I'm trying
my luck here as advised.
I'm trying to get more familiar with asyncio library. Using python
3.4, I wrote simple echo server (see attachement for the code). I know
that instead of using bare bone send/recv I could use some o
Hi all,
I am trying to fix a bug in the project which I am working for. The program
starts on Windows via bat file which calls a Python script to set up the
environment including GUI and allow to launch program-specific tools. Some of
the tools are written in C, some in Python. These commands a
On 26/03/2014 06:03, Jaydeep Patil wrote:
Hi all,
I need to hold the other execution part after next GUI calls?
How can do that?
Anybody can help me?
I suggest you try a specific mailing list for wxpython, it's available
at gmane.comp.python.wxpython amongst other places.
Also would you
On 26/03/2014 01:19, Ethan Furman wrote:
On 03/25/2014 05:58 PM, Roy Smith wrote:
One of my roles on this newsgroup is to periodically whine about
stupidities in the Python datetime module. This is one of those times.
I have some code which computes how long ago the sun set. Being a nice
pyth
On 26-03-14 01:24, Terry Reedy wrote:
> The other fact that Chris noted, that '{}' would have been valid but
> with different meanings in Py1/2 versus Py3, was a factor on the cost
> side. We generally try to avoid such ambiguities.
>
> Except for this last point, I was in favor of the switch.
On 26-03-14 03:56, MRAB wrote:
> On 2014-03-25 22:47, Ethan Furman wrote:
>> On 03/25/2014 12:29 PM, Mark H Harris wrote:
>>> On 3/25/14 2:24 PM, MRAB wrote:
It's explained in PEP 3131.
Basically, a name should to start with a letter (this has been
extended
to include Chine
Op dinsdag 25 maart 2014 20:15:27 UTC+1 schreef Joel Goldstick:
> Jean, be aware there is also python tutor list you might like. This is
> sometimes a tough crowd here. Don't be discouraged. It can be a badge of
> honor sometimes
thanks for the suggestions, I already subscribed to the python tu
Op dinsdag 25 maart 2014 20:58:10 UTC+1 schreef Dave Angel:
> Jean Dubois Wrote in message:
> > Op dinsdag 25 maart 2014 15:42:13 UTC+1 schreef Dave Angel:
>
> >> If your instructor wanted you to copy examples, he would have
> >> given you one.
> > please Dave leave that belittling tone behind,
On 25-03-14 23:47, Ethan Furman wrote:
> On 03/25/2014 12:29 PM, Mark H Harris wrote:
>> On 3/25/14 2:24 PM, MRAB wrote:
>>> It's explained in PEP 3131.
>>>
>>> Basically, a name should to start with a letter (this has been extended
>>> to include Chinese characters, etc) or an underscore.
>>>
>>>
Hi...
I have one wxframe. after click on that frame another frame opens and rest part
is executed. I need ti stop the next execution after secong gui calls up.
please suggest.
--
https://mail.python.org/mailman/listinfo/python-list
Wesley writes:
> ...
> Actually, I can now see the varialbe names at Python level and C level.
> I just want to verify x command to monitor the memory content.
> So, in my origin post, I can get variable i's address, and see the value is 1,
> then, I wanna have a try x command, the issue is, when
69 matches
Mail list logo