Re: need to print seconds from the epoch including the millisecond

2013-12-30 Thread matt . doolittle33
On Friday, December 27, 2013 7:25:42 PM UTC-5, Cameron Simpson wrote:
> On 27Dec2013 07:40, matt.doolittl...@gmail.com  
> wrote:
> 
> > I am on Ubuntu 12.10.   I am still working with the 2 decimal
> 
> > places. Sometime ago i had this issue and I forget how i solved it.
> 
> > maybe i used datetime? thanks!
> 
> 
> 
> Repeatedly people have asked you to show your exact code. Still nothing.
> 
> 
> 
> Here's a clue, from a Gentoo box running kernel 3.2.1-gentoo-r2:
> 
> 
> 
>   $ python
> 
>   Python 2.7.2 (default, Feb  9 2012, 18:40:46)
> 
>   [GCC 4.5.3] on linux2
> 
>   Type "help", "copyright", "credits" or "license" for more information.
> 
>   >>> import time; print time.time()
> 
>   1388190100.44
> 
>   >>> import time; time.time()
> 
>   1388190102.795531
> 
>   >>>
> 
> 
> 
> Please show us _exactly_ what you're doing. I'm guessing that print
> 
> is confusing you.
> 
> 
> 
matt@matt-Inspiron-1525:~$ python
Python 2.7.3 (default, Sep 26 2013, 16:38:10) 
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import time; print time.time()
1388371148.39
>>> import time; time.time()
1388371173.556624
>>> 

i get the same result as you expect.  so its got to be the write statement that 
is truncated the decimal places right?  
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: need to print seconds from the epoch including the millisecond

2013-12-30 Thread matt . doolittle33
On Friday, December 27, 2013 1:49:54 PM UTC-5, Ned Batchelder wrote:
> On 12/27/13 1:09 PM, matt.doolittl...@gmail.com wrote:
> 
> > On Friday, December 27, 2013 11:27:58 AM UTC-5, Roy Smith wrote:
> 
> >> In article <0c33b7e4-edc9-4e1e-b919-fec210c92...@googlegroups.com>,
> 
> >>
> 
> >>   matt.doolittl...@gmail.com wrote:
> 
> >>
> 
> >>
> 
> >>
> 
> >>> I am on Ubuntu 12.10.   I am still working with the 2 decimal places.
> 
> >>
> 
> >>> Sometime ago i had this issue and I forget how i solved it. maybe i used
> 
> >>
> 
> >>> datetime? thanks!
> 
> >>
> 
> >>
> 
> >>
> 
> >> That's strange.  Linux should give you time to the microsecond, or
> 
> >>
> 
> >> something in that range.
> 
> >>
> 
> >>
> 
> >>
> 
> >> Please post the *exact* code you're running.  The code you posted
> 
> >>
> 
> >> earlier is obviously only a fragment of some larger program, so we can
> 
> >>
> 
> >> only guess what's happening.  Assuming your program is in a file called
> 
> >>
> 
> >> "prog.py", run the following commands and copy-paste the output:
> 
> >>
> 
> >>
> 
> > i cant run it that way.  i tried using the python prompt in terminal but 
> > got nothing.  but here is all the code relevant to this issue:
> 
> > #all the imports
> 
> > import sys
> 
> > import posixpath
> 
> > import time
> 
> > from time import strftime
> 
> > from datetime import datetime
> 
> > import os
> 
> > import wx
> 
> > import cPickle as pickle
> 
> > import gnuradio.gr.gr_threading as _threading
> 
> >
> 
> >
> 
> > #the function that writes the time values
> 
> >   def update(self, field_values):
> 
> >
> 
> >  now = datetime.now()
> 
> >
> 
> >  #logger ---
> 
> >  #  new line to write on
> 
> >  self.logfile.write('\n')
> 
> >  #  write date, time, and seconds from the epoch
> 
> >  self.logfile.write('%s\t'%(strftime("%Y-%m-%d",)))
> 
> >  self.logfile.write('%s\t'%(now.strftime("%H:%M:%S",)))
> 
> >  self.logfile.write('%s\t'%(time.time()))
> 
> >  # list to store dictionary keys in tis order
> 
> >  keys = ["duid", "nac",  "tgid", "source", "algid", "kid"]
> 
> >  # loop through the keys in the right order
> 
> >  for k in keys:
> 
> >  #  get the value of the current key
> 
> >  f = field_values.get(k, None)
> 
> >  # if data unit has value...
> 
> >  if f:
> 
> >  #  output the value with trailing tab
> 
> >  self.logfile.write('%s\t'%(str(f)))
> 
> >  # if data unit doesnt have this value print a tab
> 
> >  else:
> 
> >  self.logfile.write('\t')
> 
> >  #end logger 
> 
> >
> 
> >  #if the field 'duid' == 'hdu', then clear fields
> 
> >  if field_values['duid'] == 'hdu':
> 
> >  self.clear()
> 
> >  elif field_values['duid'] == 'ldu1':
> 
> >  self.clear()
> 
> >  elif field_values['duid'] == 'ldu2':
> 
> >  self.clear()
> 
> >  #elif field_values['duid'] == 'tdu':
> 
> >   #   self.clear()
> 
> >  #loop through all TextCtrl fields storing the key/value pairs in 
> > k, v
> 
> >  for k,v in self.fields.items():
> 
> >  # get the dict value for this TextCtrl
> 
> >  f = field_values.get(k, None)
> 
> >  # if the value is empty then set the new value
> 
> >  if f:
> 
> >  v.SetValue(f)
> 
> >
> 
> > #sample output in a .txt file:
> 
> >
> 
> > 2013-12-27  12:07:331388164053.18
> 
> > 2013-12-27  12:07:331388164053.36
> 
> > 2013-12-27  12:07:331388164053.54
> 
> > 2013-12-27  12:07:331388164053.73
> 
> > 2013-12-27  12:07:331388164053.91
> 
> > 2013-12-27  12:07:341388164054.11
> 
> > 2013-12-27  12:07:341388164054.28
> 
> > 2013-12-27  12:07:341388164054.48
> 
> > 2013-12-27  12:07:341388164054.66
> 
> > 2013-12-27  12:07:341388164054.84
> 
> > 2013-12-27  12:07:371388164057.62
> 
> > 2013-12-27  12:07:371388164057.81
> 
> > 2013-12-27  12:07:371388164057.99
> 
> > 2013-12-27  12:07:381388164058.18
> 
> > 2013-12-27  12:07:381388164058.37
> 
> > 2013-12-27  12:07:381388164058.54
> 
> > 2013-12-27  12:07:381388164058.73
> 
> > 2013-12-27  12:07:381388164058.92
> 
> >
> 
> > Thanks!
> 
> >
> 
> 
> 
> Instead of:
> 
> 
> 
>  "%s" % time.time()
> 
> 
> 
> try:
> 
> 
> 
>  "%.6f" % time.time()
> 
> 
> 
> %.6f is a formatting code meaning, floating-point number, 6 decimal places.
> 
> 
> 
> -- 
> 
> Ned Batchelder, http://nedbatchelder.com

