Friday, November 15, 2013

comp.lang.python - 26 new messages in 13 topics - digest

comp.lang.python
http://groups.google.com/group/comp.lang.python?hl=en

comp.lang.python@googlegroups.com

Today's topics:

* Odd msg received from list - 8 messages, 6 authors
http://groups.google.com/group/comp.lang.python/t/6051442dd7f3cf27?hl=en
* To whoever hacked into my Database - 1 messages, 1 author
http://groups.google.com/group/comp.lang.python/t/1459c9bdf9ab0ada?hl=en
* Trying tcompile an use the Python 3.4a - 1 messages, 1 author
http://groups.google.com/group/comp.lang.python/t/d6eb7f05008cbf25?hl=en
* Program Translation - Nov. 14, 2013 - 2 messages, 2 authors
http://groups.google.com/group/comp.lang.python/t/69cada4c80ff7036?hl=en
* writing fortran equivalent binary file using python - 3 messages, 3 authors
http://groups.google.com/group/comp.lang.python/t/af85223e3c4a7786?hl=en
* Invalid syntax with print "Hello World" - 2 messages, 2 authors
http://groups.google.com/group/comp.lang.python/t/7f0ce0366a7cd81c?hl=en
* @gmail.com accounts put on hold - 2 messages, 2 authors
http://groups.google.com/group/comp.lang.python/t/6fc28709ca8aa2db?hl=en
* pypy and ctypes - 1 messages, 1 author
http://groups.google.com/group/comp.lang.python/t/ae520cf0ce5d6e6b?hl=en
* python 2.7.x on MacOSX: failed dlopen() on .so's - 1 messages, 1 author
http://groups.google.com/group/comp.lang.python/t/f7c6dbd1573a9577?hl=en
* Converting hex data to image - 2 messages, 2 authors
http://groups.google.com/group/comp.lang.python/t/cd9fa5a301bb7a61?hl=en
* Most discussion on comp.lang.python is about developing with Python - 1
messages, 1 author
http://groups.google.com/group/comp.lang.python/t/0d22dd5dd221dc6d?hl=en
* ogg2mp3 utility? - 1 messages, 1 author
http://groups.google.com/group/comp.lang.python/t/67299dcf692ae43f?hl=en
* Automation - 1 messages, 1 author
http://groups.google.com/group/comp.lang.python/t/2cb5aaffece4c4a9?hl=en

==============================================================================
TOPIC: Odd msg received from list
http://groups.google.com/group/comp.lang.python/t/6051442dd7f3cf27?hl=en
==============================================================================

== 1 of 8 ==
Date: Thurs, Nov 14 2013 5:56 am
From: Chris Angelico


On Fri, Nov 15, 2013 at 12:53 AM, Verde Denim <tdldev@gmail.com> wrote:
> I got an odd message this morning from the list telling me that my
> account was de-activated due to excessive bounces. I've only sent a
> handful of messages to this board, but do read an awful lot of the posts
> in order to learn more about the language. The message also listed my
> account password, which I found odd. Has anyone else received a message
> like this?

Yes, I did too. I don't think it has anything to do with the number of
posts you make; it'll be to do with the number that get sent to you,
and it looks like it may be something to do with gmail. I tossed an
email to the list-owner address and it's being looked into; you'll
probably need to mark your address as active again. (In case you
haven't yet done that, I'm doing something I almost never do and
including the OP in the To: list. Please don't take this as a
precedent; normally, just reply to the list and let the sender get a
copy through that.)

ChrisA




== 2 of 8 ==
Date: Thurs, Nov 14 2013 6:11 am
From: Roy Smith


In article <mailman.2591.1384437196.18130.python-list@python.org>,
Verde Denim <tdldev@gmail.com> wrote:

> I got an odd message this morning from the list telling me that my
> account was de-activated due to excessive bounces. I've only sent a
> handful of messages to this board, but do read an awful lot of the posts
> in order to learn more about the language. The message also listed my
> account password, which I found odd. Has anyone else received a message
> like this?

This sounds like a variation of a classic phishing scam. You get an
email which looks official, telling you that some account you have has
been suspended because you need to verify some information. The wording
of the message is always vague about exactly what account this is.

Don't click on any of the links. At best, they're harvesting email
addresses. At worst, they're harvesting personal information which can
be used for identity theft, credit card fraud, or all sorts of
malfeasance.

Here's some recent examples from my junk mailbox:

> Attention User;
> Your email Quota is almost exceeded. We are currently doing a maintenance on
> our server. Please, Visit page below to update your account and avoid losing
> your inbox.
>  
> [link elided]
>
> Thank you,
> Technical Team

and another:

