Re: query

2021-09-19 Thread MRAB
On 2021-09-19 13:42, Shashwat Pandey wrote: -- Forwarded message - From: Date: Sun, Sep 19, 2021, 13:20 Subject: query To: Hello! I see you want to post a message to the Python List. We would be happy to help, but you must subscribe first: https://mail.python.org/mailman

Re: query

2021-09-19 Thread Mats Wichmann
On 9/19/21 06:42, Shashwat Pandey wrote: How to Fix Installation Error of PyAudio in VS Code ( Windows 32 Bit ) ?? Please Answer Me It's very essential to complete my concept digitalization system project. This comes up somewhat often - pyaudio has not released new binary installer pack

Re: Query windows event log with python

2019-03-29 Thread mons . sidus
lol cheeky as. server = 'x' # name of the target computer to get event logs source = 'x' # 'Application' # 'Security' hand = win32evtlog.OpenEventLog(server, source) flags = win32evtlog.EVENTLOG_BACKWARDS_READ | win32evtlog.EVENTLOG_SEQUENTIAL_READ total = win32evtlog.GetNumberOfEventLogRecords

Re: Query regarding python 2.7.11 release

2016-04-29 Thread Michael Selik
>From searching bugs.python.org, I see that issues referencing CVE-2014-7185, CVE-2013-1752, and CVE-2014-1912 have all been marked as closed. I don't see any issues referencing CVE-2014-4650 via Python's bug tracker, but did spot it on Red Hat's. It appears to be related to issue 21766 ( http://b

Re: Query regarding sys.stdout.write

2015-06-07 Thread Chris Angelico
On Mon, Jun 8, 2015 at 11:56 AM, Cameron Simpson wrote: > If you want do do this version portably, hook into the Python curses module > and get the result of curses.tigetstr('el'). If that returns None, the > terminal does not support clear-to-end-of-line and you should use the > spaces-overwrite

Re: Query regarding sys.stdout.write

2015-06-07 Thread Cameron Simpson
On 08Jun2015 10:18, Chris Angelico wrote: On Mon, Jun 8, 2015 at 7:17 AM, Sreenath Nair wrote: I have a general query about the following snippet: import os Import sys for each_dir in os.listdir("/home/tmpuser"): full_path = os.path.join("/home/tmpuser", each_dir) sys.stdout.write("\r

Re: Query regarding sys.stdout.write

2015-06-07 Thread Chris Angelico
On Mon, Jun 8, 2015 at 7:17 AM, Sreenath Nair wrote: > I have a general query about the following snippet: > > import os > Import sys > for each_dir in os.listdir("/home/tmpuser"): > full_path = os.path.join("/home/tmpuser", each_dir) > sys.stdout.write("\r%s" % full_path) > sys.stdout

Re: Query regarding sys.stdout.write

2015-06-07 Thread Cecil Westerhof
On Sunday 7 Jun 2015 23:17 CEST, Sreenath Nair wrote: > I have a general query about the following snippet: > > import os > Import sys > for each_dir in os.listdir("/home/tmpuser"): > full_path = os.path.join("/home/tmpuser", each_dir) > sys.stdout.write("\r%s" % full_path) > sys.stdout.flush() >

Re: Query regarding sys.stdout.write

2015-06-07 Thread Cameron Simpson
On 08Jun2015 02:47, Sreenath Nair wrote: I have a general query about the following snippet: import os Import sys for each_dir in os.listdir("/home/tmpuser"): full_path = os.path.join("/home/tmpuser", each_dir) sys.stdout.write("\r%s" % full_path) sys.stdout.flush() The snippet is a s

Re: Query on Python 3.2 and supported OpenSSL Versions

2015-05-25 Thread Simon Ward
On Mon, May 25, 2015 at 09:33:06AM +, Donal Duane wrote: > > Hi Python Users, > > I was hoping you might be able to assist me with a query: > > 2 Questions: > > > 1. Could Python 3.2, when compiled against OpenSSL 1.0.0j, be > affected by the poodle bug? > https://www.openssl.org/~bo

Re: Query on Python 3.2 and supported OpenSSL Versions

2015-05-25 Thread Chris Angelico
On Mon, May 25, 2015 at 7:33 PM, Donal Duane wrote: > > Hi Python Users, > > I was hoping you might be able to assist me with a query: > > 2 Questions: > > 1. Could Python 3.2, when compiled against OpenSSL 1.0.0j, be affected > by the poodle bug? https://www.openssl.org/~bodo/ssl-poodle.pd

Re: Query on Python Compiled source--Urgent

2013-10-14 Thread Alister
On Mon, 14 Oct 2013 13:41:35 +0800, chandan kumar wrote: > > Now my question is of there any issue with logging to excel it should > happen for the first test suite itself,but it occurs in either 2,3,4 or > 5 test suite. Some it runs without any issues. Logging to excel is probably a wrong thing

Re: Query on Python Compiled source--Urgent

2013-10-14 Thread Tim Golden
[Please post your answer below the previous reply, not above] [... snip most of original traceback ...] > File "C:\Python27\lib\site-packages\pyExcelerator\CompoundDoc.py", > line 554, in save > f = file(filename, 'wb') > IOError: [Errno 22] invalid mode ('wb') or filename: > '.\\TestResults

Re: Query on Python Compiled source--Urgent

2013-10-14 Thread chandan kumar
Hi, Yes ,its not actual logging module.Using pyexcelerator we are storing just test results to excel file.Each test suite has some 25-100 test cases.We are using unit test from python ,after completion of each test case the test result will be stored in excel file.Below is the sample resu

Re: Query on Python Compiled source--Urgent

2013-10-14 Thread chandan kumar
Hi, Yes ,its not actual logging module.Using pyexcelerator we are storing just test results to excel file. Each test suite has some 25-100 test cases.We are using unit test from python ,after completion of each test case the test result will be stored in excel file.Below is the sample result tha

Re: Query on Python Compiled source--Urgent

2013-10-14 Thread Tim Golden
On 14/10/2013 06:41, chandan kumar wrote: > I'm working on a python project for protocol testing.I need to provide > only python compiled source to our customer. > > Here are the steps followed to take python compiled from actual source. > 1.There are 5 different test suites under the project > 2.

Re: query from sqlalchemy returns AttributeError: 'NoneType' object

2013-05-02 Thread Dave Angel
On 05/02/2013 06:14 PM, karthik.sha...@gmail.com wrote: from pox.core import core import pox.openflow.libopenflow_01 as of import re import datetime You're mixing tabs and space, so all bets are off. No promise that the compiler will interpret the indentations the same way yo

Re: query from sqlalchemy returns AttributeError: 'NoneType' object

2013-05-02 Thread MRAB
On 02/05/2013 23:14, karthik.sha...@gmail.com wrote: [snip] class SourcetoPort(Base): "" __tablename__ = 'source_to_port' id = Column(Integer, primary_key=True) port_no

Re: Query windows event log with python

2013-01-14 Thread Tim Golden
On 13/01/2013 05:55, robey.lawre...@gmail.com wrote: > On Saturday, January 12, 2013 8:34:01 PM UTC+11, Tim Golden wrote: >> On 12/01/2013 06:09, email.addr...@gmail.com wrote: >> >>> I am looking to write a short program to query the windows event >> >>> log. >> >>> >> >>> It needs to ask the

Re: Query windows event log with python

2013-01-12 Thread robey . lawrence
On Saturday, January 12, 2013 8:34:01 PM UTC+11, Tim Golden wrote: > On 12/01/2013 06:09, email.addr...@gmail.com wrote: > > > I am looking to write a short program to query the windows event > > > log. > > > > > > It needs to ask the user for input for The event type (Critical, > > > Error, a

Re: Query windows event log with python

2013-01-12 Thread Tim Golden
On 12/01/2013 06:09, robey.lawre...@gmail.com wrote: I am looking to write a short program to query the windows event log. It needs to ask the user for input for The event type (Critical, Error, and Information), and the user needs to be able to specify a date since when they want to view result

Re: Query windows event log with python

2013-01-12 Thread alex23
On 12 Jan, 16:09, robey.lawre...@gmail.com wrote: > Hi, > > I am looking to write a short program to query the windows event log. > > It needs to ask the user for input for The event type (Critical, Error, and > Information), and the user needs to be able to specify a date since when they > want

Re: Query re language for running videos on TV

2012-12-26 Thread Chris Angelico
On Thu, Dec 27, 2012 at 3:35 PM, mjperreau wrote: > I am new to raspberry pi and am looking at coming up with a program with a > GUI menu for selecting saved videos onto HD TV. > > Can someone point me in the right direction please… Huh, sounds like the Yosemite Project, one of the first non-triv

Re: query regarding file handling.

2009-11-13 Thread Rhodri James
On Thu, 12 Nov 2009 09:59:40 -, ankita dutta wrote: hi all, i have a file of 3x3 matrix of decimal numbers(tab separated). like this : 0.020.380.01 0.040.320.00 0.030.400.02 now i want to read 1 row and get the sum of a particular row. but when i am trying

Re: query regarding file handling.

2009-11-12 Thread Himanshu
2009/11/12 ankita dutta : > hi all, > > i have a file of 3x3 matrix of decimal numbers(tab separated). like this : > > 0.02    0.38    0.01 > 0.04    0.32    0.00 > 0.03    0.40    0.02 > > now i want to read 1 row and get the sum of a particular row. but when i am > trying with the following code,

Re: query regarding file handling.

2009-11-12 Thread Chris Rebert
On Thu, Nov 12, 2009 at 1:59 AM, ankita dutta wrote: > hi all, > > i have a file of 3x3 matrix of decimal numbers(tab separated). like this : > > 0.02    0.38    0.01 > 0.04    0.32    0.00 > 0.03    0.40    0.02 > > now i want to read 1 row and get the sum of a particular row. but when i am > try

Re: Query about doing fortran-esque repeat formatting

2009-11-09 Thread Rob Briggs
Thanks to the chaps who answered, I knew there would be an efficient answer to this. regards, Rob On Mon, 2009-11-09 at 13:31 +0100, Jean-Michel Pichavant wrote: > Glenn Hutchings wrote: > > Rob Briggs mun.ca> writes: > > > > > > > Is there a way to do a repeat formatting command like

Re: Query about doing fortran-esque repeat formatting

2009-11-09 Thread Jean-Michel Pichavant
Glenn Hutchings wrote: Rob Briggs mun.ca> writes: Is there a way to do a repeat formatting command like in Fortran? Rather that doing this: print "%s %-5.3f %-5.3f %-5.3f %-5.3f %-5.3f %-5.3f %-5.3f" % (parmName[i], tmp[i][1], tmp[i][2], tmp[i][4], tmp[i][6], tmp[i][7], tmp[i][8], tmp[i

Re: Query about doing fortran-esque repeat formatting

2009-11-09 Thread Glenn Hutchings
Rob Briggs mun.ca> writes: > Is there a way to do a repeat formatting command like in Fortran? Rather > that doing this: > > print "%s %-5.3f %-5.3f %-5.3f %-5.3f %-5.3f %-5.3f %-5.3f" % > (parmName[i], tmp[i][1], tmp[i][2], tmp[i][4], tmp[i][6], tmp[i][7], > tmp[i][8], tmp[i][9]) There cert

Re: Query about doing fortran-esque repeat formatting

2009-11-08 Thread Novocastrian_Nomad
How about: print ('%s ' + '%-5.4f ' * 7) % ('text',1,2,3,4,5,6,7) -- http://mail.python.org/mailman/listinfo/python-list

Re: Query about doing fortran-esque repeat formatting

2009-11-08 Thread Mensanator
On Nov 8, 8:56�am, Rob Briggs wrote: > Hello, > > Is there a way to do a repeat formatting command like in Fortran? Rather > that doing this: > > print "%s %-5.3f %-5.3f %-5.3f %-5.3f %-5.3f %-5.3f %-5.3f" % > (parmName[i], tmp[i][1], tmp[i][2], tmp[i][4], �tmp[i][6], �tmp[i][7], > tmp[i][8], �tmp

Re: Query screen resolution?

2009-09-07 Thread Warpcat
> If it's a GUI app, you ask the GUI toolkit which you're using. Heh, I suppose you're right :) -- http://mail.python.org/mailman/listinfo/python-list

Re: Query screen resolution?

2009-08-29 Thread Nobody
On Fri, 28 Aug 2009 20:15:57 -0700, Warpcat wrote: >> Your question is based upon the notion that "the screen" is a meaningful >> concept. Once you move away from Windows (and systems which intentionally >> try to be like Windows), that's no longer true. > > Good points. Always something I haven

Re: Query screen resolution?

2009-08-28 Thread Warpcat
> Your question is based upon the notion that "the screen" is a meaningful > concept. Once you move away from Windows (and systems which intentionally > try to be like Windows), that's no longer true. Good points. Always something I haven't thought of. Ok so... let's *presume* the user has a mea

Re: Query screen resolution?

2009-08-28 Thread Nobody
On Fri, 28 Aug 2009 11:13:06 -0700, AK Eric wrote: > Thought this would be easy, maybe I'm missing something :) Trying to > query the x,y resolution of my screen. I've seen this available > through http://python.net/crew/mhammond/win32/ : > > from win32api import GetSystemMetrics > print "width

Re: Query screen resolution?

2009-08-28 Thread Warpcat
On Aug 28, 11:27 am, "Rami Chowdhury" wrote: > > But I was hoping for something built-in, and something non-OS > > specific. > > I don't know about built-ins, but I do believe that pygame (which *is*   > cross-platform) will let you get at that information: >        http://www.pygame.org/docs/ref/

Re: Query screen resolution?

2009-08-28 Thread Rami Chowdhury
But I was hoping for something built-in, and something non-OS specific. I don't know about built-ins, but I do believe that pygame (which *is* cross-platform) will let you get at that information: http://www.pygame.org/docs/ref/display.html#pygame.display.Info On Fri, 28 Aug 2009 11:

Re: Query regarding set([])?

2009-07-10 Thread Terry Reedy
vox wrote: Hi, I'm contsructing a simple compare-script and thought I would use set ([]) to generate the difference output. But I'm obviosly doing something wrong. file1 contains 410 rows. file2 contains 386 rows. I want to know what rows are in file1 but not in file2. This is my script: s1 = s

Re: Query regarding set([])?

2009-07-10 Thread Peter Otten
vox wrote: > On Jul 10, 4:17 pm, Dave Angel wrote: >> vox wrote: >> > On Jul 10, 2:04 pm, Peter Otten <__pete...@web.de> wrote: >> >> >> You are probably misinterpreting len(s3). s3 contains lines occuring >> >> in "file1" but not in "file2". Duplicate lines are only counted once, >> >> and the o

Re: Query regarding set([])?

2009-07-10 Thread vox
On Jul 10, 4:17 pm, Dave Angel wrote: > vox wrote: > > On Jul 10, 2:04 pm, Peter Otten <__pete...@web.de> wrote: > > >> You are probably misinterpreting len(s3). s3 contains lines occuring in > >> "file1" but not in "file2". Duplicate lines are only counted once, and the > >> order doesn't matter.

Re: Query regarding set([])?

2009-07-10 Thread Dave Angel
vox wrote: On Jul 10, 2:04 pm, Peter Otten <__pete...@web.de> wrote: You are probably misinterpreting len(s3). s3 contains lines occuring in "file1" but not in "file2". Duplicate lines are only counted once, and the order doesn't matter. So there are 119 lines that occur at least once in "fi

Re: Query regarding set([])?

2009-07-10 Thread David Robinow
On Fri, Jul 10, 2009 at 8:52 AM, vox wrote: > I am looking for a script that compares file1 and file2, for each line > in file1, check if line is present in file2. If the line from file1 is > not present in file2, print that line/write it to file3, because I > have to know what lines to add to file

Re: Query regarding set([])?

2009-07-10 Thread vox
On Jul 10, 2:04 pm, Peter Otten <__pete...@web.de> wrote: > You are probably misinterpreting len(s3). s3 contains lines occuring in > "file1" but not in "file2". Duplicate lines are only counted once, and the > order doesn't matter. > > So there are 119 lines that occur at least once in "file2", bu

Re: Query regarding set([])?

2009-07-10 Thread Peter Otten
vox wrote: > I'm contsructing a simple compare-script and thought I would use set > ([]) to generate the difference output. But I'm obviosly doing > something wrong. > > file1 contains 410 rows. > file2 contains 386 rows. > I want to know what rows are in file1 but not in file2. > > This is my s

Re: Query regarding Python sybase module

2009-03-24 Thread skip
Srini> Does Sybase Python driver module implement multiple result sets Srini> from a single command? I've used it to get multiple result sets from stored procedures, so I guess the answer would be "yes". Something like this: >>> params = curs.callproc('stored_procedure', params)

Re: Query regarding Python sybase module

2009-03-23 Thread Kushal Kumaran
On Tue, 24 Mar 2009 09:53:02 +0530 (IST) srinivasan srinivas wrote: > > Hi, > Does Sybase Python driver module implement multiple result sets from > a single command? Could anyone guide e in finding answer for this? > > The site http://python-sybase.sourceforge.net/sybase/ has the documentati

Re: Query netgroup information through python

2008-12-02 Thread Joel Heenan
Well it doesn't appear that this exists in the standard library or in any other library, so I ended up writing my own C interface to the underlying functions. If you are trying to do the same thing, then you can find the module here: http://www.planetjoel.com/viewarticle/629/Python+NSS+netgroups+

Re: Query regarding PythonQt

2008-06-30 Thread Shankar Narayana
Hi, After a big fight, I could get through the problem. I am posting it so that others does not waste time solving the issue. I dont know why "evalfile" method is having problems with existing .pyc files. But, we can solve it this way. First create your .cpp and .py file in directory. Then, do

Re: Query regarding PythonQt

2008-06-28 Thread Shankar Narayana
Hi, Can somebody please help me with the issue of ".pyc" creating problems when we rerun the application, written using PythonQt ? The description of the problem is given below. Regards, Shankar On Fri, Jun 27, 2008 at 2:41 PM, Shankar Narayana <[EMAIL PROTECTED]> wrote: > Hi, > I am newbie t

Re: Query

2007-10-09 Thread Nathaniel Smith
> I want to make a binary file , which would execute on it's own. First do $ which python to get the location of your python binary. The default, i think, is just /usr/bin/python. Then add this line to the top of your file: #!/usr/bin/python (or whatever the `which` command returned) th

Re: query

2006-12-22 Thread Colin J. Williams
Fredrik Lundh wrote: > [EMAIL PROTECTED] wrote: > >> can anyone help me on indentation in python and tell me some nice text >> editors used for a beginner in python? > > http://effbot.org/pyfaq/tutor-whats-the-best-editor-ide-for-python > > > In Windows, I like PyScripter. Colin W. -- http:

Re: query

2006-12-21 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > can anyone help me on indentation in python and tell me some nice text > editors used for a beginner in python? http://effbot.org/pyfaq/tutor-whats-the-best-editor-ide-for-python -- http://mail.python.org/mailman/listinfo/python-list

Re: query

2006-12-21 Thread Larry Bates
[EMAIL PROTECTED] wrote: > can anyone help me on indentation in python and tell me some nice text > editors used for a beginner in python? > You MUST tell us what platform you run on for us to make a recommendation. Remember Python runs on Windows, Linux, Mac, ... On Windows my current favorite i

Re: Query regarding grep!!

2006-09-26 Thread johnzenger
You could also use itertools: import itertools import re find = re.compile("pattern") for line in itertools.ifilter(lambda x: find.search(x), file(filepath)): print line Fredrik Lundh wrote: > bhavya sg wrote: > > > I saw in PEP4 of python 2.5 that grep module has gone > > obsolete in perl

Re: Query regarding grep!!

2006-09-26 Thread Nick Vatamaniuc
Of course you can always use grep as an external process (if the OS has it). For example: --- In [1]: import subprocess In [2]: out=subprocess.Popen( 'grep -i blah ./tmp/*', stdout=subprocess.PIPE, shell=True ).communicate()[0] In [

Re: Query regarding grep!!

2006-09-25 Thread Fredrik Lundh
bhavya sg wrote: > I saw in PEP4 of python 2.5 that grep module has gone > obsolete in perl 2.5. But I am not able to find an > alternative for that. the grep module has been deprecated for ages (it's been in the lib-old non-standard library since at least Python 2.1). The old grep module dep

Re: Query regarding support for IPv6 in python

2006-04-26 Thread Heiko Wundram
Am Mittwoch 26 April 2006 17:02 schrieb Pramod TK: > 1. Does python support IPv6? [128 bit IP addresses?] Yes. > 2. Does it support setting of QoS flags? Yes. That's a socket option which you can set just as you would set it using C (at least under Unix, under Windows: no idea). > 3. Does it s

Re: Query regarding support for IPv6 in python

2006-04-26 Thread Martin v. Löwis
Pramod TK wrote: > Is this new function getaddrinfo() of IPv6 is supported in Win32 Extensions > for python. Yes, since Python 2.4 (actually, not in the Win32 extensions, but in the standard Python socket module for Win32). Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Query regarding support for IPv6 in python

2006-04-26 Thread Sybren Stuvel
Pramod TK enlightened us with: > 1. Does python support IPv6? [128 bit IP addresses?] Yes. > 2. Does it support setting of QoS flags? No idea. > 3. Does it support tunneling of IPv6 on a IPv4 network? IIRC that's the OS's job, not Python's. > 4. If an IPv4 address is given, does it support th

Re: Query : sys.excepthook exception in Python

2006-04-10 Thread Peter Hansen
Pramod, TK wrote: > Sometimes during execution of python scripts below mentioned error > string is displayed on the console. > > *"Unhandled exception in thread started by Error in sys.excepthook: * > *Original exception was:"* > > The scripts are not terminated, they continue to execute norma

Re: query on python list

2005-12-30 Thread Larry Bates
I'm having trouble determining what you want but I think there are a couple of problems in your code: list2 = ['1','2','5',4] did you mean list2 = ['1','2','3','4'] Note missing quotes around the 4 and 5 instead of 3 If you want to know if list2 is found in list 1 it is as simple as: if list2

Re: query on python list

2005-12-27 Thread Mike Meyer
[EMAIL PROTECTED] writes: > hi tim > thanks for the help > acutally i dint tell u the whole problem > i have list of lists, for ex > > list1 =[ ['a','b','c','d','e'] , ['1','2','3','4'] , ['A','B','C','D'] > ] > > and another list > > list2 = ['1','2','5',4] > > now am searching the items of list2

Re: query on python list

2005-12-27 Thread muttu2244
hi tim thanks for the help acutally i dint tell u the whole problem i have list of lists, for ex list1 =[ ['a','b','c','d','e'] , ['1','2','3','4'] , ['A','B','C','D'] ] and another list list2 = ['1','2','5',4] now am searching the items of list2 in list1 as below Found = True for i in list1:

Re: query on python list

2005-12-27 Thread Tim Hochberg
[EMAIL PROTECTED] wrote: > hi all > am searching for a key in a list, am using > > Found = 0 > for item in list: > if not key == item: > Found = 0 > elif key == item: > Found =1 > > Now based on the Found value i ll manipulate the list. > but whenev

Re: query to find name of the OS, ip addr, mac addr etc

2005-12-13 Thread gene tani
[EMAIL PROTECTED] wrote: > Hi all, > > 1) Am working on windows XP, and is there any way i can get the whole > name as "windows Xp" using python script? > >i have tried with > "os.sys.platform" but it just gives me as "win32", but can > i get the whole OS name as "windows Xp". >

Re: query to find name of the OS, ip addr, mac addr etc

2005-12-13 Thread Roger Upole
If you have Pywin32 installed, you can use WMI to get all these details. The WMI classes to look at are win32_networkadapter and win32_operatingsystem. Roger -- "Ask the ToeCutter - HE knows who I am !" <[EMAIL PROTECTED]> wrote: > Hi all, > > 1) Am working on windows XP, and is

Re: query domain registry from python?

2005-11-20 Thread Tim Williams (gmail)
On 19 Nov 2005 19:40:58 -0800, [EMAIL PROTECTED] <[EMAIL PROTECTED] > wrote:hi, does anyone know of a library that can query domain registry or any site that provide information to such an activity? as i want to build asimple domain name searching program for my own benefit.. thanks alot :D [TW]  

Re: query a port

2005-10-30 Thread Dan M
On Sat, 29 Oct 2005 23:21:16 -0700, eight02645999 wrote: > thanks alot! > that's all there is to it..so it's just a simple connect. If all you want to do is check that the given port is open on the given host, that's it. I tried it on my local box. When connecting to port 25, it made the connecti

Re: query a port

2005-10-30 Thread Lawrence Oluyede
Il 2005-10-30, [EMAIL PROTECTED] <[EMAIL PROTECTED]> ha scritto: > hi > in python, how do one query a port to see whether it's up or not? > thanks > Have a look at this: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/286240 -- Lawrence http://www.oluyede.org/blog -- http://mail.python

Re: query a port

2005-10-29 Thread eight02645999
thanks alot! that's all there is to it..so it's just a simple connect. Dan M wrote: > On Sat, 29 Oct 2005 20:21:20 -0700, eight02645999 wrote: > > > hi > > in python, how do one query a port to see whether it's up or not? > > thanks > > I'm an absolute beginner, but let's see if I can help. Assumi

Re: query a port

2005-10-29 Thread Dan M
On Sat, 29 Oct 2005 20:21:20 -0700, eight02645999 wrote: > hi > in python, how do one query a port to see whether it's up or not? > thanks I'm an absolute beginner, but let's see if I can help. Assuming you want to check a port on another machine, import socket port=25 # Port we

Re: query regarding expect

2005-07-22 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Girish <[EMAIL PROTECTED]> wrote: >Hi, > >I wanna do some automation using "pexpect". >I have an application which must be invoked from the command line in >linux environment,it consists of buttons,textboxes etc can i access >those widgets using "pexpect",say i wanna

Re: Query - Pexpect

2005-07-22 Thread Lee Harr
On 2005-07-22, Girish <[EMAIL PROTECTED]> wrote: > Hi , > > I wanna do some automation work using "pexpect". > I have an application which must be invoked from the command line in > linux environment,it consists of buttons,textboxes etc can i access > those widgets using "pexpect",say i wanna enter

Re: Query

2005-07-08 Thread Jeff Epler
python-xlib includes an implementation of the xtest extension, which is enabled on most users' X servers, and can be used to send arbitrary keyboard or mouse events. jeff pgpo7pqhBafPe.pgp Description: PGP signature -- http://mail.python.org/mailman/listinfo/python-list

Re: query progress bar

2005-05-17 Thread Scott David Daniels
f wrote: > Timothy Smith wrote: > >> is it possible to mke a progress bar for queries? say i have a query >> that will take 20 seconds, i'd like to give some feed back to users on >> how long this will take. > an activity widget, something moving (ie throbber in wxPython) > while waiting fo

Re: query progress bar

2005-05-17 Thread Timothy Smith
Bernhard Holzmayer wrote: >Timothy Smith wrote: > > > >>i'm using pypgsql >> >> > >Assuming you work with PostgreSQL, then: >You know the EXPLAIN command? > >EXPLAIN will give you a very accurate estimation for the expense for the >query. >(You'll have to find out what cost means in terms o

Re: query progress bar

2005-05-17 Thread Bernhard Holzmayer
Timothy Smith wrote: > i'm using pypgsql Assuming you work with PostgreSQL, then: You know the EXPLAIN command? EXPLAIN will give you a very accurate estimation for the expense for the query. (You'll have to find out what cost means in terms of your progress.) I did never try this using pypgsq

Re: query progress bar

2005-05-17 Thread f
Timothy Smith wrote: > is it possible to mke a progress bar for queries? say i have a query > that will take 20 seconds, i'd like to give some feed back to users on > how long this will take. it is strictly impossible to predict that cause of network load, server load, query complexity i

Re: query progress bar

2005-05-16 Thread Timothy Smith
Harald Massa wrote: >>it's for wx, the problem isn't making the progress bar itself, it's >>knowing how long the query is going to run for. >>i'm using pypgsql >> >> > >It is quite easy: > >from timemachine import oracle > >guesser=oracle(guess="SQL") >guesser.set_hint(driver="pypgsql") >gues

Re: query progress bar

2005-05-16 Thread Harald Massa
> it's for wx, the problem isn't making the progress bar itself, it's > knowing how long the query is going to run for. > i'm using pypgsql It is quite easy: from timemachine import oracle guesser=oracle(guess="SQL") guesser.set_hint(driver="pypgsql") guesser.set_hint(gui="wx") expected_runtim

Re: query progress bar

2005-05-16 Thread Timothy Smith
[EMAIL PROTECTED] wrote: >What type of UI is this for? The Python Cookbook, 2nd Ed. has a nice >textual solution. I'm not sure if this is the same one, but here is href="http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/168639";>one >from ASPN. Here is one href="http://wxpython.org/docs/api/

Re: query progress bar

2005-05-16 Thread [EMAIL PROTECTED]
What type of UI is this for? The Python Cookbook, 2nd Ed. has a nice textual solution. I'm not sure if this is the same one, but here is http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/168639";>one from ASPN. Here is one http://wxpython.org/docs/api/wx.ProgressDialog-class.html";> for wxPyt

Re: query python env

2005-01-14 Thread Michael Hoffman
Steve Holden wrote: I suspect rather that the OP is looking for os.environ, as in: He was using the examples of PYTHONHOME and PYTHONPATH which have specific meanings. Using sys.prefix is better than os.environ["PYTHONHOME"], which is unlikely to be set. -- Michael Hoffman -- http://mail.python.o

Re: query python env

2005-01-14 Thread Steve Holden
Michael Hoffman wrote: David Bear wrote: How does one query the python environment, ie pythonhome sys.prefix > pythonpath sys.path etc. [...] I suspect rather that the OP is looking for os.environ, as in: [EMAIL PROTECTED] sholden]$ ENVAR=value [EMAIL PROTECTED] sholden]$ export ENVAR [EMAIL PRO

Re: query python env

2005-01-14 Thread Scott David Daniels
David Bear wrote: How does one query the python environment, ie pythonhome, pythonpath, etc. also, are there any HOWTO's on keeping multiple versions of python happy? In general, (and in this case) the answer is system-specific. You need to explain (A) what operating system, and (B) what you mean

Re: query python env

2005-01-14 Thread Michael Hoffman
David Bear wrote: How does one query the python environment, ie pythonhome sys.prefix > pythonpath sys.path etc. sys.etc also, are there any HOWTO's on keeping multiple versions of python happy? I think it is sufficiently trivial that none is needed. Just make sure the distributions are installed