thanks a bunch.  the "%.6f"  was the cure.  can you please point me to the doc 
for formatting time?  Thanks!
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: need to print seconds from the epoch including the millisecond

2013-12-30 Thread Ned Batchelder

On 12/29/13 9:44 PM, matt.doolittl...@gmail.com wrote:

On Friday, December 27, 2013 7:25:42 PM UTC-5, Cameron Simpson wrote:

On 27Dec2013 07:40, matt.doolittl...@gmail.com  
wrote:


I am on Ubuntu 12.10.   I am still working with the 2 decimal



places. Sometime ago i had this issue and I forget how i solved it.



maybe i used datetime? thanks!




Repeatedly people have asked you to show your exact code. Still nothing.



Here's a clue, from a Gentoo box running kernel 3.2.1-gentoo-r2:



   $ python

   Python 2.7.2 (default, Feb  9 2012, 18:40:46)

   [GCC 4.5.3] on linux2

   Type "help", "copyright", "credits" or "license" for more information.

   >>> import time; print time.time()

   1388190100.44

   >>> import time; time.time()

   1388190102.795531

   >>>



Please show us _exactly_ what you're doing. I'm guessing that print

is confusing you.




matt@matt-Inspiron-1525:~$ python
Python 2.7.3 (default, Sep 26 2013, 16:38:10)
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.

import time; print time.time()

1388371148.39

import time; time.time()

1388371173.556624




i get the same result as you expect.  so its got to be the write statement that 
is truncated the decimal places right?



Objects in Python have two different ways to produce a string of 
themselves, known as the str() and the repr().  A float's str() includes 
two decimal points of precision, its repr() includes as many as you'd 
need to reproduce the float again.  The print statement implicitly uses 
the str(), the interactive interpreter uses the repr().


Luckily, you can decide how to format the float yourself:

>>> import time
>>> time.time()
1388407706.617985
>>> print time.time()
1388407709.21
>>> print "%.3f" % time.time()
1388407716.377
>>> print "%.4f" % time.time()
1388407726.1001

BTW, I said something very similar in this thread 2.5 days ago: 
https://mail.python.org/pipermail/python-list/2013-December/663454.html

I get the feeling not all messages are flowing to all places.

--
Ned Batchelder, http://nedbatchelder.com

--
https://mail.python.org/mailman/listinfo/python-list


Re: need to print seconds from the epoch including the millisecond

2013-12-30 Thread Ned Batchelder

On 12/30/13 7:50 AM, Ned Batchelder wrote:

BTW, I said something very similar in this thread 2.5 days ago:
https://mail.python.org/pipermail/python-list/2013-December/663454.html
I get the feeling not all messages are flowing to all places.


Oops, and now Matt's reply to that message has just arrived! Sorry for 
the noise.


--
Ned Batchelder, http://nedbatchelder.com

--
https://mail.python.org/mailman/listinfo/python-list


Re: need to print seconds from the epoch including the millisecond

2013-12-30 Thread matt . doolittle33
On Monday, December 30, 2013 8:01:21 AM UTC-5, Ned Batchelder wrote:
> On 12/30/13 7:50 AM, Ned Batchelder wrote:
> 
> > BTW, I said something very similar in this thread 2.5 days ago:
> 
> > https://mail.python.org/pipermail/python-list/2013-December/663454.html
> 
> > I get the feeling not all messages are flowing to all places.
> 
> 
> 
> Oops, and now Matt's reply to that message has just arrived! Sorry for 
> 
> the noise.
> 
> 
> 
> -- 
> 
> Ned Batchelder, http://nedbatchelder.com

