Re: Question Re urllib (Jeff James)

2013-12-16 Thread Jeff James
I'm not really receiving an "exception" other than those three sites, out of the 30 or so I have listed, are the only sites which show "is down" at the end of that line specifying the site. Where " # " has been substituted for our domain name https://my..com/intranet.html* is down* ht

Re: [newbie] trying socket as a replacement for nc

2013-12-16 Thread Chris Angelico
On Mon, Dec 16, 2013 at 11:38 PM, 8 Dihedral wrote: > It is trivial to use UDP with > forward error correction such as > the CD in 1982. This is another reason for moving to IPv6. With IPv4, the size of a datagram is limited to 64KB, but with IPv6, you could carry an entire CD's contents in a

Re: Wrapping around a list in Python.

2013-12-16 Thread Dave Angel
On Sun, 15 Dec 2013 21:26:49 -0800 (PST), shengjie.sheng...@live.com wrote: The idea is to grab the last 4 elements of the array. However i have an array that contains a few hundred elements in it. And the values continues to .append over time. How would i be able to display the last 4 elements

Re: Wrapping around a list in Python.

2013-12-16 Thread David Robinow
On Mon, Dec 16, 2013 at 12:26 AM, wrote: > The idea is to grab the last 4 elements of the array. However i have an array > that contains a few hundred elements in it. And the values continues to > .append over time. How would i be able to display the last 4 elements of the > array under such a

Re: [newbie] trying socket as a replacement for nc

2013-12-16 Thread 88888 Dihedral
On Friday, December 13, 2013 5:58:49 AM UTC+8, Chris Angelico wrote: > On Fri, Dec 13, 2013 at 8:27 AM, Dan Stromberg wrote: > > > On Thu, Dec 12, 2013 at 6:16 AM, Grant Edwards > > wrote: > > > > > >>> Sockets reserve the right to split one socket.send() into multiple > > >>> socket.recv()'

Re: min max from tuples in list

2013-12-16 Thread Chris Angelico
On Sun, Dec 15, 2013 at 2:41 PM, Tim Roberts wrote: > Dennis Lee Bieber wrote: >> >>> >>>Well "performant" is performant enough for the purposes of communicating >>>on the python list I think :D >> >> Most probably could figure it out as being stylistically similar to >>"conformant", which

Re: [newbie] trying socket as a replacement for nc

2013-12-16 Thread Jean-Michel Pichavant
> Here is the code: > #!/usr/bin/env python > import telnetlib > host = '10.128.59.63' > port = 7000 > t = Telnet(host, port) > t.write('*IDN?\n') > print t.read_until('Whateverprompt') > # you can use read_very_eager also > > and this is the result of executing the code(from which I deduce I > ha

Re: Question RE urllib

2013-12-16 Thread Tim Chase
On 2013-12-16 04:40, Jeff James wrote: > These sites do not require a logon in order for the home > page to come up. Could this be due to some port being blocked > internally ? Only one of the sites reporting as down is "https" but > all are internal sites. Is there some other component I should

Re: GUI:-please answer want to learn GUI programming in python , how should i proceed.

2013-12-16 Thread Chris Angelico
On Mon, Dec 16, 2013 at 8:42 PM, Mark Lawrence wrote: > I've done the latter, but still can't fit all the data for my 100+ screens > into a one liner, help please :) With 100 screens, you should be able to use lines of text up to 8000 characters long - just make sure your screens are organized ho

Re: Question RE urllib

2013-12-16 Thread Larry Martell
On Mon, Dec 16, 2013 at 6:40 AM, Jeff James wrote: > So I'm using the following script to check our sites to make sure they are > all up and some of them are reporting they are "down" when, in fact, they > are actually up. These sites do not require a logon in order for the home > page to come u

Question RE urllib

2013-12-16 Thread Jeff James
So I'm using the following script to check our sites to make sure they are all up and some of them are reporting they are "down" when, in fact, they are actually up. These sites do not require a logon in order for the home page to come up. Could this be due to some port being blocked internally

Re: Python, mySQL and password

2013-12-16 Thread Ervin Hegedüs
Hello Peter, On Mon, Dec 16, 2013 at 12:38:33PM +0100, Peter Otten wrote: > Ervin Hegedüs wrote: > > > dsn['passwd'] = raw_input("Enter password for %s: " % (dsn['user'])) > > [...] > > but at this way the password what you type will showing! > > To avoid that use getpass.getpass() instead of

Re: [newbie] trying socket as a replacement for nc

2013-12-16 Thread Jean Dubois
Op maandag 16 december 2013 11:29:12 UTC+1 schreef Jean-Michel Pichavant: > > > Such equipment often implements a telnet protocol. Have use try > > > using the telnetlib module ? > > > http://docs.python.org/2/library/telnetlib.html > > > > > > t = Telnet(host, port) > > > t.write('*IDN?') > > > pr

Re: Launching Helium: A Selenium wrapper that makes web automation 50% easier