> Dear Client,
>
>
> This is an automatic message by the system to let you know that you have to
> confirm your account information within 48 hours.
> Your account has been frozen temporarily in order to protect it.
> The account will continue to be frozen until it is approved And Validate Your
> Account Information.
> Once you have updated your account records, your information will be
> confirmed and your account will start to work as normal once again.
>  This will help protect you in the future. The process does not take more
> than 3 minutes.
>
> To proceed to confirm your account information please click on the link below
> and follow the instructions that will be required.
>  
> Click Here To Verfiy Your Account info
>  
> © 2013 All rights reserved.




== 3 of 8 ==
Date: Thurs, Nov 14 2013 6:24 am
From: MRAB


On 14/11/2013 13:53, Verde Denim wrote:
> I got an odd message this morning from the list telling me that my
> account was de-activated due to excessive bounces. I've only sent a
> handful of messages to this board, but do read an awful lot of the posts
> in order to learn more about the language. The message also listed my
> account password, which I found odd. Has anyone else received a message
> like this?
>
I'm wondering if it has anything to do with spam filtering.

If you're using a spam filter (it might be offered as a feature by your
ISP) that bounces instead of just deleting, and the spam looks like it
comes from or through the list, then the list would receive those
bounces without you being aware of it.





== 4 of 8 ==
Date: Thurs, Nov 14 2013 6:26 am
From: Tim Golden


On 14/11/2013 13:53, Verde Denim wrote:
> I got an odd message this morning from the list telling me that my
> account was de-activated due to excessive bounces. I've only sent a
> handful of messages to this board, but do read an awful lot of the posts
> in order to learn more about the language. The message also listed my
> account password, which I found odd. Has anyone else received a message
> like this?
>

I can confirm that your account has been suspended because bounces. That
is: as a moderator, I can view your record in the interface and see that
it has been tagged as such. I can't tell you any more, I'm afraid; I've
just emailed the other list owners to see if someone has a handle on why
this has happened to a number of @gmail.com users today.

TJG




== 5 of 8 ==
Date: Thurs, Nov 14 2013 6:26 am
From: Chris Angelico


On Fri, Nov 15, 2013 at 1:11 AM, Roy Smith <roy@panix.com> wrote:
> In article <mailman.2591.1384437196.18130.python-list@python.org>,
> Verde Denim <tdldev@gmail.com> wrote:
>
>> I got an odd message this morning from the list telling me that my
>> account was de-activated due to excessive bounces. I've only sent a
>> handful of messages to this board, but do read an awful lot of the posts
>> in order to learn more about the language. The message also listed my
>> account password, which I found odd. Has anyone else received a message
>> like this?
>
> This sounds like a variation of a classic phishing scam. You get an
> email which looks official, telling you that some account you have has
> been suspended because you need to verify some information. The wording
> of the message is always vague about exactly what account this is.
>
> Don't click on any of the links. At best, they're harvesting email
> addresses. At worst, they're harvesting personal information which can
> be used for identity theft, credit card fraud, or all sorts of
> malfeasance.
>

I agree in general, but I happen to be pretty familiar with Mailman
alerts, and this one was genuine. Also, it pointed to what does appear
to be the right address (mail.python.org). There's definitely
something going around that's causing problems for gmail users; maybe
spam is getting bounced/rejected instead of being dropped?

ChrisA




== 6 of 8 ==
Date: Thurs, Nov 14 2013 6:27 am
From: Chris Angelico


On Fri, Nov 15, 2013 at 1:24 AM, MRAB <python@mrabarnett.plus.com> wrote:
> I'm wondering if it has anything to do with spam filtering.
>
> If you're using a spam filter (it might be offered as a feature by your
> ISP) that bounces instead of just deleting, and the spam looks like it
> comes from or through the list, then the list would receive those
> bounces without you being aware of it.

I hadn't read your post when I typed up my own. You said everything I
was saying about spam, only better and sooner. :)

ChrisA




== 7 of 8 ==
Date: Thurs, Nov 14 2013 6:27 am
From: Joost Molenaar


On Thu, Nov 14, 2013 at 2:53 PM, Verde Denim <tdldev@gmail.com> wrote:
> Has anyone else received a message like this?

I did too. It seems to me that Gmail's spam filter might have been overly
enthusiastic, but the only way to find out is to look at the bounces
that the list
software received.

Yesterday I also received a warning from the debian-laptop mailing list program.

Joost




== 8 of 8 ==
Date: Thurs, Nov 14 2013 8:02 am
From: "Gisle Vanem"


"Chris Angelico" <rosuav@gmail.com> wrote:

> I agree in general, but I happen to be pretty familiar with Mailman
> alerts, and this one was genuine. Also, it pointed to what does appear
> to be the right address (mail.python.org). There's definitely
> something going around that's causing problems for gmail users;