the formatting:
   self.logfile.write('%.6f\t'%(time.time()))

fixed it.  thank you very much.  
-- 
https://mail.python.org/mailman/listinfo/python-list


فيس بوك - facebook

2013-12-30 Thread essd
فيس بوك - facebook

https://www.facebook.com/pages/%D9%86%D8%AA%D8%A7%D8%A6%D8%AC-%D8%A7%D9%84%D8%A7%D9%85%D8%AA%D8%AD%D8%A7%D9%86%D8%A7%D8%AA-%D9%88%D8%A7%D9%84%D8%AC%D8%A7%D9%85%D8%B9%D8%A7%D8%AA-%D9%88%D8%A7%D8%AC%D8%AA%D9%85%D8%A7%D8%B9%D9%8A%D8%A7%D8%AA/299719160065550?ref=hl#
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: need to print seconds from the epoch including the millisecond

2013-12-30 Thread Mark Lawrence

On 30/12/2013 12:16, matt.doolittl...@gmail.com wrote:

On Friday, December 27, 2013 1:49:54 PM UTC-5, Ned Batchelder wrote:

On 12/27/13 1:09 PM, matt.doolittl...@gmail.com wrote:


On Friday, December 27, 2013 11:27:58 AM UTC-5, Roy Smith wrote:



In article <0c33b7e4-edc9-4e1e-b919-fec210c92...@googlegroups.com>,







   matt.doolittl...@gmail.com wrote:















I am on Ubuntu 12.10.   I am still working with the 2 decimal places.







Sometime ago i had this issue and I forget how i solved it. maybe i used







datetime? thanks!















That's strange.  Linux should give you time to the microsecond, or







something in that range.















Please post the *exact* code you're running.  The code you posted







earlier is obviously only a fragment of some larger program, so we can







only guess what's happening.  Assuming your program is in a file called







"prog.py", run the following commands and copy-paste the output:











i cant run it that way.  i tried using the python prompt in terminal but got 
nothing.  but here is all the code relevant to this issue:



#all the imports



import sys



import posixpath



import time



from time import strftime



from datetime import datetime



import os



import wx



import cPickle as pickle



import gnuradio.gr.gr_threading as _threading











#the function that writes the time values



   def update(self, field_values):







  now = datetime.now()







  #logger ---



  #  new line to write on



  self.logfile.write('\n')



  #  write date, time, and seconds from the epoch



  self.logfile.write('%s\t'%(strftime("%Y-%m-%d",)))



  self.logfile.write('%s\t'%(now.strftime("%H:%M:%S",)))



  self.logfile.write('%s\t'%(time.time()))



  # list to store dictionary keys in tis order



  keys = ["duid", "nac",  "tgid", "source", "algid", "kid"]



  # loop through the keys in the right order



  for k in keys:



  #  get the value of the current key



  f = field_values.get(k, None)



  # if data unit has value...



  if f:



  #  output the value with trailing tab



  self.logfile.write('%s\t'%(str(f)))



  # if data unit doesnt have this value print a tab



  else:



  self.logfile.write('\t')



  #end logger 







  #if the field 'duid' == 'hdu', then clear fields



  if field_values['duid'] == 'hdu':



  self.clear()



  elif field_values['duid'] == 'ldu1':



  self.clear()



  elif field_values['duid'] == 'ldu2':



  self.clear()



  #elif field_values['duid'] == 'tdu':



   #   self.clear()



  #loop through all TextCtrl fields storing the key/value pairs in k, v



  for k,v in self.fields.items():



  # get the dict value for this TextCtrl



  f = field_values.get(k, None)



  # if the value is empty then set the new value



  if f:



  v.SetValue(f)







#sample output in a .txt file:







2013-12-27  12:07:331388164053.18



2013-12-27  12:07:331388164053.36



2013-12-27  12:07:331388164053.54



2013-12-27  12:07:331388164053.73



2013-12-27  12:07:331388164053.91



2013-12-27  12:07:341388164054.11



2013-12-27  12:07:341388164054.28



2013-12-27  12:07:341388164054.48



2013-12-27  12:07:341388164054.66



2013-12-27  12:07:341388164054.84



2013-12-27  12:07:371388164057.62



2013-12-27  12:07:371388164057.81



2013-12-27  12:07:371388164057.99



2013-12-27  12:07:381388164058.18



2013-12-27  12:07:381388164058.37



2013-12-27  12:07:381388164058.54



2013-12-27  12:07:381388164058.73



2013-12-27  12:07:381388164058.92







Thanks!








Instead of:



  "%s" % time.time()



try:



  "%.6f" % time.time()



%.6f is a formatting code meaning, floating-point number, 6 decimal places.



--

Ned Batchelder, http://nedbatchelder.com


thanks a bunch.  the "%.6f"  was the cure.  can you please point me to the doc 
for formatting time?  Thanks!



Would you please read and action this 
https://wiki.python.org/moin/GoogleGroupsPython to prevent us seeing the 
double line spacing above, thanks.


--
My fellow Pythonistas, ask not what our language can do for you, ask 
what you can do for our language.


Mark Lawrence

--
https://mail.python.org/mailman/listinfo/python-list


PyDev 3.2.0 Released

2013-12-30 Thread Fabio Zadrozny
Hi All,

PyDev 3.2.0 has been released

Details on PyDev: http://pydev.org

Details on its development: http://pydev.blogspot.com

