Sahil Chauhan | 7 Jul 04:16 2015
Picon

Pytest help

Hi,

I am trying to use py.test for writing some selenium webdriver tests. I
wrote my first test and
pytest is deselecting that test even though I didn't mark any test.

How can I resolve this issue?  Is there some default setting used by
py.test,

(qa)MacBook-Air:$  py.test tests/test_login.py
===========================================================================================
test session starts
===========================================================================================
platform darwin -- Python 2.7.6 -- pytest-2.2.4
collected 1 items

===============================================================================
*1 tests deselected by "-m 'nondestructive'" *
===============================================================================
======================================================================================
1 deselected in 0.01 seconds ==============

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

(Continue reading)

Suresh Nagulavancha | 6 Jul 15:55 2015
Picon

Variable reference

Hello everyone 
I want to know about the variables dereference
Code is in python 27
Let my variable be 
foo="hello python"
Print foo
del foo
What del command here actually doing , is it dereferencing or deleting the variable along with value it stored?

Thank you

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

Cary Developer | 6 Jul 16:24 2015
Picon

python help

I am looking for help on getting started with Python.  This link says it
all:

http://raleigh.craigslist.org/cpg/5108772711.html

Any help (and response to the CL post) would be truly appreciated.  Thanks.

-Roger

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

Crusier | 6 Jul 09:44 2015
Picon

String Problem

Dear All,

I have used the urllib.request and download some of the information from a
site.

I am currently using Python 3.4. My program is as follows:

import urllib.request

response = urllib.request.urlopen('
http://www.hkex.com.hk/eng/ddp/Contract_Details.asp?PId=175')

saveFile = open('HKEX.txt','w')
saveFile.write(str(response.read()))
saveFile.close()

And the result is as follows:

d align="right"> - </td><td align="right">0</td><td
align="right">8.56</td><td align="right">N/A</td><td
align="right">1</td></tr>\r\n\t\t\t\t\t\t\t\t<tr id="tr56"
class="tableHdrB1" align="center"><td align="centre">C Jul-15 -
23.00</td><td align="right"> - </td><td align="right"> - </td><td
align="right">0.01</td><td align="right"> - </td><td align="right"> -
</td><td align="right"> - </td><td align="right">0</td><td
align="right">0.01</td><td align="right">N/A</td><td
align="right">467</td></tr>\r\n\t\t\t\t\t\t\t\t<tr id="tr57"
class="tableHdrB2" align="center"><td align="centre">P Jul-15 -
23.00</td><td align="right"> - </td><td align="right"> - </td><td
align="right"> - </td><td align="right"> - </td><td align="right"> -
(Continue reading)

Paul | 4 Jul 06:05 2015
Picon

about real-time audio synthesis and algorithmic composition

Hi !
I'm a rookie to programming, and just graduated from a conservatory of music last year. I'm interested in
real-time audio synthesis and algorithmic composition, I can write a little bit SuperCollider and
Django. I just buy a book called "Python Programming for the Absolute Beginner" (Chinese version), and
try to learn Python via it.

I have a query, Is there have a way (e.g. import some library) to synthesis sound in Python as SuperCollider?
(synthesis sound via write some code in a file, and run it will hear the result immediately.)

I'm realy like Python's style, and want to learn Programming from Python. If I can learn it through
synthesis sound, I will be very happy. :-) In addition, I think if I can synthesis sound via Python Code, I
will have more chance to cooperate with other programer. :-) 

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

Jim Mooney Py3.4.3winXP | 3 Jul 02:39 2015
Picon

method conflict?

Okay, it appears the method in a class has its own ID, but all
instantiations of that method have identical IDs. But what happens if we
have a huge number of instantiations trying to access the identical method
at the same time?

class MyClass:
    def setdata(self, data):
        self.data = data
    def getdata(self):
        print(self.data)

>>> MyClass.setdata
<function MyClass.setdata at 0x026CACD8>
>>> id(MyClass.setdata)
40676568
>>> f = MyClass()
>>> g = MyClass()
>>> id(f.setdata)
43576616
>>> id(g.setdata)
43576616
>>> d = MyClass()
>>> id(d.setdata)
43576616

--

-- 
Jim
_______________________________________________
Tutor maillist  -  Tutor <at> python.org
To unsubscribe or change subscription options:
(Continue reading)