It happended to me too. And I'm a Yahoo user. I clicked the MailMan
confirmation link and all emails seems to be received now (comparing
to what's on the NNTP group).

--gv






==============================================================================
TOPIC: To whoever hacked into my Database
http://groups.google.com/group/comp.lang.python/t/1459c9bdf9ab0ada?hl=en
==============================================================================

== 1 of 1 ==
Date: Thurs, Nov 14 2013 5:56 am
From: Alister


On Thu, 14 Nov 2013 15:24:32 +0200, Ferrous Cranus wrote:

> Στις 14/11/2013 2:32 μμ, ο/η Alister έγραψε:
>> On Thu, 14 Nov 2013 12:46:29 +0200, Ferrous Cranus wrote:
>>>> This must have happened when i was handling my root passwords out in
>>>> the open.
>>>>
>>>> Served me well.
>>>
>> At least you seem to be learning this lesson
>>>
>>>
>>> Can somebody explain to me why there is so many failed attempts to
>>> login into my linux server under various user accounts?
>>>
>>> http://i.imgur.com/5PaZAWu.png
>>>
>>> I mean is this some normal background radiation of the Internet or is
>>> something directed to me?
>>>
>>> Does this happen on your servers at this extend too?
>>
>> any open ports on the internet are likely to attract attention of the
>> 'Black Hats'
>> this is why you have been advised to check your firewall settings you
>> should only expose the ports that are absolutely necessary
>>
>> for a web server these would be 80 & 443
>>
>> currently you have many other services also open that probably should
>> not be.
>> if you check the logs for those services you will probably find even
>> more login attempts (I hope they have failed)
>
>
> Yes i have more ports open as 'nmap' reports but don't forget that i'm
> running cPanel for my customers, hence more ports need to be opened for
> cPanel and WHM use, let alone mail and sshd.
>
> But the response wasn't clear to me.
> Ia this randomly normal background Internet radiation or some personal
> directed attacks?

As others have said this is no longer python related & i am not going to
answer any further.





--
The brain is a wonderful organ; it starts working the moment you get up
in the morning, and does not stop until you get to work.





==============================================================================
TOPIC: Trying tcompile an use the Python 3.4a
http://groups.google.com/group/comp.lang.python/t/d6eb7f05008cbf25?hl=en
==============================================================================

== 1 of 1 ==
Date: Thurs, Nov 14 2013 5:57 am
From: Chris Angelico


On Fri, Nov 15, 2013 at 12:50 AM, Nick the Gr33k <nikos@superhost.gr> wrote:
> These action should be done via package managers but i wasn't ven able to
> install python 3.4a like that, i had to compile it form source when the easy
> thing to do was "yum install python3"
>
> what wrong with this 'yum' manager?

With yum you get whatever yum is carrying. If you build from source,
you're on your own. You chose to build from source. Now you're on your
own. Have fun. Get to know what it takes to run your own system,
without the package manager's help (or rather, without as much of the
package manager's help). These are Linux system administration
questions, NOT Python questions.

ChrisA





==============================================================================
TOPIC: Program Translation - Nov. 14, 2013
http://groups.google.com/group/comp.lang.python/t/69cada4c80ff7036?hl=en
==============================================================================

== 1 of 2 ==
Date: Thurs, Nov 14 2013 6:18 am
From: "E.D.G."


Posted by E.D.G. on November 14, 2013

In view of the fact that I mentioned the following project in both
Perl and Python Newsgroup notes and did not get any hostile responses I am
going to take a chance and mention it again in all three of these
Newsgroups. People posting responses might want to do that in just one
Newsgroup. I will check all three for responses for a few weeks.


This is the Web address for an interesting and apparently unique
computer program written using FORTRAN 77. As far as I am aware, it has
never been translated to newer language. There is a BASIC version that was
apparently written around the same time as the FORTRAN version.

http://www.bfo.geophys.uni-stuttgart.de/etgtab.html

What a number of us would like to do is obtain a copy of the program
that is written in a newer language so that we can then merge it with the
programs available through the following Web page. The new programs would
then be made available as freeware programs to researchers around the world.
This indirect link is being used in an effort to keep Web site related spam
to a minimum. I don't collect credits by having people visit that
(indirect) Web site.

http://www.freewebs.com/eq-forecasting/RH.html

If there are any programmers who might be interested in such a
translation effort then I would be interested in hearing from them.

Etgtab generates Solid Earth Tide and ocean tide data for any
location on or inside the planet. I am not aware of any other freeware
program that can do that.

SunGP available at that second Web site is the only freeware program
that I know about that generates what are sometimes referred to as subsolar
and sublunar types of data. The download code was written using True BASIC.

If you draw a line between the centers of the sun and the Earth then
the place where that line crosses the surface of the Earth is the subsolar
location. The sublunar location is the same type of thing. The SunGP
program code is also available in Perl code, but not through any Web sites.






== 2 of 2 ==
Date: Thurs, Nov 14 2013 9:07 am
From: mecej4


On 11/14/2013 8:18 AM, E.D.G. wrote:
> Posted by E.D.G. on November 14, 2013
>
> In view of the fact that I mentioned the following project in
> both Perl and Python Newsgroup notes and did not get any hostile
> responses I am going to take a chance and mention it again in all three
> of these Newsgroups. People posting responses might want to do that in
> just one Newsgroup. I will check all three for responses for a few weeks.
>
>
> This is the Web address for an interesting and apparently unique
> computer program written using FORTRAN 77. As far as I am aware, it has
> never been translated to newer language. There is a BASIC version that
> was apparently written around the same time as the FORTRAN version.
>
> http://www.bfo.geophys.uni-stuttgart.de/etgtab.html
>
> What a number of us would like to do is obtain a copy of the
> program that is written in a newer language so that we can then merge it
> with the programs available through the following Web page. The new
> programs would then be made available as freeware programs to
> researchers around the world. This indirect link is being used in an
> effort to keep Web site related spam to a minimum. I don't collect
> credits by having people visit that (indirect) Web site.
>
> http://www.freewebs.com/eq-forecasting/RH.html
>
> If there are any programmers who might be interested in such a
> translation effort then I would be interested in hearing from them.
>
> Etgtab generates Solid Earth Tide and ocean tide data for any
> location on or inside the planet. I am not aware of any other freeware
> program that can do that.
>
> SunGP available at that second Web site is the only freeware
> program that I know about that generates what are sometimes referred to
> as subsolar and sublunar types of data. The download code was written
> using True BASIC.
>
> If you draw a line between the centers of the sun and the Earth
> then the place where that line crosses the surface of the Earth is the
> subsolar location. The sublunar location is the same type of thing.
> The SunGP program code is also available in Perl code, but not through
> any Web sites.
>
>
If this old program is to be translated or reused, do use this
opportunity to fix some bugs in the program.

The data file contains data for 1200 waves, but the program computes
results for 1212 waves. For waves 1201 to 1212, the program ends up
calculating results based on uninitialized data. Whether or not this
affects the validity of the final output results is something that
someone knowledgeable about the field of application has to judge.

-- mecej4





==============================================================================
TOPIC: writing fortran equivalent binary file using python
http://groups.google.com/group/comp.lang.python/t/af85223e3c4a7786?hl=en
==============================================================================

== 1 of 3 ==
Date: Thurs, Nov 14 2013 6:18 am
From: Oscar Benjamin


On 14 November 2013 00:53, Sudheer Joseph <sjo.india@gmail.com> wrote:
> My trial code with Python (data is read from file here)
>
> from netCDF4 import Dataset as nc
> import numpy as np
> XFIN=0.0,YFIN=-90.0,NREC=1461,DXIN=0.5;DYIN=0.5
> TITLE="NCMRWF 6HOURLY FORCING MKS"
> nf=nc('ncmrwf_uv.nc')
> ncv=nf.variables.keys()
> IWI=len(nf.variables[ncv[0]])
> JWI=len(nf.variables[ncv[1]])
> WDAY=nf.varlables[ncv[2]][0:NREC]
> U=nf.variables[ncv[3]][0:NREC,:,:]
> V=nf.variables[ncv[4]][0:NREC,:,:]
> bf=open('ncmrwf_uv.bin',"wb")
> f.write(TITLE)
> f.write(IWI,JWI,XFIN,YFIN,DXIN,DYIN,NREC,WDAY)
> for i in np.arange(0,NREC):
> f.write(U[i,:,:],V[i,:,:])
> f.close()
>
> But the issue is that f.write do not allow multiple values( it allows one by one so throws an error with above code ) on same write statement like in the fortran code. experts may please advice if there a solution for this?

Can you just call write twice? e.g.:

f.write(U[i,:,:])
f.write(V[i,:,:])


Oscar




== 2 of 3 ==
Date: Thurs, Nov 14 2013 6:35 am
From: Sudheer Joseph


Thank you,
But it wont allow to write it in unformatted way so
that the fortran code can read

with

open(11,file="input.bin")
read(11) IWI,JWI,XFIN,YFIN,DXIN,DYIN,NREC,WDAY

with best regards,
sudheer


On Thu, Nov 14, 2013 at 7:48 PM, Oscar Benjamin
<oscar.j.benjamin@gmail.com>wrote:

> On 14 November 2013 00:53, Sudheer Joseph <sjo.india@gmail.com> wrote:
> > My trial code with Python (data is read from file here)
> >
> > from netCDF4 import Dataset as nc
> > import numpy as np
> > XFIN=0.0,YFIN=-90.0,NREC=1461,DXIN=0.5;DYIN=0.5
> > TITLE="NCMRWF 6HOURLY FORCING MKS"
> > nf=nc('ncmrwf_uv.nc')
> > ncv=nf.variables.keys()
> > IWI=len(nf.variables[ncv[0]])
> > JWI=len(nf.variables[ncv[1]])
> > WDAY=nf.varlables[ncv[2]][0:NREC]
> > U=nf.variables[ncv[3]][0:NREC,:,:]
> > V=nf.variables[ncv[4]][0:NREC,:,:]
> > bf=open('ncmrwf_uv.bin',"wb")
> > f.write(TITLE)
> > f.write(IWI,JWI,XFIN,YFIN,DXIN,DYIN,NREC,WDAY)
> > for i in np.arange(0,NREC):
> > f.write(U[i,:,:],V[i,:,:])
> > f.close()
> >
> > But the issue is that f.write do not allow multiple values( it allows
> one by one so throws an error with above code ) on same write statement
> like in the fortran code. experts may please advice if there a solution for
> this?
>
> Can you just call write twice? e.g.:
>
> f.write(U[i,:,:])
> f.write(V[i,:,:])
>
>
> Oscar
>



--
with best regards

Sudheer

**********************************************************************************
Dr. Sudheer Joseph

Scientist

INDIAN NATIONAL CENTRE FOR OCEAN INFORMATION SERVICES (INCOIS)
MINISTRY OF EARTH SCIENCES, GOVERNMENT OF INDIA
"OCEAN VALLEY" PRAGATHI NAGAR (BO)
OPP.JNTU, NIZAMPET SO
Andhra Pradesh, India. PIN- 500 090.
TEl:+91-40-23044600(R),Tel:+91-9440832534(Mobile)
Tel:+91-40-23886047(O),Fax:+91-40-23892910(O)
E-mail: sudheer.joseph@yahoo.com; sjo@incois.gov.in.
Web- http://oppamthadathil.tripod.com
--------------* ---------------
"The ultimate measure of a man is
not where he stands in moments of
comfort and convenience, but where
he stands at times of challenge and
controversy."
Martin Luther King, Jr.
"What we have done for ourselves alone dies with us.
What we have done for others and the world remains and is immortal."
- Albert Pines




== 3 of 3 ==
Date: Thurs, Nov 14 2013 6:46 am
From: Antoon Pardon


Op 14-11-13 01:53, Sudheer Joseph schreef:
> Hi,
> I need to write a binary file exactly as written by fortran code below to be read by another code which is part of a model which is not advisable to edit.I would like to use python for this purpose as python has mode flexibility and easy coding methods.
>
> character(40) :: TITLE="122322242"
> integer :: IWI,JWI
> real :: XFIN,YFIN,DXIN=0.5,DYIN=0.5,WDAY(6000)
> XFIN=0.0,YFIN=-90.0,NREC=1461,DXIN=0.5;DYIN=0.5;IWI=720;JWI=361
> real,allocatable,dimension(:,:,:) :: VAR1_VAL
> real,allocatable,dimension(:,:,:) :: VAR2_VAL
>
> open(11,file=outf,form='UNFORMATTED')
> WRITE(11) TITLE
> WRITE(11) NX,NY,XFIN,YFIN,DXIN,DYIN,NREC,WDAY
> write(*,'(A10,2f10.3)') "START=",VAR1_VAL(1,1,1),VAR2_VAL(1,1,1)
> write(*,'(A10,2f10.3)') "END=",VAR1_VAL(nx,ny,nrec),VAR2_VAL(nx,ny,nrec)
> do i=1,NREC
> WRITE(11) VAR1_VAL(:,:,i),VAR2_VAL(:,:,i)
> WRITE(*,'(2I10,f10.3)') NX,NY,WDAY(i)
> enddo
>
> My trial code with Python (data is read from file here)
>
> from netCDF4 import Dataset as nc
> import numpy as np
> XFIN=0.0,YFIN=-90.0,NREC=1461,DXIN=0.5;DYIN=0.5
> TITLE="NCMRWF 6HOURLY FORCING MKS"
> nf=nc('ncmrwf_uv.nc')
> ncv=nf.variables.keys()
> IWI=len(nf.variables[ncv[0]])
> JWI=len(nf.variables[ncv[1]])
> WDAY=nf.varlables[ncv[2]][0:NREC]
> U=nf.variables[ncv[3]][0:NREC,:,:]
> V=nf.variables[ncv[4]][0:NREC,:,:]
> bf=open('ncmrwf_uv.bin',"wb")
> f.write(TITLE)
> f.write(IWI,JWI,XFIN,YFIN,DXIN,DYIN,NREC,WDAY)
> for i in np.arange(0,NREC):
> f.write(U[i,:,:],V[i,:,:])
> f.close()
>
> But the issue is that f.write do not allow multiple values( it allows > one by one so throws an error with above code ) on same write statement
> like in the fortran code. experts may please advice if there a solution for this?

That is not the main issue. The python write only works with bytes or
strings, not with floats or ints. So you will have to convert your
numbers using struct. So the question is if you know the byte layout
fortran uses and if you can replicate it with the struct module.

--
Antoon Pardon





==============================================================================
TOPIC: Invalid syntax with print "Hello World"
http://groups.google.com/group/comp.lang.python/t/7f0ce0366a7cd81c?hl=en
==============================================================================

== 1 of 2 ==
Date: Thurs, Nov 14 2013 7:05 am
From: johannes.gunz97@gmail.com


Am Donnerstag, 12. März 2009 07:57:11 UTC+1 schrieb Henrik Bechmann:
> obviously total mewbiew:
>
> My first program in Python Windows
>
> print "Hello World"
>
> I select Run/Run Module and get an error:
>
> Syntax error, with the closing quote highlighted.
>
> Tried with single quotes as well. Same problem.
>
> Can someone explain my mistake?
>
> Thanks,
>
> - Henrik

thanx




== 2 of 2 ==
Date: Thurs, Nov 14 2013 8:41 am
From: unknown


On Thu, 14 Nov 2013 07:05:08 -0800, johannes.gunz97 wrote:

> Am Donnerstag, 12. März 2009 07:57:11 UTC+1 schrieb Henrik Bechmann:
>> obviously total mewbiew:
>>
>> My first program in Python Windows
>>
>> print "Hello World"
>>
>> I select Run/Run Module and get an error:
>>
>> Syntax error, with the closing quote highlighted.
>>
>> Tried with single quotes as well. Same problem.
>>
>> Can someone explain my mistake?
>>
>> Thanks,
>>
>> - Henrik
>
> thanx

which version of python?
if V3.X then you need print ('Hello World')
as print has changed from a statement to a function.





==============================================================================
TOPIC: @gmail.com accounts put on hold
http://groups.google.com/group/comp.lang.python/t/6fc28709ca8aa2db?hl=en
==============================================================================

== 1 of 2 ==
Date: Thurs, Nov 14 2013 7:05 am
From: Tim Golden


Several people have reported Mailman messages notifying them of their
subscription being suspended because of bounces.

The notifications are pukka and appear to have resulted from a reaction
by Google's mail servers to messages via this list from an invalid
address at a valid domain.

The Mailman admins have implemented a workaround and have attempted to
reactivate all gmail accounts. Please check your susbcription per the
notification email. If you have any problems, drop a line to
python-list-owner@python.org.

(With thanks to Ralf Hildebrandt who's done all the legwork...)

TJG




== 2 of 2 ==
Date: Thurs, Nov 14 2013 8:07 am
From: Matty Sarro


Whew, thank you for your hard work.
I was really worried I would stop getting emails about Islam, Hacking
Databases, and the Ruby Community ;)

Kidding, kidding. Great job with the fast workaround!


On Thu, Nov 14, 2013 at 10:05 AM, Tim Golden <mail@timgolden.me.uk> wrote:

> Several people have reported Mailman messages notifying them of their
> subscription being suspended because of bounces.
>
> The notifications are pukka and appear to have resulted from a reaction
> by Google's mail servers to messages via this list from an invalid
> address at a valid domain.
>
> The Mailman admins have implemented a workaround and have attempted to
> reactivate all gmail accounts. Please check your susbcription per the
> notification email. If you have any problems, drop a line to
> python-list-owner@python.org.
>
> (With thanks to Ralf Hildebrandt who's done all the legwork...)
>
> TJG
> --
> https://mail.python.org/mailman/listinfo/python-list
>





==============================================================================
TOPIC: pypy and ctypes
http://groups.google.com/group/comp.lang.python/t/ae520cf0ce5d6e6b?hl=en
==============================================================================

== 1 of 1 ==
Date: Thurs, Nov 14 2013 7:13 am
From: Neil Cerutti


On 2013-11-14, Peter Chant <pete@petezilla.co.uk> wrote:
> Or is it that - if I keep the code as simple as possible, PyPy
> is about as fast as you can get?

PyPy profiles your code as it runs and creates, using a
just-in-time compiler, highly optimized versions of frequently
run sections. You don't have to declare types or even think about
it; The scheme will work best with code that runs for a
significant amount of time.

cython allows you to declare types, and attempts to create more
efficient code *at compile time* using those type declaration.

Which approach will be better depends on how the code runs and
how clever you are at using cython.

PyPy isn't designed to speed up programs that run for a few
hundred milliseconds and then complete, though it might sometimes
work for that.

--
Neil Cerutti





==============================================================================
TOPIC: python 2.7.x on MacOSX: failed dlopen() on .so's
http://groups.google.com/group/comp.lang.python/t/f7c6dbd1573a9577?hl=en
==============================================================================

== 1 of 1 ==
Date: Thurs, Nov 14 2013 7:22 am
From: Paul Smith


On Wed, 2013-11-13 at 23:06 -0800, Ned Deily wrote:
> On Nov 13, 2013, at 17:24 , Paul Smith <paul@mad-scientist.net> wrote:
> > I'm discovering that this is tricky. I don't want to bring OS wars into
> > it, but this kind of thing is so simple and just works on GNU/Linux. I
> > guess I've been spoiled :-).
>
> Well, if you are building from scratch, you would likely run into some
> of the same issues on Linux systems, too. There are many variations
> in configurations that are mutually incompatible.

Possibly. However as long as you're using basic system libraries and
not higher-level stuff like GTK etc., you can compile on an older
version of Linux (say, Red Hat EL 5 or so) and the result will run
without any problems on pretty much any distribution, even the newest
ones: Red Hat, Ubuntu, Debian, Suse, etc. etc. We do this regularly,
for production code we ship to customers. About the only "basic"
libraries that cause problems are libssl/libcrypto... the openssl folks
just don't seem to care much about this issue.

> > I'm somewhat dreading my next effort after MacOS: the same thing, on
> > Windows :-/.
> >
> > And another task, which seems like it will be fun: building GDB on
> > MacOSX with Python support enabled...
>
> Keep in mind that on newer OS X releases, Apple no longer ships gcc or
> gdb. The standard compiler is clang and it has its own debuggers.

Yes, I'm aware. Very frustrating. We have a large set of specialized
macros, both in native GDB and in Python using GDB's extension, that are
invaluable for debugging our code. I'm not thrilled about the idea of
trying to get all that working in lldb as well. So we're going to stick
with GDB, building it ourselves, until it no longer works at all. At
that point we'll decide how to proceed.

> > Hm, that's an idea. I don't HAVE to build Python myself, actually, I
> > just need (a) it to be relocatable, and (b) to add these extra modules
> > to it so I can use it across systems without installing them
> > individually by hand.
>
> I'm not sure I know what you mean by "relocatable". Like the
> third-party package manager solutions, the python.org installers place
> the Pythons they install in fixed locations (under /Library/Frameworks
> with links from /usr/local/bin) but one that does not conflict with
> any system files, including the Apple-supplied system Pythons.

By relocatable I mean "runnable from any location"; i.e., not fixed. I
have a wrapper around the Python executable that can compute the correct
root directory and set any environment variables or add flags or
whatever might be needed.

Basically I have a large number of test systems and a set of test suites
that are all written in Python, and I need to be able to distribute the
same version of Python plus a specific set of additional modules across
all those systems to be sure they all have the same environment. Plus
the set of systems changes (new systems added/old ones removed)
regularly. I'm handling this by checking in the Python distribution
plus modules into a "tools" Git repository, then cloning it on each
system. However, I have no special privileges on these systems (so I
can't modify any system locations such as /usr/local) and I can't
control what user account will be running the tests (so the user's home
directory, where the tools repository is cloned, is not constant across
the systems).

I have this working on Linux with very little effort. Now I'm trying to
get the same result on MacOSX.






==============================================================================
TOPIC: Converting hex data to image
http://groups.google.com/group/comp.lang.python/t/cd9fa5a301bb7a61?hl=en
==============================================================================

== 1 of 2 ==
Date: Thurs, Nov 14 2013 7:32 am
From: Shyam Parimal Katti


I am implementing an authentication system(in Django) using LDAP as the
backend(django-auth-ldap). When we fetch the data from the LDAP server for
a particular valid user, the data associated with the user contains the
thumbnail photo in hex representation. E.x.:

[('CN=XX,OU=Users,OU=Accounts,DC=test,DC=com', {'msExchBlockedSendersHash':
['\xce'], 'mailNickname': ['test_user'], 'primaryGroupID': ['513'],
'logonCount': ['1021'], *thumbnailPhoto:
['\xef\xd8\xff\xe0\x00\x10JFIF\x00\x01\x01\x01\x00`\x00`\x00\x00\xff\xdb\x00C\x00\x08\x06\x06\x07\x06\x05\x08\x07\x07\x07\t\t\x08\n\x0c\x14\r\x0c.....']*......
]

How do I convert the hex data for an image to the actual image?

Any help would be greatly appreciated.


Thanks,
Shyam




== 2 of 2 ==
Date: Thurs, Nov 14 2013 8:18 am
From: Tim Golden


On 14/11/2013 15:32, Shyam Parimal Katti wrote:
> I am implementing an authentication system(in Django) using LDAP as the
> backend(django-auth-ldap). When we fetch the data from the LDAP server
> for a particular valid user, the data associated with the user contains
> the thumbnail photo in hex representation. E.x.:
>
> [('CN=XX,OU=Users,OU=Accounts,DC=test,DC=com',
> {'msExchBlockedSendersHash': ['\xce'], 'mailNickname': ['test_user'],
> 'primaryGroupID': ['513'], 'logonCount': ['1021'], *thumbnailPhoto:
> ['\xef\xd8\xff\xe0\x00\x10JFIF\x00\x01\x01\x01\x00`\x00`\x00\x00\xff\xdb\x00C\x00\x08\x06\x06\x07\x06\x05\x08\x07\x07\x07\t\t\x08\n\x0c\x14\r\x0c.....']*
> ...... ]
>
> How do I convert the hex data for an image to the actual image?

Well, the first few bytes suggest that it's a JPEG, so save the bytes as
"something.jpg" and there you have it: an actual image.

Alternatively, you could load it into PIL [1] / Pillow [2] and
manipulate it as you see fit...

TJG

[1] http://www.pythonware.com/products/pil/
[2] https://pypi.python.org/pypi/Pillow/







==============================================================================
TOPIC: Most discussion on comp.lang.python is about developing with Python
http://groups.google.com/group/comp.lang.python/t/0d22dd5dd221dc6d?hl=en
==============================================================================

== 1 of 1 ==
Date: Thurs, Nov 14 2013 8:13 am
From: Nobody


On Wed, 13 Nov 2013 15:35:56 -0500, bob gailer wrote:

> I joined a week or so ago.
>
> The subject line was copied from the description of comp.lang.python aka
> python-list@python.org.
>
> I am very disappointed to see so much energy and bandwidth going to
> conversations that bash individuals.
>
> Is there a moderator for this list?

"list"? As you have already noted, the mailing list is bi-directionally
gatewayed to a usenet group. The advantage of usenet is that anyone can
read or post without having to sign up. That's also its disadvantage.






==============================================================================
TOPIC: ogg2mp3 utility?
http://groups.google.com/group/comp.lang.python/t/67299dcf692ae43f?hl=en
==============================================================================

== 1 of 1 ==
Date: Thurs, Nov 14 2013 8:58 am
From: Tim Johnson


* Tim Johnson <tim@akwebsoft.com> [131113 17:06]:
> I've written an application that does some audio file conversions.
>
> I use mutagen for some of the mp3 file manipulation, but to convert
> ogg files to mp3 format I've been using subprocess to run the
> ogg2mp3 perl utility. (available from http://marginalhacks.com/) by
> David Madison.
>
> It's a "spot on" great app, but I would like to be able to "keep it
> all one codebase".
>
> Are there any python utility that anyone could recommend?

I've downloaded ogg2mp3.py (http://emptybits.com/ogg2mp3/ogg2mp3)
by Darren Stone http://bitmason.com, I've compared two
conversions.

Thus far, the perl utility produces a clearer playback, but I have
not yet played with the options available from the python script.

Both scripts rely on oggdec, ogginfo and lame.
On the mac available through macports, available on other *nixes as
well.

If anyone is interested, I'd welcome feedback on the python script
above and I will fiddle with it (not being an audio expert) to see
if I can get the playback improved.

I've looked at pymedia also. Have not tested it.

FYI.cheers

--
Tim
tim at tee jay forty nine dot com or akwebsoft dot com
http://www.akwebsoft.com, http://www.tj49.com





==============================================================================
TOPIC: Automation
http://groups.google.com/group/comp.lang.python/t/2cb5aaffece4c4a9?hl=en
==============================================================================

== 1 of 1 ==
Date: Thurs, Nov 14 2013 9:10 am
From: Mark Lawrence



On 14/11/2013 03:56, renato.barbosa.pim.pereira@gmail.com wrote:
> I apologize again for my bad english and any inconvenience that I have generated.
>

I do wish that people would stop apologising for poor English, it's an
extremely difficult language. IIRC there are eight different ways of
pronouncing the vowel combination au. Whatever happened to "There
should be one-- and preferably only one --obvious way to do it."? :)

--
Python is the second best programming language in the world.
But the best has yet to be invented. Christian Tismer

Mark Lawrence





==============================================================================

You received this message because you are subscribed to the Google Groups "comp.lang.python"
group.

To post to this group, visit http://groups.google.com/group/comp.lang.python?hl=en

To unsubscribe from this group, send email to comp.lang.python+unsubscribe@googlegroups.com

To change the way you get mail from this group, visit:
http://groups.google.com/group/comp.lang.python/subscribe?hl=en

To report abuse, send email explaining the problem to abuse@googlegroups.com

==============================================================================
Google Groups: http://groups.google.com/?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate