Re: need help with an accessibility prototype

2015-05-22 Thread Laura Creighton
In a message of Fri, 22 May 2015 12:29:20 -0400, Eric S. Johansson writes: 2 needs. first is determining if NaturallySpeaking injects keycodes or ascii char into the windows input queue. second is building a test widget to capture and display text. I think I can solve both of these by

Re: need help with an accessibility prototype

2015-05-22 Thread Eric S. Johansson
On 05/22/2015 03:50 PM, Laura Creighton wrote: In a message of Fri, 22 May 2015 12:29:20 -0400, Eric S. Johansson writes: 2 needs. first is determining if NaturallySpeaking injects keycodes or ascii char into the windows input queue. second is building a test widget to capture and display

Re: need help with an accessibility prototype

2015-05-22 Thread Albert-Jan Roskam via Python-list
- On Fri, May 22, 2015 9:50 PM CEST Laura Creighton wrote: In a message of Fri, 22 May 2015 12:29:20 -0400, Eric S. Johansson writes: 2 needs. first is determining if NaturallySpeaking injects keycodes or ascii char into the windows input queue. second is building

Re: need help with an accessibility prototype

2015-05-22 Thread Laura Creighton
You are most welcome, it was such a small thing. By the way http://www.tcl.tk/man/tcl8.4/TkCmd/keysyms.htm is a list of all the key symbols it is possible for you to get. There is no guarantee that any platform actually has any of them, just, if it is not there don't bother trying to look for it.

Re: need help with an accessibility prototype

2015-05-22 Thread Terry Reedy
On 5/22/2015 12:29 PM, Eric S. Johansson wrote: 2 needs. first is determining if NaturallySpeaking injects keycodes or ascii char into the windows input queue. second is building a test widget to capture and display text. I think I can solve both of these by building a simple text widget

need help with an accessibility prototype

2015-05-22 Thread Eric S. Johansson
2 needs. first is determining if NaturallySpeaking injects keycodes or ascii char into the windows input queue. second is building a test widget to capture and display text. I think I can solve both of these by building a simple text widget (tkinter? qt? ??) to capture keycodes. problem,

Re: need help with an accessibility prototype

2015-05-22 Thread MRAB
On 2015-05-22 17:29, Eric S. Johansson wrote: 2 needs. first is determining if NaturallySpeaking injects keycodes or ascii char into the windows input queue. second is building a test widget to capture and display text. ASCII? :-) I think I can solve both of these by building a simple text

Re: need help removing 'dev-r0' part from a python package

