bw_dw | 24 Jan 23:49 2015
Picon

Re: Initiating an external email transmission

I apologize .... I should have known better than to have posted without
getting more info from the user.
Since then, I've discovered that simply sending someone a Py2ExE
executable is not sufficient.
A little more investigation about Py2EXE and I'm beginning to see it
requires both the executable file along with supportive files.
I loaded the executable with all of the supportive files in a win-7
laptop last night.
The error message was
urllib2.URLError: <urlopen error [Errno 11004] getaddrinfo failed>

I googled a little bit and got indicators...something having to do with
a proxy.
But that doesn't make any sense to me.
Getting something to work in Python is fairly easy.
Getting it to work as an executable in a different PC is something else
altogether.

Sorry for causing people frustration!! :-/
_______________________________________________
Tutor maillist  -  Tutor <at> python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

jarod_v6@libero.it | 23 Jan 12:47 2015
Picon

R: Re: Re: Re: Class learning

Thanks so much for clear explanation!!! So in this way work . 
In [38]: Test().x.__name__
Out[38]: 'x'
The decoratory proprerty dosen't help to create the class in fast way.. When 
it is advisable use  <at> property?

_______________________________________________
Tutor maillist  -  Tutor <at> python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

jarod_v6@libero.it | 23 Jan 11:26 2015
Picon

R: Re: Re: Class learning

This is the all code: http://pastebin.com/nYGEiXY4
I don't know well which i meas . I suppose it is the name  of the class (self.
__name__).  So  the  name  it is present.
it is correct?
thanks for the patience!
M.