LiClipse (PyDev standalone with goodies such as support for Django
Templates, Mako Templates, Html, Javascript, etc):
http://brainwy.github.io/liclipse/


Release Highlights:
---

* **Important**: PyDev requires Eclipse 3.8 or 4.3 onwards and Java 7! For
older versions, keep using PyDev 2.x.

* **General**:

* Added option to sort imports on save.

* Showing dialog suggesting user to customize settings in Eclipse which
are more suitable for PyDev.

* Memory improvements on situations where an OutOfMemoryError could
happen.

* Search references (Ctrl+Shift+G) when initial is on external module
works (for matches in workspace).

* **Rename refactoring**:

* Added option to rename module without updating references.

* Bugfixes.

* **Performance**:

* Code completion: Builtins gotten from a shell are now cached for
subsequent requests.

* Doing a full build (reindex) is faster.

* **Debugger**:

* Improvements on stackless integration.

* Providing a view which shows the current caught exception.

* Providing way to ignore current caught exception.

* Providing option to show progress on taskbar when breakpoint is hit
to get the users attention (windows 7).

* Fixed issue in while getting referrers when getting __dict__ and
having an exception.



What is PyDev?
---

PyDev is a plugin that enables users to use Eclipse for Python, Jython and
IronPython development -- making Eclipse a first class Python IDE -- It
comes with many goodies such as code completion, syntax highlighting,
syntax analysis, refactor, debug and many others.


Cheers,

--
Fabio Zadrozny
--
Software Developer

LiClipse
http://brainwy.github.io/liclipse

PyDev - Python Development Environment for Eclipse
http://pydev.org
http://pydev.blogspot.com
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: need to print seconds from the epoch including the millisecond

2013-12-30 Thread Roy Smith
In article ,
 Ned Batchelder  wrote:

> A float's str() includes two decimal points of precision

It's actually weirder than that.  What str() appears to do is print some 
variable number of digits after the decimal place, depending on the 
magnitude of the number, and then flips over to exponential notation at 
some point.  All of this is in line with str()'s intent, which is to 
produce a human-friendly string:

for i in range(15):
f = 10**i + 0.123456789
print "%-20s %-20s" % (str(f), repr(f))


$ python float.py
1.123456789  1.123456789 
10.123456789 10.123456789
100.123456789100.123456789   
1000.123456791000.123456789  
1.12345681.123456789 
10.12345710.123456789
100.12346100.123456789   
1000.12351000.12345679   
1.1231.12345679  
10.1210.1234568  
100.1100.123457  
1e+111000.12346  
1e+121.1234  
1e+1310.123  
1e+14100.12

It just happens that for the range of values time.time() is returning 
these days, two decimal digits is what you get.  Unix time rolled over 
to this many digits on

>>> time.ctime(9)
'Sat Sep  8 21:46:39 2001'

so before then, str(time.time()) would have (presumably) generated 3 
decimal digits.

Note that repr() also adjusts the number of digits after the decimal 
place, but this is because it's run out of available hardware precision 
(IEEE double precision is about 16 decimal digits).

Also note that while repr() is smart enough to stop when it runs out of 
bits, the %f format specifier isn't:

>>> f = 10.123456789
>>> repr(f)
'10.123'
>>> "%.6f" % f
'10.123047'

[Ned, again]
> Luckily, you can decide how to format the float yourself:
> [...]
>  >>> print "%.4f" % time.time()
>  1388407726.1001

The problem here is that you have no guarantee here that all those 
digits are meaningful.  I'm not sure what would happen on a machine 
where the system clock only gives centisecond precision.

I would like to think "%.4f" % time.time() would always produce a string 
with 4 digits after the decimal point, the last two of which were 
guaranteed to be "0".  But not having such a box handy to test, that's 
just a conjecture.  A much more pathological case would be that it 
produces random garbage for the extra digits, which would make it appear 
that you were getting more time precision than you really were.

All of which is a good reason to avoid raw timestamps and use datetime.  
With a datatime object, somebody else has already worried about these 
things for you.

PS: all the above examples were done with Python 2.7.1 on OSX 10.7.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: PyDev 3.2.0 Released

2013-12-30 Thread Roy Smith
On Monday, December 30, 2013 8:16:03 AM UTC-5, Fabio Zadrozny wrote:
> [lots of stuff]
> What is PyDev?
> ---
> 
> PyDev is a plugin that enables users to use Eclipse for Python...

A suggestion for announcements of this type.  Put the "What is X" part up 
front, so people can quickly tell if this is something they're interested in or 
not.

[I don't use Eclipse myself, but this looks like a cool project]
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: need to print seconds from the epoch including the millisecond

2013-12-30 Thread Cousin Stanley

>> On 30/12/2013 12:16, matt.doolittl...@gmail.com wrote:
>> 
>>
>> thanks a bunch.  the "%.6f"  was the cure.  
>> can you please point me to the doc for formatting time?  
>> Thanks!
>>

> Would you please read and action this 
> https://wiki.python.org/moin/GoogleGroupsPython 
> to prevent us seeing the double line spacing above, thanks.

  You might consider either turning off an option
  in your news client for including message in reply
  and/or snipping all but a few lines for context
  to prevent us from seeing the double line spacing
  all over again  :-)
 

-- 
Stanley C. Kitching
Human Being
Phoenix, Arizona
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: need to print seconds from the epoch including the millisecond

2013-12-30 Thread Mark Lawrence

On 30/12/2013 17:07, Cousin Stanley wrote:



On 30/12/2013 12:16, matt.doolittl...@gmail.com wrote:


thanks a bunch.  the "%.6f"  was the cure.
can you please point me to the doc for formatting time?
Thanks!




Would you please read and action this
https://wiki.python.org/moin/GoogleGroupsPython
to prevent us seeing the double line spacing above, thanks.


   You might consider either turning off an option
   in your news client for including message in reply
   and/or snipping all but a few lines for context
   to prevent us from seeing the double line spacing
   all over again  :-)



Great idea, but one slight snag is the poster then doesn't see how many 
newlines they've managed to insert using their superb tool.


--
My fellow Pythonistas, ask not what our language can do for you, ask 
what you can do for our language.


Mark Lawrence

--
https://mail.python.org/mailman/listinfo/python-list


Re: cascading python executions only if return code is 0

2013-12-30 Thread Grant Edwards
On 2013-12-27, Roy Smith  wrote:
> In article ,
>  Ethan Furman  wrote:
>
>> Mostly I don't want newbies thinking "Hey!  I can use assertions for all my 
>> confidence testing!"
>
> How about this one, that I wrote yesterday;
>
> assert second >= self.current_second, "time went backwards"
>
> I think that's pretty high up on the "can never happen" list.

It's not that high (depending on where you're getting "second" from).
If the "second" is from the time of day, and the NTP daemon (or the
system admin) decides the clock needs a stepwise adjustment, the time
of day can go backwards.

-- 
Grant

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: need to print seconds from the epoch including the millisecond

2013-12-30 Thread Cousin Stanley

>> You might consider either turning off an option
>> in your news client for including message in reply
>> and/or snipping all but a few lines for context
>> to prevent us from seeing the double line spacing
>> all over again  :-)
 
> Great idea, but one slight snag is 
> the poster then doesn't see how many newlines 
> they've managed to insert using their superb tool.

  A few lines to illustrate along with your
  standard reference  might  be enough   

https://wiki.python.org/moin/GoogleGroupsPython

 I am on Ubuntu 12.10.   I am still working with the 2 decimal places.
> 
>>>
> 
 Sometime ago i had this issue and I forget how i solved it. maybe i used
> 
>>>
> 
 datetime? thanks!
 

-- 
Stanley C. Kitching
Human Being
Phoenix, Arizona
-- 
https://mail.python.org/mailman/listinfo/python-list


Dictionary

2013-12-30 Thread Bischoop
I have a txt file with some words, and need simply program that will 
print me words containing provided letters.

For example:
Type the letters:
 (I type: g,m,o)
open the dictionary.txt
check words containing:g,m,o in dictionary.txt
if there are words containing: ["g", "m", "o" ] 
print words with g,m,o

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Dictionary

2013-12-30 Thread Walter Hurry
On Mon, 30 Dec 2013 18:38:20 +, Bischoop wrote:

> I have a txt file with some words, and need simply program that will
> print me words containing provided letters.
> 
> For example:
> Type the letters:
>  (I type: g,m,o)
> open the dictionary.txt
>   check words containing:g,m,o in dictionary.txt
> if there are words containing: ["g", "m", "o" ]
>   print words with g,m,o

Well, what have you tried so far, and what result did you get?

The incredibly helpful people here will provide advice, guidance and 
pointers, but it won't help you at all if they just do your homework for 
you.

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: need to print seconds from the epoch including the millisecond

2013-12-30 Thread Steven D'Aprano
Mark Lawrence wrote:

> On 30/12/2013 17:07, Cousin Stanley wrote:

[...]
>>> Would you please read and action this
>>> https://wiki.python.org/moin/GoogleGroupsPython
>>> to prevent us seeing the double line spacing above, thanks.
>>
>> You might consider either turning off an option
>> in your news client for including message in reply
>> and/or snipping all but a few lines for context
>> to prevent us from seeing the double line spacing
>> all over again  :-)
>>
> 
> Great idea, 

Yes it is. It's a bloody brilliant idea. If only there were some sort of
delete or backspace key on the keyboard that would allow the person
replying to trim or snip excess quoting...


> but one slight snag is the poster then doesn't see how many 
> newlines they've managed to insert using their superb tool.

So what? Chances are that Google Groups will cleverly hide the quoting from
them anyway, which means that you're not demonstrating the problem to them,
you're just spamming the group with double-spaced, excessively quoted,
irrelevant text. Even if they see the quoted text, half a dozen lines is
more than enough to demonstrate the problem to any reasonable person, they
can extrapolate from that. If half a dozen quoted lines isn't enough to
persuade them to read the link, a million lines won't be.


-- 
Steven

-- 
https://mail.python.org/mailman/listinfo/python-list


Spam trash sent to python-list from google-groups

2013-12-30 Thread Terry Reedy

In the last week, python list received the following from google-groups.

vbf...@gmail.com via google-groups
NOW Watch Hot Sexy Star Aishwarya rai Bathing Videos In All Angles
http://permalink.gmane.org/gmane.comp.python.general/749545

hussainc1...@gmail.com via gg
Sania Mirza Naked Pics at www.ZHAKKAS.com
http://permalink.gmane.org/gmane.comp.python.general/749570

hossamala...@gmail.com via gg
=?windows-1256?B?3e3TIMjm3yAtIGZhY2Vib29r?= (Partly Arabic script)
http://permalink.gmane.org/gmane.comp.python.general/749589

Just to let people know, I have informed the other python-list-owners of 
the situation (and of gg formatting problems) and have enquired about 
possible actions.


I applaud everyone for their restraint in not responding to the above. 
Let them die without be propagated by responses. Please also do not use 
this notice as an excuse for repetitious gg comments.


--
Terry Jan Reedy

--
https://mail.python.org/mailman/listinfo/python-list


Re: Spam trash sent to python-list from google-groups

2013-12-30 Thread Mark Lawrence

On 30/12/2013 19:12, Terry Reedy wrote:

In the last week, python list received the following from google-groups.

vbf...@gmail.com via google-groups
NOW Watch Hot Sexy Star Aishwarya rai Bathing Videos In All Angles
http://permalink.gmane.org/gmane.comp.python.general/749545

hussainc1...@gmail.com via gg
Sania Mirza Naked Pics at www.ZHAKKAS.com
http://permalink.gmane.org/gmane.comp.python.general/749570

hossamala...@gmail.com via gg
=?windows-1256?B?3e3TIMjm3yAtIGZhY2Vib29r?= (Partly Arabic script)
http://permalink.gmane.org/gmane.comp.python.general/749589


hossamalagmy turns up every now and again as does BV BV whatever.  For 
any spam I go straight to gg and gmane and mark them as spam.  Every 
little counts :)


--
My fellow Pythonistas, ask not what our language can do for you, ask 
what you can do for our language.


Mark Lawrence

--
https://mail.python.org/mailman/listinfo/python-list


Blog "about python 3"

2013-12-30 Thread Mark Lawrence
http://alexgaynor.net/2013/dec/30/about-python-3/ may be of interest to 
some of you.


--
My fellow Pythonistas, ask not what our language can do for you, ask 
what you can do for our language.


Mark Lawrence

--
https://mail.python.org/mailman/listinfo/python-list


Idle Problems

2013-12-30 Thread rpucci2
Hi I just joined this list and have a question.I have python 3.3.3 and running 
it on a windows 7 computer.Python has been running good until recently.I can 
bring up python shell,but when I go to run a recently loaded program,the code 
comes up briefly on the screen and then disappears.Python just quits and then I 
have to start over.Can someone tell me what is happening?I’m new to python and 
am just learning.Thanks-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Blog "about python 3"

2013-12-30 Thread Steven D'Aprano
On Mon, 30 Dec 2013 19:41:44 +, Mark Lawrence wrote:

> http://alexgaynor.net/2013/dec/30/about-python-3/ may be of interest to
> some of you.

I don't know whether to thank you for the link, or shout at you for 
sending eyeballs to look at such a pile of steaming bullshit.

I'd like to know where Alex gets the idea that the transition of Python 2 
to 3 was supposed to be a five year plan. As far as I know, it was a ten 
year plan, and we're well ahead of expectations of where we would be at 
this point of time. People *are* using Python 3, the major Linux distros 
are planning to move to Python 3, the "Python Wall Of Shame" stopped 
being a wall of shame a long time ago (I think it was a year ago? or at 
least six months ago). Alex's article is, basically, FUD.

More comments will have to follow later.


-- 
Steven
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Idle Problems

2013-12-30 Thread Tim Golden

On 30/12/2013 18:43, rpuc...@cox.net wrote:

Hi I just joined this list and have a question.I have python 3.3.3 and
running it on a windows 7 computer.Python has been running good until
recently.I can bring up python shell,but when I go to run a recently
loaded program,the code comes up briefly on the screen and then
disappears.Python just quits and then I have to start over.Can someone
tell me what is happening?I’m new to python and am just learning.Thanks


Hi, welcome to Python.

This is a common question and has been answered quite a few times on 
this list, including quite recently. However, I can't for the life of me 
find an example of such an answer in the archives! (Someone's sure to 
help me out here).


In short, you'd do better to start up a console window (using Start > 
Run > cmd.exe or any other way you choose). You can then cd to the 
directory your code is in, and run the programs that way. The thing is 
that, if your program looks like this:



import sys