2015-04-19 Thread Ben Finney
sth@gmail.com writes: My package 'webpreview'[https://github.com/ludbek/webpreview] has new version '1.0.3'. I used 'sdist' to bundle it. I'll assume you are using a ‘./setup.py’ program to define and generate the distribution. The ‘setup’ function in that program takes a ‘version’

Re: need help removing 'dev-r0' part from a python package

2015-04-19 Thread suren shrestha
On Monday, April 20, 2015 at 10:00:26 AM UTC+5:45, Chris Angelico wrote: On Mon, Apr 20, 2015 at 1:57 PM, sth...@gmail.com wrote: My package 'webpreview'[https://github.com/ludbek/webpreview] has new version '1.0.3'. I used 'sdist' to bundle it. Unfortunately it names it

need help removing 'dev-r0' part from a python package

2015-04-19 Thread sth . srn
My package 'webpreview'[https://github.com/ludbek/webpreview] has new version '1.0.3'. I used 'sdist' to bundle it. Unfortunately it names it 'webpreview-1.0.3dev-r0.tar.gz' instead of 'webpreview-1.0.3.tar.gz' making it unsuitable to upload to pypi. What is causing sdist to append 'dev' stuff

Re: need help removing 'dev-r0' part from a python package

2015-04-19 Thread Chris Angelico
On Mon, Apr 20, 2015 at 1:57 PM, sth@gmail.com wrote: My package 'webpreview'[https://github.com/ludbek/webpreview] has new version '1.0.3'. I used 'sdist' to bundle it. Unfortunately it names it 'webpreview-1.0.3dev-r0.tar.gz' instead of 'webpreview-1.0.3.tar.gz' making it unsuitable

Drag and Drop Images in Python (NEED HELP!)

2015-01-01 Thread lucas mvm
Hi at all user! I used Tkinter and canvas to make a window and i added 2 transparent .png images. So when i start my programm it just shows the 2 images. I want to drag one image above the other image and than it will disappear. So I need help with drag and drop images heres my code if you want

Re: Drag and Drop Images in Python (NEED HELP!)

2015-01-01 Thread Terry Reedy
On 1/1/2015 7:36 PM, lucas mvm wrote: a different introduction to the same code posted 6 hours earlier. Read and study both of the answers already given about an hour after the first post. Ignoring them and reposting, with 'NEED HELP!' no less, is rude. I strongly suggest you do the exercise

Re: Need Help

2014-12-02 Thread Miki Tebeka
Greetings, I'm a beginner of python, I just want your help. We'll gladly do it, however you need to invest some time and write better questions :) See http://www.catb.org/esr/faqs/smart-questions.html How can I get the Failure values from the Console in to a txt or a csv file? We need more

I need Help

2014-12-01 Thread Ezhilarasan Chandrasekar
Hi Python-list Team, I'm a beginner of python, I just want your help. I'm using the Python in Pydev - Eclipse. How can I get the Failure values from the Console in to a txt or a csv file? And how can I get the final result of the TC (lets say, OK or FAIL or ERROR)? So that If I'm working with

Need Help

2014-12-01 Thread Ezhilarasan Chandrasekar
Hi Guys, I'm a beginner of python, I just want your help. I'm using the Python in Pydev - Eclipse. How can I get the Failure values from the Console in to a txt or a csv file? And how can I get the final result of the TC (lets say, OK or FAIL or ERROR)? So that If I'm working with 1000 Test

Fwd: Need Help

2014-12-01 Thread Ezhilarasan Chandrasekar
Hi Guys, I'm a beginner of python, I just want your help. I'm using the Python in Pydev - Eclipse. How can I get the Failure values from the Console in to a txt or a csv file? And how can I get the final result of the TC (lets say, OK or FAIL or ERROR)? So that If I'm working with 1000 Test

Re: Fwd: Need Help

2014-12-01 Thread alister
On Mon, 01 Dec 2014 18:41:27 +0530, Ezhilarasan Chandrasekar wrote: Hi Guys, I'm a beginner of python, I just want your help. I'm using the Python in Pydev - Eclipse. How can I get the Failure values from the Console in to a txt or a csv file? And how can I get the final result of

Re: Need Help

2014-12-01 Thread Fabio Zadrozny
On Mon, Dec 1, 2014 at 11:05 AM, Ezhilarasan Chandrasekar aezhi...@gmail.com wrote: Hi Guys, I'm a beginner of python, I just want your help. I'm using the Python in Pydev - Eclipse. How can I get the Failure values from the Console in to a txt or a csv file? And how can I get the

Re: Need help in pulling SQL query out of log file...

2014-10-14 Thread Sagar Deshmukh
and write it to another txt file.. Generally we encourage people to post what they've tried to the list. It helps us identify what you know and what you need help with. However, given: the log file may not be always same so can not make static choices... You'll probably

Need help in pulling SQL query out of log file...

2014-10-13 Thread Sagar Deshmukh
Hi, I have a log file which has lot of information like..SQL query.. number of records read...records loaded etc.. My requirement is i would like to read the SQL query completly and write it to another txt file.. also the log file may not be always same so can not make static choices... my

Re: Need help in pulling SQL query out of log file...

2014-10-13 Thread alex23
what they've tried to the list. It helps us identify what you know and what you need help with. However, given: the log file may not be always same so can not make static choices... You'll probably want to use regular expressions: https://docs.python.org/howto/regex.html Regexps let you

need help with this code please fix it or at least tell me what im doing wrong

2014-05-28 Thread funky
import pygame import random import time import sys black = (0, 0, 0) white = (255, 255, 255) red = (255, 0, 0) class Block(pygame.sprite.Sprite): def __init__(self, color, width, height): pygame.sprite.Sprite.__init__(self) self.image = pygame.Surface([width, height])

Re: need help with this code please fix it or at least tell me what im doing wrong

2014-05-28 Thread Gary Herron
On 05/28/2014 10:32 AM, funky wrote: 100+ lines of code removed. No way. This is not a paid service, but rather a community of Python users. You can get lots of help here, but you have to put in some work. Please take the time to tell us: What this code should do. What it actually

Re: need help with this code please fix it or at least tell me what im doing wrong

2014-05-28 Thread John Gordon
In 8bc01036-ee9e-4de9-b569-7039dcc05...@googlegroups.com funky benjaminherna...@gmail.com writes: What do you want the program to do? What is it doing instead? Do you get any error messages? Don't just throw code at us and ask us to fix it... -- John Gordon Imagine what it must be

Re: need help with this code please fix it or at least tell me what im doing wrong

2014-05-28 Thread Grant Edwards
On 2014-05-28, funky benjaminherna...@gmail.com wrote: [program that apparently doesn't work] I'll fix it for you. My rates are $150/hour with a 4-hour minimum paid up-front. -- Grant Edwards grant.b.edwardsYow! PUNK ROCK!! DISCO at

Re: need help with this code please fix it or at least tell me what im doing wrong

2014-05-28 Thread Ian Kelly
On Wed, May 28, 2014 at 11:32 AM, funky benjaminherna...@gmail.com wrote: while done == False: for event in pygame.event.get(): if event.type == pygame.QUIT: done == True Here is one fairly obvious bug; you used == where you presumably intended to do an assignment. As

Re: need help with this code please fix it or at least tell me what im doing wrong

2014-05-28 Thread Mark H Harris
On 5/28/14 12:32 PM, funky wrote: import pygame == a very good place to start import random import time import sys http://www.pygame.org/wiki/tutorials My hourly rate is $295.00 /hour, w/2hour minimum, happy to send you a contract of engagement and a copy of my document of

Need help with executing DB query in two different places in a test

2014-05-19 Thread Sunitha Byju
I am trying to automate an ecom website. I need to run DB query after placing each order. I don't know how to run different queries after each order. Can someone help me out with having queries after each order submission or test? If you notice, I'm calling self.database_verification() after

Re: Need help with executing DB query in two different places in a test

2014-05-19 Thread Tim Roberts
Sunitha Byju sunitha_b...@hotmail.com wrote: I am trying to automate an ecom website. I need to run DB query after placing each order. I don't know how to run different queries after each order. Can someone help me out with having queries after each order submission or test? Well, what's

Re: Need help to write data onto an XML file after reading data from another xml file

2014-05-14 Thread varun7rs
I try to add an edge with the source id and destination id over a loop but this is the error I am getting. And the range for the for addEdge is something I have no clue about. python export.py --output topology.xml --xml germany50.xml Traceback (most recent call last): File export.py, line

Re: Need help to write data onto an XML file after reading data from another xml file

2014-05-14 Thread Dave Angel
On 05/14/2014 02:49 AM, varun...@gmail.com wrote: I try to add an edge with the source id and destination id over a loop but this is the error I am getting. And the range for the for addEdge is something I have no clue about. python export.py --output topology.xml --xml germany50.xml

Re: Need help to write data onto an XML file after reading data from another xml file

2014-05-14 Thread varun7rs
That is a very descriptive post. Since its my first time programming I am not aware of many conventions that are being used to name classes. I tried to distinguish them by naming classes in caps. I borrowed some ideas from here and there to come up with the Approach_Read.py file. What I intend

Re: Need help to write data onto an XML file after reading data from another xml file

2014-05-14 Thread Chris Angelico
On Wed, May 14, 2014 at 11:42 PM, varun...@gmail.com wrote: Since its my first time programming I am not aware of many conventions that are being used to name classes. I tried to distinguish them by naming classes in caps. The most commonly followed naming conventions in Python are those

Need help to write data onto an XML file after reading data from another xml file

2014-05-13 Thread varun7rs
Hello Users, I am in dire need of your help. I have been working on this code for quite some time and it is making me restless. All I am trying to do is, 1. Read data from an xml file. Source: http://sndlib.zib.de/coredata.download.action?objectName=germany50format=xmlobjectType=network 2.

Re: Need help to write data onto an XML file after reading data from another xml file

2014-05-13 Thread Dave Angel
On 05/13/2014 10:31 AM, varun...@gmail.com wrote: Hello Users, I am in dire need of your help. I have been working on this code for quite some time and it is making me restless. All I am trying to do is, 1. Read data from an xml file. Source:

Hi. I want to create a script to read a file placed in a remote linux server using python..need help..?

2014-05-02 Thread Bhawani Singh
I have created the script till here .. import os os.chdir(/var/log) fd = open(t1.txt, r) for line in fd: if re.match((.*)(file1)(.*), line): print line, Output : file1 this script i ran on the linux server, but now i want to run this script from another linux

Re: Hi. I want to create a script to read a file placed in a remote linux server using python..need help..?

2014-05-02 Thread Denis McMahon
On Fri, 02 May 2014 12:55:18 -0700, Bhawani Singh wrote: I have created the script till here .. import os os.chdir(/var/log) fd = open(t1.txt, r) for line in fd: if re.match((.*)(file1)(.*), line): print line, Output : file1 this script i ran

Re: Hi. I want to create a script to read a file placed in a remote linux server using python..need help..?

2014-05-02 Thread Roy Smith
In article lk16di$854$1...@dont-email.me, Denis McMahon denismfmcma...@gmail.com wrote: Method b: Use telnet to login to your account on the other server, run the script. Ugh. I hope nobody is using telnet anymore. Passwords send in plain text over the network. Bad. All uses of telnet

need help in adding xlrd file to the dictionary.

2014-04-27 Thread uma mahesh
Hello guys, I am new to python scripting. I am trying to take data from excel sheet. To do this I understand that xlrd need to add to the dictionary. I was unable to do this. I have downloaded the file and stuck there. Please let me know how can I do this. tell me the procedure. Regards

Re: need help in adding xlrd file to the dictionary.

2014-04-27 Thread Steven D'Aprano
On Sun, 27 Apr 2014 00:16:41 -0700, uma mahesh wrote: Hello guys, I am new to python scripting. I am trying to take data from excel sheet. To do this I understand that xlrd need to add to the dictionary. I was unable to do this. I have downloaded the file and stuck there. Please let me

Need help in Python automation

2014-03-21 Thread Anil Kumar A
- Hi All, I work for an ISP. Currently we bought few switches and routers. Python is available in that switches. So I would like to write some scipts which I can run inside switch. I tried module 'os, system', but It is not executing

Re: Need help in Python automation

2014-03-21 Thread Adnan Sadzak
Hi, there should be manufacturer documentation or API. What switch do You use? Any other info? Cheers, Adnan On Fri, Mar 21, 2014 at 9:14 AM, Anil Kumar A 401a...@gmail.com wrote: - Hi All, I work for an ISP. Currently we bought

Re: Need help in writing some code so i can re-use it in every module or class

2014-03-01 Thread Roy Smith
In article mailman.7395.1393423618.18130.python-l...@python.org, Unix SA d.josh...@gmail.com wrote: Hello Experts, I have requirement, like i want to use below command in python script. command --username username --password password Command line arguments now my requirement is i

Need help in writing some code so i can re-use it in every module or class

2014-02-26 Thread Unix SA
Hello Experts, I have requirement, like i want to use below command in python script. command --username username --password password Command line arguments now my requirement is i want to write some class so i can re-use command --username username --password password part via importing as

Re: Need help in writing some code so i can re-use it in every module or class

2014-02-26 Thread Jean-Michel Pichavant
- Original Message - Hello Experts, I have requirement, like i want to use below command in python script. command --username username --password password Command line arguments now my requirement is i want to write some class so i can re-use command --username username

Need help with pushing technology ... and a bit more ...

2014-01-27 Thread Mario R. Osorio
Background: === We are studying the possibility of creating a system that will have the following entities: Customer(s) (appCustomer) Service Provider(s) (appProviders) and Manager(s) Server(s) appCustomers will have all appServices available to them and appServices will have at least

Re: Need Help with Programming Science Project

2014-01-27 Thread alex23
On 24/01/2014 8:05 PM, theguy wrote: I have a science project that involves designing a program which can examine a bit of text with the author's name given, then figure out who the author is if another piece of example text without the name is given. This sounds like exactly the sort of

Re: Need Help with Programming Science Project

2014-01-25 Thread Denis McMahon
On Fri, 24 Jan 2014 20:58:50 -0800, theguy wrote: I know. I'm kind of ashamed of the code, but it does the job I need it to up to a certain point OK, well first of all take a step back and look at the problem. You have n exemplars, each from a known author. You analyse each exemplar, and

Re: Need Help with Programming Science Project

2014-01-25 Thread Rustom Mody
On Saturday, January 25, 2014 8:12:20 PM UTC+5:30, Dennis Lee Bieber wrote: Heck, at the very least turn all those _99 variables into single lists The posted code looks like something from 1968 KK BASIC. Yes thats correct. My suggestion of data-files is a second step. A first

Need Help with Programming Science Project

2014-01-24 Thread theguy
I have a science project that involves designing a program which can examine a bit of text with the author's name given, then figure out who the author is if another piece of example text without the name is given. I so far have three different authors in the program and have already put in the

Re: Need Help with Programming Science Project

2014-01-24 Thread Peter Otten
theguy wrote: I have a science project that involves designing a program which can examine a bit of text with the author's name given, then figure out who the author is if another piece of example text without the name is given. I so far have three different authors in the program and have

Re: Need Help with Programming Science Project

2014-01-24 Thread bob gailer
On 1/24/2014 5:05 AM, theguy wrote: I have a science project that involves designing a program which can examine a bit of text with the author's name given, then figure out who the author is if another piece of example text without the name is given. I so far have three different authors in

Re: Need Help with Programming Science Project

2014-01-24 Thread Chris Angelico
On Sat, Jan 25, 2014 at 10:38 AM, bob gailer bgai...@gmail.com wrote: On 1/24/2014 5:05 AM, theguy wrote: I have a science project that involves designing a program which can examine a bit of text with the author's name given, then figure out who the author is if another piece of example text

Re: Need Help with Programming Science Project

2014-01-24 Thread Ben Finney
bob gailer bgai...@gmail.com writes: On 1/24/2014 5:05 AM, theguy wrote: I would post the code, but I don't know if it's fine to put it here, as it contains pieces from books. I do believe that would go against copyright laws. AFAIK copyright laws apply to reproducing something for

Re: Need Help with Programming Science Project

2014-01-24 Thread Terry Reedy
On 1/24/2014 7:34 PM, Chris Angelico wrote: On Sat, Jan 25, 2014 at 10:38 AM, bob gailer bgai...@gmail.com wrote: On 1/24/2014 5:05 AM, theguy wrote: I have a science project that involves designing a program which can examine a bit of text with the author's name given, then figure out who

Re: Need Help with Programming Science Project

2014-01-24 Thread Roy Smith
In article mailman.5959.1390611612.18130.python-l...@python.org, Ben Finney ben+pyt...@benfinney.id.au wrote: bob gailer bgai...@gmail.com writes: On 1/24/2014 5:05 AM, theguy wrote: I would post the code, but I don't know if it's fine to put it here, as it contains pieces from books.

Re: Need Help with Programming Science Project

2014-01-24 Thread kvxdelta
Alright. I have the code here. Now, I just want to note that the code was not designed to work quickly or be very well-written. It was rushed, as I only had a few days to finish the work, and by the time I wrote the program, I hadn't worked with Python (which I never had TOO much experience

Re: Need Help with Programming Science Project

2014-01-24 Thread Rustom Mody
On Saturday, January 25, 2014 8:12:41 AM UTC+5:30, kvxd...@gmail.com wrote: Alright. I have the code here. Now, I just want to note that the code was not designed to work quickly or be very well-written. It was rushed, as I only had a few days to finish the work, and by the time I wrote the

Re: Need Help with Programming Science Project

2014-01-24 Thread theguy
On Friday, January 24, 2014 7:06:55 PM UTC-8, Rustom Mody wrote: On Saturday, January 25, 2014 8:12:41 AM UTC+5:30, kvxd...@gmail.com wrote: Alright. I have the code here. Now, I just want to note that the code was not designed to work quickly or be very well-written. It was rushed, as I

Re: Need Help with Programming Science Project

2014-01-24 Thread Dave Angel
kvxde...@gmail.com Wrote in message: Alright. I have the code here. Now, I just want to note that the code was not designed to work quickly or be very well-written. It was rushed, as I only had a few days to finish the work, and by the time I wrote the program, I hadn't worked with Python

Re: Need Help with Programming Science Project

2014-01-24 Thread Gregory Ewing
theguy wrote: I so far have three different authors in the program and have already put in the example text but for some reason, the program always leans toward one specific author, Suzanne Collins, no matter what insane number I try to put in or how much I tinker with the coding. It's obvious

Re: Need Help with Programming Science Project

2014-01-24 Thread Gregory Ewing
theguy wrote: If I could get it to actually calculate the points for AUTHOR_SCOREBOARD properly, then all my problems would be solved. Have you tried getting it to print out the values it's getting for the scores, and comparing them with what you calculate by hand? -- Greg --

Re: Need help vectorizing code

2014-01-19 Thread Oscar Benjamin
On 18 January 2014 20:51, Kevin K richyoke...@gmail.com wrote: I have some code that I need help vectorizing. I want to convert the following to vector form, how can I? I want to get rid of the inner loop - apparently, it's possible to do so. X is an NxD matrix. y is a 1xD vector. def foo(X

Need help vectorizing code

2014-01-18 Thread Kevin K
I have some code that I need help vectorizing. I want to convert the following to vector form, how can I? I want to get rid of the inner loop - apparently, it's possible to do so. X is an NxD matrix. y is a 1xD vector. def foo(X, y, mylambda, N, D, epsilon): ... for j in xrange(D

Re: Need help vectorizing code

2014-01-18 Thread Joshua Landau
On 18 January 2014 20:51, Kevin K richyoke...@gmail.com wrote: def foo(X, y, mylambda, N, D, epsilon): ... for j in xrange(D): aj = 0 cj = 0 for i in xrange(N): aj += 2 * (X[i,j] ** 2) cj += 2 * (X[i,j] * (y[i] -

Re: Need help vectorizing code

2014-01-18 Thread Kevin K
UTC-8, Kevin K wrote: I have some code that I need help vectorizing. I want to convert the following to vector form, how can I? I want to get rid of the inner loop - apparently, it's possible to do so. X is an NxD matrix. y is a 1xD vector. def foo(X, y, mylambda, N, D, epsilon

Re: Need help vectorizing code

2014-01-18 Thread Peter Otten
Kevin K wrote: I have some code that I need help vectorizing. I want to convert the following to vector form, how can I? I want to get rid of the inner loop - apparently, it's possible to do so. X is an NxD matrix. y is a 1xD vector. def foo(X, y, mylambda, N, D, epsilon

Re: Need Help with the BeautifulSoup problem, please

2013-12-16 Thread 88888 Dihedral
On Monday, December 16, 2013 2:41:08 PM UTC+8, seas...@gmail.com wrote: I need to replace all tag b with span after ■. But the result from below is '■ span style=REPLACED/span / font/font' Can you explain what I did wrong, please. s = '■bA/b bB/b bC/b bD/b / font/font'

Re: Need Help with the BeautifulSoup problem, please

2013-12-16 Thread seaspeak
seas...@gmail.com於 2013年12月16日星期一UTC+8下午2時41分08秒寫道: I need to replace all tag b with span after ■. But the result from below is '■ span style=REPLACED/span / font/font' Can you explain what I did wrong, please. s = '■bA/b bB/b bC/b bD/b / font/font' soup =

Re: Need Help with the BeautifulSoup problem, please

2013-12-16 Thread Andreas Perstinger
On 16.12.2013 07:41, seasp...@gmail.com wrote: I need to replace all tag b with span after ■. But the result frombelow is '■ span style=REPLACED/span / font/font' Can you explain what I did wrong, please. s = '■bA/b bB/b bC/b bD/b / font/font' soup = BeautifulSoup(s) for i in

Re: Need Help with the BeautifulSoup problem, please

2013-12-16 Thread seaspeak
8 Dihedral於 2013年12月16日星期一UTC+8下午4時02分42秒寫道: On Monday, December 16, 2013 2:41:08 PM UTC+8, seas...@gmail.com wrote: I need to replace all tag b with span after ■. But the result from below is '■ span style=REPLACED/span / font/font' Can you explain what I did wrong, please.

Re: Need Help with the BeautifulSoup problem, please

2013-12-16 Thread Peter Otten
seasp...@gmail.com wrote: I need to replace all tag b with span after ■. But the result from below is '■ span style=REPLACED/span / font/font' Can you explain what I did wrong, please. s = '■bA/b bB/b bC/b bD/b / font/font' soup = BeautifulSoup(s) for i in

Need Help with the BeautifulSoup problem, please

2013-12-15 Thread seaspeak
I need to replace all tag b with span after ■. But the result from below is '■ span style=REPLACED/span / font/font' Can you explain what I did wrong, please. s = '■bA/b bB/b bC/b bD/b / font/font' soup = BeautifulSoup(s) for i in soup.find_all(text='■'): tag =

Re: Need help with file object

2013-12-13 Thread bob gailer
On 12/12/2013 11:29 PM, Unix SA wrote: ... With above prog I am getting error TypeError: coercing to Unicode: need sting or buffer, file found In future please copy and paste the entire traceback. It appears that you typed in just one line of it. In this case the line raising the exception

Need help with file object

2013-12-12 Thread Unix SA
Hello, I am facing some issue when copying or moving file f=open('/tmp/file1') s=open('/tmp/file2') for line in f: if 'match' not in line: s.write(line) import shutil shutil.move(s, f) With above prog I am getting error TypeError: coercing to Unicode: need sting or buffer, file found

Re: Need help with file object

2013-12-12 Thread Christopher Welborn
On 12/12/2013 10:29 PM, Unix SA wrote: Hello, I am facing some issue when copying or moving file f=open('/tmp/file1') s=open('/tmp/file2') for line in f: if 'match' not in line: s.write(line) import shutil shutil.move(s, f) With above prog I am getting error TypeError: coercing to

Re: Need help with file object

2013-12-12 Thread rusi
On Friday, December 13, 2013 9:59:25 AM UTC+5:30, Unix SA wrote: s=open('/tmp/file2') snipped s.write(line) Among other things you are missing a write mode (2nd optional argument to open) http://docs.python.org/2/tutorial/inputoutput.html#reading-and-writing-files --

Re: Need help with file object

2013-12-12 Thread John Gordon
In mailman.4047.1386908972.18130.python-l...@python.org Unix SA d.josh...@gmail.com writes: f=open('/tmp/file1') s=open('/tmp/file2') for line in f: if 'match' not in line: s.write(line) import shutil shutil.move(s, f) With above prog I am getting error TypeError: coercing to

Re: Need help with programming in python for class (beginner level)

2013-12-01 Thread Julio Schwarzbeck
On 11/29/2013 04:31 PM, farhan...@gmail.com wrote: It's for a school assignment. Basically, I need to roll 5 dies with 6 sides each. So basically, 6 random numbers. That part is easy. Then I need to add it up. Ok, done that. However, I also need to say something along the lines of your total

Need help with programming in python for class (beginner level)

2013-11-29 Thread farhanken
It's for a school assignment. Basically, I need to roll 5 dies with 6 sides each. So basically, 6 random numbers. That part is easy. Then I need to add it up. Ok, done that. However, I also need to say something along the lines of your total number was X. That's what I'm having trouble with. I

Re: Need help with programming in python for class (beginner level)

2013-11-29 Thread Johannes Findeisen
On Fri, 29 Nov 2013 16:31:21 -0800 (PST) farhan...@gmail.com wrote: print pThe total rolled was: number /p The above line is wrong. You did it right below: print pThanks for playing, + name + ./p print pYou bet the total would be at least + value + ./p Do this: print pThe total rolled

Re: Need help with programming in python for class (beginner level)

2013-11-29 Thread Eduardo A . Bustamante López
On Fri, Nov 29, 2013 at 04:31:21PM -0800, farhan...@gmail.com wrote: It's for a school assignment. Basically, I need to roll 5 dies with 6 sides each. So basically, 6 random numbers. That part is easy. Then I need to add it up. Ok, done that. However, I also need to say something along the

Re: Need help with programming in python for class (beginner level)

2013-11-29 Thread Johannes Findeisen
On Sat, 30 Nov 2013 01:38:36 +0100 Johannes Findeisen wrote: On Fri, 29 Nov 2013 16:31:21 -0800 (PST) farhan...@gmail.com wrote: print pThe total rolled was: number /p The above line is wrong. You did it right below: print pThanks for playing, + name + ./p print pYou bet the

Re: Need help with programming in python for class (beginner level)

2013-11-29 Thread Tim Chase
On 2013-11-29 16:31, farhan...@gmail.com wrote: It's for a school assignment. Thanks for the honesty--you'll get far more helpful useful replies because of that. :-) put them into a variable I called number but it seems to glitch out that variable is in any command other than print number.

Re: Need help with programming in python for class (beginner level)

2013-11-29 Thread Mark Lawrence
On 30/11/2013 00:49, Johannes Findeisen wrote: On Sat, 30 Nov 2013 01:38:36 +0100 Johannes Findeisen wrote: On Fri, 29 Nov 2013 16:31:21 -0800 (PST) farhan...@gmail.com wrote: print pThe total rolled was: number /p The above line is wrong. You did it right below: print pThanks for

Re: Need help with programming in python for class (beginner level)

2013-11-29 Thread Tim Chase
On 2013-11-30 00:59, Mark Lawrence wrote: Wrong again, or at least overengineered. print pThe total rolled was:, number, /p ^ You don't even need the spaces as print kindly does it for you :) but you could at least include the missing quotation

Re: Need help with programming in python for class (beginner level)

2013-11-29 Thread Mark Lawrence
On 30/11/2013 01:06, Tim Chase wrote: On 2013-11-30 00:59, Mark Lawrence wrote: Wrong again, or at least overengineered. print pThe total rolled was:, number, /p ^ You don't even need the spaces as print kindly does it for you :) but you could

Re: Need help with programming in python for class (beginner level)

2013-11-29 Thread Johannes Findeisen
On Sat, 30 Nov 2013 01:08:28 + Mark Lawrence wrote: On 30/11/2013 01:06, Tim Chase wrote: On 2013-11-30 00:59, Mark Lawrence wrote: Wrong again, or at least overengineered. print pThe total rolled was:, number, /p ^ You don't even

stuck at this from so much time,need help....please ..

2013-11-23 Thread Bhanu Karthik
data = sock.recv(RECV_BUFFER) username = str(sock.getpeername()) username = usernames[username] if command == /quit: print data sock.send(bye)

Re: stuck at this from so much time,need help....please ..

2013-11-23 Thread Chris Angelico
On Sun, Nov 24, 2013 at 9:15 AM, Bhanu Karthik bhanukarthik2...@gmail.com wrote: data = sock.recv(RECV_BUFFER) username = str(sock.getpeername()) username = usernames[username] if command == /quit:

Re: stuck at this from so much time,need help....please ..

2013-11-23 Thread Bhanu Karthik
On Saturday, 23 November 2013 14:23:08 UTC-8, Chris Angelico wrote: On Sun, Nov 24, 2013 at 9:15 AM, Bhanu Karthik bhanukarthik2...@gmail.com wrote: data = sock.recv(RECV_BUFFER) username = str(sock.getpeername()) username =

Re: stuck at this from so much time,need help....please ..

2013-11-23 Thread Chris Angelico
On Sun, Nov 24, 2013 at 9:29 AM, Bhanu Karthik bhanukarthik2...@gmail.com wrote: sorry its not command its data I miss wrote it here... Okay. Start by copying and pasting your actual code, and saying what you're doing to trigger it. If this is a stream socket (eg TCP), you have no way of

Re: stuck at this from so much time,need help....please ..

2013-11-23 Thread Bhanu Karthik
On Saturday, 23 November 2013 14:23:08 UTC-8, Chris Angelico wrote: On Sun, Nov 24, 2013 at 9:15 AM, Bhanu Karthik bhanukarthik2...@gmail.com wrote: data = sock.recv(RECV_BUFFER) username = str(sock.getpeername()) username =

Re: stuck at this from so much time,need help....please ..

2013-11-23 Thread Roy Smith
In article 8445e47e-7efe-4f37-9b40-db2896d58...@googlegroups.com, Bhanu Karthik bhanukarthik2...@gmail.com wrote: data = sock.recv(RECV_BUFFER) username = str(sock.getpeername()) username = usernames[username]

Re: stuck at this from so much time,need help....please ..

2013-11-23 Thread Chris Angelico
On Sun, Nov 24, 2013 at 9:33 AM, Bhanu Karthik bhanukarthik2...@gmail.com wrote: this is exact code.. it is not even entering the if ... I tried ( c= (data is '/quit')if c) when i print c ,its printing falseI dont understand what is happening...please help.. Again, please get off

Re: stuck at this from so much time,need help....please ..

2013-11-23 Thread Bhanu Karthik
On Saturday, 23 November 2013 14:37:09 UTC-8, Roy Smith wrote: In article 8445e47e-7efe-4f37-9b40-db2896d58...@googlegroups.com, Bhanu Karthik bhanukarthik2...@gmail.com wrote: data = sock.recv(RECV_BUFFER) username = str(sock.getpeername())

Re: stuck at this from so much time,need help....please ..

2013-11-23 Thread Chris Angelico
On Sun, Nov 24, 2013 at 9:39 AM, Bhanu Karthik bhanukarthik2...@gmail.com wrote: indentation is correct when I trying to paste it here,it is showing like it is unindented. That's because Google Groups mucks things up. Get a better client. ChrisA --

Re: stuck at this from so much time,need help....please ..

2013-11-23 Thread MRAB
On 23/11/2013 22:29, Bhanu Karthik wrote: On Saturday, 23 November 2013 14:23:08 UTC-8, Chris Angelico wrote: On Sun, Nov 24, 2013 at 9:15 AM, Bhanu Karthik bhanukarthik2...@gmail.com wrote: data = sock.recv(RECV_BUFFER) username = str(sock.getpeername())

Need help to sort out the below code...

2013-09-14 Thread mnishpsyched
Hello guys, i am new to programming and trying to solve this small coding: my purpose is to take in values from the user based on a menu provided for selection the output looks like this... please select from the following menu: 1. pizza 2. steak 3. pasta 4. burger type in any number from above

<    1   2   3   4   5   6   7   8   9   10   >