>----Messaggio originale----
>Da: danny.yoo <at> gmail.com
>Data: 23/01/2015 11.08
>A: "jarod_v6 <at> libero.it"<jarod_v6 <at> libero.it>
>Cc: "Python Tutor Mailing List"<tutor <at> python.org>
>Ogg: Re: Re: [Tutor] Class learning
>
>On Fri, Jan 23, 2015 at 12:37 AM, jarod_v6 <at> libero.it <jarod_v6 <at> libero.it> 
wrote:
>> Thanks for the help and patience!
>> It is a function on the class so I suppose for read that function  list I
>> need self.steps Where I'm wrong?
>>  <at> property
>>         def steps(self):
>>                 return [
>>
>>                         self.trimmomatic,
>>                         self.merge_trimmomatic_stats,
>>                         self.star,
>>                         self.picard_sort_sam,
>>                         self.rnaseqc,
>>                         self.wiggle,
>>                         self.cufflinks,
(Continue reading)

jarod_v6@libero.it | 23 Jan 09:37 2015
Picon

R: Re: Class learning

Thanks for the help and patience!
It is a function on the class so I suppose for read that function  list I need self.steps Where I'm wrong?
 <at> property        def steps(self):                return [                                                self.trimmomatic,                        self.merge_trimmomatic_stats,                        self.star,                       
self.picard_sort_sam,                        self.rnaseqc,                        self.wiggle,                        self.cufflinks,                       
self.gq_seq_utils_exploratory_analysis_rnaseq                                        ]
_______________________________________________
Tutor maillist  -  Tutor <at> python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

dw | 23 Jan 04:09 2015

Initiating an external email transmission

I have a python script that I've created.
It logs into an online email service and sends out an email.
It works in my Linux box, and it works in my Windows 7 box.
I've also converted it with Py2EXE and it works as an executable in my
Win-7 box.

The issue is, I made it for someone else to use in his PC.
And its not working for him.
His system is Windows 7.
And I'm wondering if perhaps he has a firewall blocking it?
Its his personal laptop.
Any thoughts would be appreciated
==============================================================
here is the code with account info x'd out

#!/usr/bin/python
#this is a funky way of clearing the screen
for x in range(0, 20):
    print("\n")

#Use checkip.dynds.org to get IP address 
import urllib2
u = urllib2.urlopen('http://checkip.dyndns.org')
myIP = u.next()
print("The data returned is: \n%s"%myIP)

#Now we parse the returned string leaving only the IP address
temp=myIP.split('>')
getip=temp[6]
temp=getip.split('<')
(Continue reading)

jarod_v6@libero.it | 23 Jan 02:44 2015
Picon

Class learning

Dear All
How can gave the attributes __name__ to a function? 
class Foo(object):

     
    def __init__(self):
        steps = {}
        tmp = open("rnaseq.base.ini","rb")
        config.readfp(tmp)
        readsets = parse_illumina_readset_file("/home/mauro/Desktop/readset.csv")

    
     <at> property
    def steps(self):
        return [

            self.one,
            self.two,
            self.fmit,

            
        ]
    def one(self):
        a = 5
        return a
    def two(self):
        b = 5
        return b

    def fmit(self):
(Continue reading)

boB Stepp | 22 Jan 22:17 2015
Picon

Does the Python way of doing things have a definite preference for the structure and content of program file header comments?

And will this vary depending on whether a version control system is
being used or not? Or is the use of a version control system
considered to be highly recommended (if not mandatory)?

--

-- 
boB
_______________________________________________
Tutor maillist  -  Tutor <at> python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Danny Yoo | 22 Jan 19:45 2015

Fwd: Testing a string to see if it contains a substring

---------- Forwarded message ----------
From: dw <bw_dw <at> fastmail.fm>
Date: Thu, Jan 22, 2015 at 7:49 AM
Subject: Re: [Tutor] Testing a string to see if it contains a substring
To: Danny Yoo <dyoo <at> hashcollision.org>

Hi Danny.
Thanks for your email.
The number of elements could start out as up to 500.
But since they are short string elements, even that amount won't be a
problem for in-ram memory.
The eventual module is designed to ensure that the max elements count
will be kept at 53.
I'm playing with a module that will remove files that are created as
archives weekly.
Right now we have about 3 years and they are starting to eat up
hard-drive.
So I'm playing with a module that will remove the oldest files based on
their creation date.
And keep the max count of them to 52....(1 years worth of archives)

Thanks for the additional explanation of the search() returning a match
or None.

Many thanks my friend!!
Duane

On Wed, Jan 21, 2015, at 05:13 PM, Danny Yoo wrote:
> How large will your array be in production?
>
(Continue reading)

jarod_v6@libero.it | 22 Jan 17:11 2015
Picon

Class errors

Dear All,

I created a class that invoke  from another file another class
 I get an error that I do not understand: gobal name Job is not defined
However If I see the class imported I found the class Job.
Any suggestion or example on class invoke another class

#job,py
class Jobs:
    .....

#trial.py

from core.job import *
class Second:
    def __initi__:
        tp = open("/tmp/file.txt")

    def gus(self):
        tr = Job()

thanks so much!1

_______________________________________________
Tutor maillist  -  Tutor <at> python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Sydney Shall | 22 Jan 13:56 2015

Installing psutil 2.2.0-1 on Canopy Enthought

I use MAC OSX 10.9.5
Canopy Enthought python 2.7.6

I also use the Enthought Package Manager to keep my installation up-todate.

For about two weeks now, Canopy says that I need to install psutil 
2.2.0-1 instead of the currently installed version 2.1.1.
I appear to do that successfully, but the next day the Package manager 
says to install the updated psutil.

When I import psutil I get no error message.
And when I do:
psutil.__version__ , I get back '2.1.1', which is the old version, and I 
have just apparently succesfully udated the package.

What in fact is my problem? I simply want to update this package, and I 
cannot.

I do not know if this is the best Forum to get advice on this, but any 
guidance, including where else I might ask would be appreciated.
--

-- 
Sydney
_______________________________________________
Tutor maillist  -  Tutor <at> python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

dw | 21 Jan 19:14 2015

Testing a string to see if it contains a substring

Hello Python Friends.
I have a string array, called "line_array".

There may be up to 50 or more elements in the array.
So:
- line_array[1] may contain "01/04/2013  10:43 AM        17,410,217
DEV-ALL-01-04-13.rlc\n"
- line_array[2] may contain "01/25/2013  03:21 PM        17,431,230
DEV-ALL-01-25-2013.rlc\n"
- line_array[3] may contain "\n"

I want to retain all elements which are valid (i.e. contains a date
value xx/xx/xxxx)
So I'm using a regex search for the date value located at the start of
each element...this way

misc_int1 =
re.search(r'[0-9]{2}/[0-9]{2}/[0-9]{4}',line_array[x]).start()

This method works really well when the regex date characters are found.
It returns the value 0 to misc_int1 because the date regex starts at 0
position.
I was hoping the .start() method would return a -1 value for the
instance in which the regex search string is not found.
That way I could iterate through the elements and retain only the valid
ones.

However, the .start() method throws an error if the regex search string
is not found.

(Continue reading)


Gmane