print("Hello, World!)
print("I'm running Python version ", sys.version)



then, when you double-click, your program will run in a console window, 
print its brief output, and exit, all before you've really noticed 
what's going on!


Have a look here:

  http://docs.python.org/3.3/faq/windows

and here:

  http://docs.python.org/3.3/using/windows.html

for some amount of help.

TJG
--
https://mail.python.org/mailman/listinfo/python-list


Re: Idle Problems

2013-12-30 Thread bob gailer

On 12/30/2013 1:43 PM, rpuc...@cox.net wrote:
Hi I just joined this list and have a question.I have python 3.3.3 and 
running it on a windows 7 computer.Python has been running good until 
recently.I can bring up python shell,but when I go to run a recently 
loaded program,the code comes up briefly on the screen and then 
disappears.Python just quits and then I have to start over.Can someone 
tell me what is happening?I’m new to python and am just learning.Thanks
What do you mean by "run a recently loaded program"? and by "the code 
comes up briefly on the screen and then disappears"?


We could guess but that is a waste of time.

How did you load it? What did you do to run it?

Be as thorough and specific as you can.


--
https://mail.python.org/mailman/listinfo/python-list


Re: Blog "about python 3"

2013-12-30 Thread Mark Lawrence

On 30/12/2013 20:49, Steven D'Aprano wrote:

On Mon, 30 Dec 2013 19:41:44 +, Mark Lawrence wrote:


http://alexgaynor.net/2013/dec/30/about-python-3/ may be of interest to
some of you.


I don't know whether to thank you for the link, or shout at you for
sending eyeballs to look at such a pile of steaming bullshit.

I'd like to know where Alex gets the idea that the transition of Python 2
to 3 was supposed to be a five year plan. As far as I know, it was a ten
year plan, and we're well ahead of expectations of where we would be at
this point of time. People *are* using Python 3, the major Linux distros
are planning to move to Python 3, the "Python Wall Of Shame" stopped
being a wall of shame a long time ago (I think it was a year ago? or at
least six months ago). Alex's article is, basically, FUD.

More comments will have to follow later.



http://nuitka.net/posts/re-about-python-3.html is a response.

--
My fellow Pythonistas, ask not what our language can do for you, ask 
what you can do for our language.


Mark Lawrence

--
https://mail.python.org/mailman/listinfo/python-list


Python 2.x and 3.x usage survey

2013-12-30 Thread Dan Stromberg
I keep hearing naysayers, nay saying about Python 3.x.

Here's a 9 question, multiple choice survey I put together about
Python 2.x use vs Python 3.x use.

I'd be very pleased if you could take 5 or 10 minutes to fill it out.

Here's the URL:
https://www.surveymonkey.com/s/N5N5PG2
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python 2.x and 3.x usage survey

2013-12-30 Thread Andrew Berg
On 2013.12.30 15:56, Dan Stromberg wrote:
> I keep hearing naysayers, nay saying about Python 3.x.
> 
> Here's a 9 question, multiple choice survey I put together about
> Python 2.x use vs Python 3.x use.
> 
> I'd be very pleased if you could take 5 or 10 minutes to fill it out.
> 
> Here's the URL:
> https://www.surveymonkey.com/s/N5N5PG2
> 
It was closer to 5 or 10 seconds. :)

-- 
CPython 3.3.3 | Windows NT 6.2.9200 / FreeBSD 10.0
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Blog "about python 3"

2013-12-30 Thread Ethan Furman

On 12/30/2013 01:29 PM, Mark Lawrence wrote:

On 30/12/2013 20:49, Steven D'Aprano wrote:

On Mon, 30 Dec 2013 19:41:44 +, Mark Lawrence wrote:


http://alexgaynor.net/2013/dec/30/about-python-3/ may be of interest to
some of you.


I don't know whether to thank you for the link, or shout at you for
sending eyeballs to look at such a pile of steaming bullshit.


http://nuitka.net/posts/re-about-python-3.html is a response.


Wow -- another steaming pile!  Mark, are you going for a record?  ;)

--
~Ethan~
--
https://mail.python.org/mailman/listinfo/python-list


Re: Python 2.x and 3.x usage survey

2013-12-30 Thread Chris Angelico
On Tue, Dec 31, 2013 at 8:56 AM, Dan Stromberg  wrote:
> I keep hearing naysayers, nay saying about Python 3.x.
>
> Here's a 9 question, multiple choice survey I put together about
> Python 2.x use vs Python 3.x use.
>
> I'd be very pleased if you could take 5 or 10 minutes to fill it out.
>
> Here's the URL:
> https://www.surveymonkey.com/s/N5N5PG2

Will be interested to see the stats at the end of that survey! Though
of course posting to this list does give some inherent bias. But I
suspect the stats will show a large proportion of people are
comfortable on Py3.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Blog "about python 3"

2013-12-30 Thread Chris Angelico
On Tue, Dec 31, 2013 at 9:38 AM, Ethan Furman  wrote:
> On 12/30/2013 01:29 PM, Mark Lawrence wrote:
>>
>> On 30/12/2013 20:49, Steven D'Aprano wrote:
>>>
>>> On Mon, 30 Dec 2013 19:41:44 +, Mark Lawrence wrote:
>>>
 http://alexgaynor.net/2013/dec/30/about-python-3/ may be of interest to
 some of you.
>>>
>>>
>>> I don't know whether to thank you for the link, or shout at you for
>>> sending eyeballs to look at such a pile of steaming bullshit.
>>
>>
>> http://nuitka.net/posts/re-about-python-3.html is a response.
>
>
> Wow -- another steaming pile!  Mark, are you going for a record?  ;)

Does this steam?

http://rosuav.blogspot.com/2013/12/about-python-3-response.html

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python 2.x and 3.x usage survey

2013-12-30 Thread Cameron Simpson
On 30Dec2013 19:16, Dennis Lee Bieber  wrote:
> On Mon, 30 Dec 2013 16:14:53 -0600, Andrew Berg 
> declaimed the following:
> 
> >On 2013.12.30 15:56, Dan Stromberg wrote:
> >> I keep hearing naysayers, nay saying about Python 3.x.
> >> 
> >> Here's a 9 question, multiple choice survey I put together about
> >> Python 2.x use vs Python 3.x use.
> >> 
> >> I'd be very pleased if you could take 5 or 10 minutes to fill it out.
> >> 
> >> Here's the URL:
> >> https://www.surveymonkey.com/s/N5N5PG2
> >> 
> >It was closer to 5 or 10 seconds. :)
> 
>   If that much...
> 
>   Too many questions require a positive response to a previous question
> (for example, if one has not written Python 3.x, one is also unlikely to
> have used any of the porting tools).