Jim Mooney Py3.4.3winXP | 2 Jul 21:30 2015
Picon

Are the methods in a class copied or just linked to?

When an instance uses a class method, does it actually use the method that
is in the class object's memory space, or is the method copied to the
instance?

--

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

megha garg | 1 Jul 08:11 2015
Picon

Problem in packages

Python version 2.7.10.
I have problem in installing .whl format packages.
what version of setuptools is required for .whl format packages.
I have installed Setuptools version 0.6.0 and upgraded pip to 7.0.3.
wndows 7 powershell 1.
I tried installing setuptools 18.0 but it is also in .whl format.
and installing wheel requires greater than 0.8 versions.
so how can i install setuptools and wheel to install .whl format packages.
please reply as soon as possible.
thanks
_______________________________________________
Tutor maillist  -  Tutor <at> python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Danny Yoo | 1 Jul 03:20 2015

Re: memory error

Please use reply to all: I'm currently not in front of a keyboard at the
moment.  Others on the mailing list should be able to help.
On Jun 30, 2015 6:13 PM, "Joshua Valdez" <jdv12 <at> case.edu> wrote:

> Hi Danny,
>
> So I tried that code snippet you pointed me too and I'm not getting any
> output.
>
> I tried playing around with the code and when I tried
>
> doc = etree.iterparse(wiki)
> for _, node in doc:
>   print node
>
> I get output like:
>
> <Element '{http://www.mediawiki.org/xml/export-0.10/}sitename' at
> 0x100602410>
> <Element '{http://www.mediawiki.org/xml/export-0.10/}dbname' at
> 0x1006024d0>
> <Element '{http://www.mediawiki.org/xml/export-0.10/}base' at 0x100602590>
> <Element '{http://www.mediawiki.org/xml/export-0.10/}generator' at
> 0x100602710>
> <Element '{http://www.mediawiki.org/xml/export-0.10/}case' at 0x100602750>
> <Element '{http://www.mediawiki.org/xml/export-0.10/}namespace' at
> 0x1006027d0>
> <Element '{http://www.mediawiki.org/xml/export-0.10/}namespace' at
> 0x100602810>
> <Element '{http://www.mediawiki.org/xml/export-0.10/}namespace' at
(Continue reading)

Joshua Valdez | 30 Jun 17:10 2015

memory error

So I wrote this script to go over a large wiki XML dump and pull out the
pages I want. However, every time I run it the kernel displays 'Killed' I'm
assuming this is a memory issue after reading around but I'm not sure where
the memory problem is in my script and if there were any tricks to reduce
the virtual memory usage.
Here is my code (I assume the problem is in the BeautifulSoup partition as
the pages file is pretty small.

from bs4 import BeautifulSoup
import sys

pages_file = open('pages_file.txt', 'r')

#Preprocessing
pages = pages_file.readlines()
pages = map(lambda s: s.strip(), pages)
page_titles=[]
for item in pages:
    item = ''.join([i for i in item if not i.isdigit()])
    item = ''.join([i for i in item if ord(i)<126 and ord(i)>31])
    item = item.replace(" ","")
    item = item.replace("_"," ")
    page_titles.append(item)

#####################################

with open(sys.argv[1], 'r') as wiki:
    soup = BeautifulSoup(wiki)
wiki.closed

(Continue reading)

Stephanie Quiles | 30 Jun 07:02 2015

GUI program

Hello, i am attempting to create a GUI program using Python 3.4. please see the pasted code below. Why is
nothing showing up? i am using Pycharm to run the program to see what it does and it says there are no errors
but it does not show me an output. please let me know where i am falling short on this. 

Thank you 

__author__ = 'stephaniequiles'

""" Write a GUI program that displays your name and address when a button is clicked. when the user clicks the
'show info' button, the
program should display your name and address, as shown in the sketch."""

import tkinter

class AddressGUI:
    def __init__(self):
        self.main_window = tkinter.Tk()

        self.top_frame= tkinter.Frame()
        self.mid_frame= tkinter.Frame()
        self.bottom_frame = tkinter.Frame()

        self.name_label= tkinter.Label(self.top_frame,\
                                         text='Steven Marcus')

        self.name_label.pack(side='left')

        self.value = tkinter.StringVar()
        self.address_label = tkinter.Label(self.mid_frame,\
                                           text='274 Baily Drive Waynesville, NC 27999')
(Continue reading)


Gmane