2013-12-16 Thread Larry Martell
On Mon, Dec 16, 2013 at 5:17 AM, Michael Herrmann wrote: > Hi everyone, > > I'm working for a startup called BugFree Software and would like to announce > that today we're launching our second product! > > Helium is a library that wraps around Selenium to simplify web automation. It > does away

Re: Python, mySQL and password

2013-12-16 Thread Peter Otten
Ervin Hegedüs wrote: > Hello, > > On Mon, Dec 16, 2013 at 02:55:29AM -0800, Igor Korot wrote: >> Hi, ALL, >> Is there a way to make python script that connects to mySQL DB ask for >> a password on the: >> >> conn = mdb.connect(host, user) >> >> line. >> The host variable is "localhost" and the

Packaging a private project

2013-12-16 Thread Nicholas Cole
Dear List, What is the best way to distribute a private, pure python, Python 3 project that needs several modules (some available on pypi but some private and used by several separate projects) in order to run? I'd like to include everything that my project needs to run in a single package. The

Re: Python, mySQL and password

2013-12-16 Thread Ervin Hegedüs
Hello, On Mon, Dec 16, 2013 at 02:55:29AM -0800, Igor Korot wrote: > Hi, ALL, > Is there a way to make python script that connects to mySQL DB ask for > a password on the: > > conn = mdb.connect(host, user) > > line. > The host variable is "localhost" and the user variable is "root" (for > devel

Python, mySQL and password

2013-12-16 Thread Igor Korot
Hi, ALL, Is there a way to make python script that connects to mySQL DB ask for a password on the: conn = mdb.connect(host, user) line. The host variable is "localhost" and the user variable is "root" (for developmental purposes). Thank you. -- https://mail.python.org/mailman/listinfo/python-li

Re: [newbie] trying socket as a replacement for nc

2013-12-16 Thread Jean-Michel Pichavant
> Did you try > > import telnetlib > > ? > > Note that in the code above I forgot the EOF, which is very much > dependent of the equipment itself. > > You may have to write > t.write('*IDN?\n') > or > t.write('IDN?\n\r') > > JM Additionally, here's the code we're using for our signal generat

Re: [newbie] trying socket as a replacement for nc

2013-12-16 Thread Jean-Michel Pichavant
> > Such equipment often implements a telnet protocol. Have use try > > using the telnetlib module ? > > http://docs.python.org/2/library/telnetlib.html > > > > t = Telnet(host, port) > > t.write('*IDN?') > > print t.read_until('Whateverprompt') > > # you can use read_very_eager also > > > > JM > >

Launching Helium: A Selenium wrapper that makes web automation 50% easier

2013-12-16 Thread Michael Herrmann
Hi everyone, I'm working for a startup called BugFree Software and would like to announce that today we're launching our second product! Helium is a library that wraps around Selenium to simplify web automation. It does away with many of the technicalities involved with web scripting. For exam

Re: Wrapping around a list in Python.

2013-12-16 Thread Denis McMahon
On Mon, 16 Dec 2013 15:59:32 +1100, Ben Finney wrote: > shengjie.sheng...@live.com writes: > >> Hi guys, I am trying to create a fixed list which would allow my values >> to be wrapped around it. > > This doesn't make a lot of sense to me, but I assume you have a purpose > in mind for this. What

Re: [newbie] trying socket as a replacement for nc

2013-12-16 Thread Ervin Hegedüs
hello, > #!/usr/bin/env python > > """ > A simple echo client > """ > import socket as socket_mod > import bufsock as bufsock_mod [...] > Traceback (most recent call last): > File "./buftest.py", line 11, in > socket = socket_mod.socket(socket.AF_INET, socket.SOCK_STREAM) > NameError: name

Re: Want guidance to set proxy please help

2013-12-16 Thread Denis McMahon
On Sun, 15 Dec 2013 20:29:55 -0800, Jai wrote: > so , i need some step to set proxy so that my ip is not blocked by them This sounds like you're attempting to access a site other than for legitimate purposes. You probably want some 1337 script kiddies forum, not a serious programming newsgroup

Re: Comparing values of counter in python 3.3

2013-12-16 Thread Devin Jeanpierre
On Sun, Dec 15, 2013 at 6:32 PM, rusi wrote: > On Monday, December 16, 2013 7:29:31 AM UTC+5:30, alex23 wrote: >> > # Need to compare values of counter and reject in function/routine in >> > value in counter2 is higher then value in counter1 for a current key > >> [(k,Counter2[k]) for k in C

Re: [newbie] trying socket as a replacement for nc

2013-12-16 Thread Jean Dubois
Op donderdag 12 december 2013 22:23:22 UTC+1 schreef Dan Stromberg: > On Thu, Dec 12, 2013 at 12:28 AM, Jean Dubois wrote: > > On Thursday, December 12, 2013 12:20:36 AM UTC+1, Dan Stromberg wrote: > >> On Wed, Dec 11, 2013 at 3:08 PM, Jean Dubois wrote: > >> > >> I have an ethernet-rs232 adapter

Re: GUI:-please answer want to learn GUI programming in python , how should i proceed.

2013-12-16 Thread Mark Lawrence
On 16/12/2013 05:08, Chris Angelico wrote: On Mon, Dec 16, 2013 at 3:51 PM, Michael Torrie wrote: I think Python is a great overall application development language, especially for the GUI. First-class functions for callbacks make it very nice compared to other languages. Python is fast enou

Re: Wrapping around a list in Python.

2013-12-16 Thread Mark Lawrence
On 16/12/2013 05:10, shengjie.sheng...@live.com wrote: On Monday, 16 December 2013 13:07:46 UTC+8, shengjie...@live.com wrote: Would you please read and action this https://wiki.python.org/moin/GoogleGroupsPython to prevent us seeing double line spacing, thanks. -- My fellow Pythonistas, a

Re: Need Help with the BeautifulSoup problem, please

2013-12-16 Thread Peter Otten
seasp...@gmail.com wrote: > I need to replace all tag with after ■. But the result from > below is '■ D / ' > Can you explain what I did wrong, please. > > s = '■A B C D / ' > soup = BeautifulSoup(s) > for i in soup.find_all(text='■'): > tag = soup.new_tag('span')

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 with after ■. But the result from > > below is '■ D / ' > > > > > > Can you explain what I did wrong, please. > > > > > > > > > >

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 with after ■. But the result frombelow is '■ D / ' Can you explain what I did wrong, please. s = '■A B C D / ' soup = BeautifulSoup(s) for i in soup.find_all(text='■'): tag = soup.new_tag('span')

Re: New to Python, Help to get script working?

2013-12-16 Thread Mark Lawrence
On 16/12/2013 08:02, Mark wrote: The record for double spaced google crap, congratulations. Mind you, it's a great new game this, Spot the Text, much better than I Spy!!! On Monday, December 16, 2013 2:55:23 AM UTC-5, Mark wrote: On Monday, December 16, 2013 2:52:05 AM UTC-5, Mark wrote:

Re: Comparing values of counter in python 3.3

2013-12-16 Thread Mark Lawrence
On 16/12/2013 02:40, Roy Smith wrote: In article <905d6e7e-6748-42dd-8b63-d80a4d175...@googlegroups.com>, rusi wrote: On Monday, December 16, 2013 7:29:31 AM UTC+5:30, alex23 wrote: # Need to compare values of counter and reject in function/routine in value in counter2 is higher then value

Re: Wrapping around a list in Python.

2013-12-16 Thread Peter Otten
shengjie.sheng...@live.com wrote: > The idea is to grab the last 4 elements of the array. However i have an > array that contains a few hundred elements in it. And the values continues > to .append over time. How would i be able to display the last 4 elements > of the array under such a condition?

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 with after ■. But the result from below > is '■ D / ' > > Can you explain what I did wrong, please. > > > > s = '■A B C D / ' > > soup = BeautifulSoup(s) > > for i in soup.find_all(text='■'): > >

Re: New to Python, Help to get script working?

2013-12-16 Thread Frank Millman
"Mark" wrote in message news:4c2822b4-d95c-4735-af12-55ac5ff2f...@googlegroups.com... > On Monday, December 16, 2013 2:55:23 AM UTC-5, Mark wrote: > > If i just try to double click the script, i get an index error, i can > barely see the window it disappears so fast, but thats what I see. I ha

Re: GUI:-please answer want to learn GUI programming in python , how should i proceed.

2013-12-16 Thread Jeremy Sanders
Michael Torrie wrote: > I think PyQt is slowly being pushed aside in favor of PySide, which is > more license-friendly for use in closed or open projects. I would > recommend using PySide unless PyQt is a requirement for your project. That's not the impression I get from the PySide mailing lists

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 with after ■. But the result from below > is '■ D / ' > > Can you explain what I did wrong, please. > > > > s = '■A B C D / ' > > soup = BeautifulSoup(s) > > for i in soup.find

Re: New to Python, Help to get script working?

2013-12-16 Thread Mark
On Monday, December 16, 2013 2:55:23 AM UTC-5, Mark wrote: > On Monday, December 16, 2013 2:52:05 AM UTC-5, Mark wrote: > > > On Monday, December 16, 2013 2:48:56 AM UTC-5, Mark wrote: > > > > > > > On Monday, December 16, 2013 2:43:45 AM UTC-5, Mark wrote: > > > > > > > > > > > > > > >

Re: New to Python, Help to get script working?

2013-12-16 Thread Mark
On Monday, December 16, 2013 2:52:05 AM UTC-5, Mark wrote: > On Monday, December 16, 2013 2:48:56 AM UTC-5, Mark wrote: > > > On Monday, December 16, 2013 2:43:45 AM UTC-5, Mark wrote: > > > > > > > On Monday, December 16, 2013 2:09:38 AM UTC-5, Mark wrote: > > > > > > > > > > > > > > >

<    1   2