How complex do you want it to be? One can post filter the results
for relevance I suppose.

My only gripe is the "do you write more code for 2.x or 3.x" question;
I do in fact write more python 2 (I suppose), but since I'm striving
to make my codebase portable between 2 and 3 the question is a poor
fit. There is at least the "do you write code to run on both?" later.

Cheers,
-- 
Cameron Simpson 

SPSS. Big honkin' stats package. Comes with a good manual.
- Dan Hillman 
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python 3.3.2 Shell Message

2013-12-30 Thread Stan Ward
Thanks Ned.  That did the trick!  Jason Briggs, author of Python of Kids, gave 
me the same answer.  Happy to be over this hurdle.  Thanks!  Happy New Year!!
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Blog "about python 3"

2013-12-30 Thread Mark Lawrence

On 30/12/2013 22:38, Ethan Furman wrote:

On 12/30/2013 01:29 PM, Mark Lawrence wrote:

On 30/12/2013 20:49, Steven D'Aprano wrote:

On Mon, 30 Dec 2013 19:41:44 +, Mark Lawrence wrote:


http://alexgaynor.net/2013/dec/30/about-python-3/ may be of interest to
some of you.


I don't know whether to thank you for the link, or shout at you for
sending eyeballs to look at such a pile of steaming bullshit.


http://nuitka.net/posts/re-about-python-3.html is a response.


Wow -- another steaming pile!  Mark, are you going for a record?  ;)

--
~Ethan~


Merely pointing out the existence of these little gems in order to find 
out people's feelings about them.  You never know, we might even end up 
with a thread whereby the discussion is Python, the whole Python and 
nothing but the Python.


--
My fellow Pythonistas, ask not what our language can do for you, ask 
what you can do for our language.


Mark Lawrence

--
https://mail.python.org/mailman/listinfo/python-list


Re: Blog "about python 3"

2013-12-30 Thread Chris Angelico
On Tue, Dec 31, 2013 at 3:38 PM, Mark Lawrence  wrote:
> You never know, we might even end up with a thread whereby the discussion is
> Python, the whole Python and nothing but the Python.

What, on python-list??! [1] That would be a silly idea. We should
avoid such theories with all vigor.

ChrisA

[1] In C, that would be interpreted as "What, on python-list|" and
would confuse everyone.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Blog "about python 3"

2013-12-30 Thread Ethan Furman

On 12/30/2013 08:25 PM, Devin Jeanpierre wrote:

On Mon, Dec 30, 2013 at 2:38 PM, Ethan Furman  wrote:

Wow -- another steaming pile!  Mark, are you going for a record?  ;)


Indeed. Every post that disagrees with my opinion and understanding of
the situation is complete BS and a conspiracy to spread fear,
uncertainty, and doubt. Henceforth I will explain few to no specific
disagreements, nor will I give anyone the benefit of the doubt,
because that would be silly.


Couldn't of said it better myself!  Well, except for the "my opinion" part -- obviously it's not my opinion, but 
reality!  ;)


--
~Ethan~
--
https://mail.python.org/mailman/listinfo/python-list


Re: Blog "about python 3"

2013-12-30 Thread Mark Lawrence

On 31/12/2013 01:09, Chris Angelico wrote:

On Tue, Dec 31, 2013 at 9:38 AM, Ethan Furman  wrote:

On 12/30/2013 01:29 PM, Mark Lawrence wrote:


On 30/12/2013 20:49, Steven D'Aprano wrote:


On Mon, 30 Dec 2013 19:41:44 +, Mark Lawrence wrote:


http://alexgaynor.net/2013/dec/30/about-python-3/ may be of interest to
some of you.



I don't know whether to thank you for the link, or shout at you for
sending eyeballs to look at such a pile of steaming bullshit.



http://nuitka.net/posts/re-about-python-3.html is a response.



Wow -- another steaming pile!  Mark, are you going for a record?  ;)


Does this steam?

http://rosuav.blogspot.com/2013/12/about-python-3-response.html

ChrisA



I'd have said restrained.

--
My fellow Pythonistas, ask not what our language can do for you, ask 
what you can do for our language.


Mark Lawrence

--
https://mail.python.org/mailman/listinfo/python-list


Fwd: Mailing list erraticness

2013-12-30 Thread Ethan Furman

Accidental off-list reply.  :)

On Tue, Dec 31, 2013 at 10:03 AM, Ethan Furman  wrote:

On 12/30/2013 08:25 PM, Devin Jeanpierre wrote:


On Mon, Dec 30, 2013 at 2:38 PM, Ethan Furman  wrote:


Wow -- another steaming pile!  Mark, are you going for a record?  ;)



Indeed. Every post that disagrees with my opinion and understanding of
the situation is complete BS and a conspiracy to spread fear,
uncertainty, and doubt. Henceforth I will explain few to no specific
disagreements, nor will I give anyone the benefit of the doubt,
because that would be silly.



Couldn't of said it better myself!  Well, except for the "my opinion" part
-- obviously it's not my opinion, but reality!  ;)


More mailing list erraticness:
I see Ethan's comment on Devin but not Devin's post
Neither in GG nor in my email


--
https://mail.python.org/mailman/listinfo/python-list