Re: How to create an executable from python script in windows
It says like *** copy extensions *** *** copy dlls *** copying C:\Python24\lib\site-packages\py2exe\run_w.exe -> C:\Program Files (x86)\Notepad++\dist\build-check-test.exe Adding python24.dll as resource to C:\Program Files (x86)\Notepad++\dist\build-check-test.exe The following modules appear to be missing ['win32com.shell'] *** binary dependencies *** Your executable(s) also depend on these dlls which are not included, you may or may not need to distribute them. Make sure you have the license if you distribute any of them, and make sure you don't distribute files belonging to the operating system. ole32.dll - C:\Windows\system32\ole32.dll OLEAUT32.dll - C:\Windows\system32\OLEAUT32.dll USER32.dll - C:\Windows\system32\USER32.dll IMM32.dll - C:\Windows\system32\IMM32.dll SHELL32.dll - C:\Windows\system32\SHELL32.dll ntdll.dll - C:\Windows\system32\ntdll.dll comdlg32.dll - C:\Windows\system32\comdlg32.dll COMCTL32.dll - C:\Windows\system32\COMCTL32.dll ADVAPI32.dll - C:\Windows\system32\ADVAPI32.dll MFC71.DLL - C:\Python24\lib\site-packages\Pythonwin\MFC71.DLL msvcrt.dll - C:\Windows\system32\msvcrt.dll WINSPOOL.DRV - C:\Windows\system32\WINSPOOL.DRV GDI32.dll - C:\Windows\system32\GDI32.dll VERSION.dll - C:\Windows\system32\VERSION.dll KERNEL32.dll - C:\Windows\system32\KERNEL32.dll SETUPAPI.dll - C:\Windows\system32\SETUPAPI.dll KERNELBASE.dll - C:\Windows\system32\KERNELBASE.dll RPCRT4.dll - C:\Windows\system32\RPCRT4.dll -- http://mail.python.org/mailman/listinfo/python-list
Need A script to open a excel file and extract the data using autofilter
Need A script to open a excel file and extract the data using autofilter and write it in a new sheet or new file like I have to select all rows in which all the columns contain pass as status -- http://mail.python.org/mailman/listinfo/python-list
Re: Need A script to open a excel file and extract the data using autofilter
On Oct 1, 10:25 pm, Prakash wrote:
> Need A script to open a excel file and extract the data using
> autofilter and write it in a new sheet or new file like I have to
> select all rows in which all the columns contain pass as status
from win32com.client import Dispatch
xlApp = Dispatch("Excel.Application")
xlApp.Workbooks.Open(r'C:\Users\Administrator\Desktop\test.xls')
xlApp.Visible = 1
after opening the text.xls file i need to filter all the rows in which
the status column is passed and copy the whole sheet to another sheet
--
http://mail.python.org/mailman/listinfo/python-list
cmd i/o stream module
Hi All, I am interested to interact with the command prompt, is there a module to control the input/output stream. Thanks in advance for the pointers Thanks Prakash -- http://mail.python.org/mailman/listinfo/python-list
get latest from svn
Hi All, Can some one suggest me a module to access SVN repository so that i could download any given branch. Thanks -- http://mail.python.org/mailman/listinfo/python-list
help on QUICKFIX
Hi, I am using quickfix, would like to start with that ..\quickfix-1.13.3\quickfix\examples\executor\python\executor.py asks for a configuration file how should it look like. Thanks -- http://mail.python.org/mailman/listinfo/python-list
find max and min values from a column of a csv file
Hi All ,
Could any one help to get max and min values from a specified column of a
csv file. The* csv file is large* and hence the below code did go bad.
*Alternate
methods would be highly appreciated
**
minimum.py*:
import csv
filename = "testLog_4.csv"
f = open(filename)
def col_min(mincname):
with open(filename, 'rb') as f:
reader = csv.reader(f, delimiter=",")
#print reader
#print mincname
col_index = next(reader).index(mincname)
#print col_index
least = min(rec[col_index] for rec in reader)
print least
col_min(str("Server Latency"))
col_min(str("Client Latency"))
f.close()
*maximum.py:*
import csv
filename = "testLog_4.csv"
f = open(filename)
def col_max(maxcname):
with open(filename, 'rb') as f:
reader = csv.reader(f, delimiter=",")
#print reader
#print cname
col_index = next(reader).index(maxcname)
#print col_index
highest = max(rec[col_index] for rec in reader)
print highest
col_max(str("Server Latency"))
col_max(str("Client Latency"))
f.close()
Thanks
--
http://mail.python.org/mailman/listinfo/python-list
Re: find max and min values from a column of a csv file
Thanks for the suggestions. Felt the thread could be of help on
consolidating the solution.
*Max Value from a csv column:*
import numpy
data1 = numpy.genfromtxt("data.csv",dtype='float',delimiter =
',',skiprows=1, skip_header=0, skip_footer=0,
usecols=11,usemask=True)
#print data1
print data1.max()
Plz go through the below link to understand further on the arguments taken
by numpy.genfromtxt():
http://docs.scipy.org/doc/numpy-1.4.x/reference/generated/numpy.genfromtxt.html
Thanks
--
http://mail.python.org/mailman/listinfo/python-list
how to invoke a bat file on a remote machine
Hi all, Want to know how to invoke a bat file on a remote machine. Thanks -- http://mail.python.org/mailman/listinfo/python-list
pydev ant build
Hi all, Could any one provide relevant url/s on the usage of *pyant* scripts and its setup as well Thanks -- http://mail.python.org/mailman/listinfo/python-list
Re: Levenberg-Marquardt Algorithm
I am sorry, but I thought Levenberg marquardt was used quite bit in Image registration. Computing/refining homographies between two related views for instance. On Wed, Apr 11, 2018 at 12:49 PM, Christian Gollwitzer wrote: > Am 11.04.18 um 08:38 schrieb Priya Singh: > >> I have two 2D arrays one R and another T (which is also a 2D array). >> Do you know how can I fit T with R in order to find central >> coordinate x0,y0 for T relative to R??? >> >> So the main question is do you know in python how can I fit two 2D arrays >> to find >> x0,y0 for one array relative to other. I shall use LM fit in python. But >> for fitting, I need to have some fittable model but here I am having only >> two 2D arrays. I know simple cross-correlation would have solved my problem >> but I have been instructed to do fitting using one array to other. >> > > > The request is nonsense. LM fits an analytical model to data, if you don't > have an analytical model, you need another tool. Cross correlation is > widely used and works well for many such tasks. > > In principle you could also interpolate the one array to new coordinates, > e.g. using scipy.ndimage.interpolation.shift, and minimize the sum of > squared differences. But still LM is the wrong tool here, it would get > trapped in local minima soon, and it uses derivatives. Look for "image > registration" to find typical algorithms used in this context. > > > > Christian > > -- > https://mail.python.org/mailman/listinfo/python-list > -- https://mail.python.org/mailman/listinfo/python-list
Finding set difference between ranges
Hello all, I have 3 continuous (steps of 1) ranges a,a1,a2. All of them sorted. I am performing the following operations on them a = a.difference (a1) a = a.difference(a2) Now, this doesn't seem to make use of the fact that 1. They are sorted 2. They increase in steps of 1 . Could someone suggest a better way of doing this to make these operations more efficient? Thank you, Tejaswi D Prakash -- https://mail.python.org/mailman/listinfo/python-list
Re: Finding set difference between ranges
I generate the values using range and then convert them to sets. I am thinking about an approach which involves subtracting the ranges, or something along those lines, nothing concrete yet. On Wed 18 Apr, 2018, 8:43 PM Neil Cerutti, wrote: > On 2018-04-18, tejaswi prakash wrote: > > Hello all, > > I have 3 continuous (steps of 1) ranges a,a1,a2. All of them sorted. > > I am performing the following operations on them > > > > a = a.difference (a1) > > a = a.difference(a2) > > If they are each stored as a set I don't see how they can be > sorted. Are you converting to set and then calling difference? > > It may still be more efficient than writing your own loop to take > advantage of the sorted status of the original objects. > > -- > Neil Cerutti > > -- > https://mail.python.org/mailman/listinfo/python-list > -- https://mail.python.org/mailman/listinfo/python-list
Need Help Urgently
[ABCD client error]: Connection to broker at 126.0.0.1: lost! "timestamp":"Wed Feb 19 11:48:41 [XYZ]: Connection to broker at 126.0.0.1: lost! "timestamp":"Wed Feb 19 11:48:40 Note: I want to read the error code i.e ABCD Client error from the line and also wrt timestamp value. Let me know how to do? -- https://mail.python.org/mailman/listinfo/python-list
regarding porting to windows.
Respected Sir / Madam , I am Prakash . I am also working on porting C PROGRAMS to windows from Linux , but i doesn't get any clue yet. I have some C - programs written on Linux & i have to port it on windows . The problem starts from header files. So if you have any help or document, link related to this which will help me in this scenario ,let me know. Thanks !!! Regards, Prakash Reghate How much free photo storage do you get? Store your friends n family photos for FREE with Yahoo! Photos. http://in.photos.yahoo.com-- http://mail.python.org/mailman/listinfo/python-list
no module named fcntl
Hello All, I new user to python. I am using a product called FSH, some of its parts are implemented in Python. This is like a ssh to run a command on remote machine. First time while running the fsh there was on. # fshd Traceback (most recent call last): File "/usr/bin/in.fshd", line 6, in ? import infshd File "/home/pra/fsh/1.2/Fileset/share/fsh/infshd.py", line 19, in ? import fcntl ImportError: No module named fcntl I solved this problem. This error is because, fcntl.sl is unable load and the user has no permission to execute the library. After changing the permission for the shared library, it works. But again the problem arises after some time, with out no change. This time # fshd -l user localhost [EMAIL PROTECTED] password: Traceback (most recent call last): File "/usr/bin/in.fshd", line 6, in ? import infshd File "/home/pra/fsh/1.2/Fileset/share/fsh/infshd.py", line 19, in ? import fcntl ImportError: No module named fcntl Pls. suggest me any solution. Pls. forgive me if it is already discussed. Thanks & ReagrdsPrakash.A -- http://mail.python.org/mailman/listinfo/python-list
error while writing program to send mail.
Hi,
I am writing this program from
https://docs.python.org/2/library/email-examples.html
but getting the error as
singhom@debian:~/pythons$ python send_email.py
Traceback (most recent call last):
File "send_email.py", line 18, in
msg['Subject'] = 'The contents of $s' % message
NameError: name 'message' is not defined
i know the error would be something simple and i am overlooking it, any
help would be highly appreciated, I am sorry, but I am very new to
python programming.
code starts here.
#/usr/bin/python2.7 -tt
## sending a simple text message using python.
import smtplib
from email.mime.text import MIMEText
# Open file for reading.
fp = open("message", 'rb')
# Create a plain text message.
msg = MIMEText(fp.read())
fp.close
me = "[email protected]"
you = "[email protected]"
msg['Subject'] = 'The contents of $s' % message
msg['From'] = me
msg['To'] = you
# Send message thorugh localhost but don't include the envelope headers.
s = smtplib.SMTP('localhost')
s.sendmail(me, [you], msg.as_string())
s.quit()
--
https://mail.python.org/mailman/listinfo/python-list
Define proxy in windows 7
Hi, I am wondering how to define proxy setting in env variable on windows 7, I want this so i can use pip to pull packages for me, the same setting though working earlier on windows xp. http_proxy = "proxy name:80" now this same setting doesn't work, i tried doing in the cmd.exe prompt. set http_proxy "proxy name:80" P.S. i am a normal user and don't have admin privleges. Regards, Om Prakash -- https://mail.python.org/mailman/listinfo/python-list
Re: error while writing program to send mail.
On 09/02/2014 05:29 AM, MRAB wrote:
On 2014-09-02 00:35, Om Prakash wrote:
Hi,
I am writing this program from
https://docs.python.org/2/library/email-examples.html
but getting the error as
singhom@debian:~/pythons$ python send_email.py
Traceback (most recent call last):
File "send_email.py", line 18, in
msg['Subject'] = 'The contents of $s' % message
NameError: name 'message' is not defined
i know the error would be something simple and i am overlooking it, any
help would be highly appreciated, I am sorry, but I am very new to
python programming.
code starts here.
#/usr/bin/python2.7 -tt
## sending a simple text message using python.
import smtplib
from email.mime.text import MIMEText
# Open file for reading.
fp = open("message", 'rb')
# Create a plain text message.
msg = MIMEText(fp.read())
fp.close
That should be:
fp.close()
me = "[email protected]"
you = "[email protected]"
msg['Subject'] = 'The contents of $s' % message
You're trying to use the format operator, but:
1. You never bound the name 'message' to a value, hence:
NameError: name 'message' is not defined
2. The format string contains '$s' instead of '%s'.
msg['From'] = me
msg['To'] = you
# Send message thorugh localhost but don't include the envelope headers.
s = smtplib.SMTP('localhost')
s.sendmail(me, [you], msg.as_string())
s.quit()
Thanks a lot. will fix this and my overlooking of things too. :)
--
https://mail.python.org/mailman/listinfo/python-list
text to html
Hi All, Want to publish a log file as a web page, is there a parser to retain the format of the text as is and then convert to html. Please provide the relevant pointers Thanks -- http://mail.python.org/mailman/listinfo/python-list
[no subject]
Hello , I would like to parse java files and detect class name's, attributes name's type's and visibility (and or list of methods). Is there any module who can parse easily a java file using jython? Regards Divya -- http://mail.python.org/mailman/listinfo/python-list
creating generic class
Hi, I want to create a generic class to convert ". java " file into xml file (validated against xsd / dtd). What is the best approach to do this with jython or python ? Regards Divya -- http://mail.python.org/mailman/listinfo/python-list
RE:
Hi I don't know how to implement these API's .When I use the method "Parse (file object) " it gives error. So, I m blank how to implement it in order to get all the info of java file and thn represent them in xml format.. Regards Divya -Original Message- From: Gabriel Genellina [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 19, 2006 6:21 AM To: Divya Prakash Cc: [email protected] Subject: Re: At Monday 18/12/2006 03:34, Divya Prakash wrote: > I would like to parse java files and detect class name's, > attributes name's type's and visibility (and or list of > methods). > Is there any module who can parse easily a java file using jython? You could try javadoc (the java package), it is easier to use than a pure reflection approach. -- Gabriel Genellina Softlab SRL __ Correo Yahoo! Espacio para todos tus mensajes, antivirus y antispam !gratis! !Abrm tu cuenta ya! - http://correo.yahoo.com.ar -- http://mail.python.org/mailman/listinfo/python-list
getting subchild of a tree through xerces
Hi I m able to parse xml file using xerces as well as JAXP but I am unable to parse the sub- child of my tree Eg : ...(not able to parse this) But I m unable to parse the child of class"hello" .but I m able to parse the .sibling of class What should I do... Regards Divya -- http://mail.python.org/mailman/listinfo/python-list
FW: [Jython-users] ERROR : parsing xml in jython
Hi
But I am unable to parse all the nodes of the tree .especially the
subtree of the main tree
It displays only the sibling not the subtree
Regards
Divya
-Original Message-
From: Matthias Berth [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 19, 2006 3:18 PM
To: Divya Prakash
Subject: Re: [Jython-users] ERROR : parsing xml in jython
Hi,
looks like you have to make an InputSource from the file, like so:
from java.io import File, FileReader, StringReader
textReader = FileReader(File(filename))
inputSource = InputSource(textReader)
dp.parse(inputSource)
Hope this helps
Matthias
Divya Prakash schrieb:
> Hi All,
>
>
>
> I m facing the problem while parsing xml file ..
>
>
>
> My code is :-
>
>
>
>
>
> import sys
>
> from org.apache.xerces.parsers import DOMParser as dp
>
> import javax.xml.parsers
>
> infilename = open("mos.xml","r")
>
> print infilename
> def test(infilename):
>
> """Parse XML document and show attributes and names.
>
> """
>
> print infilename
>
> parser = dp()
>
> print parser
>
> gh = parser.parse(infilename)
>
> print gh
>
> doc = parser.getDocument()
>
> node = doc.getFirstChild()
>
> print "Attributes:"
>
> show_attrs(node)
>
> print "Names:"
>
> show_names(node)
>
--
http://mail.python.org/mailman/listinfo/python-list
Re: Does Python really follow its philosophy of "Readability counts"?
Hello thats excellant !! On 1/23/09, Russ P. wrote: > > On Jan 23, 4:57 am, Bruno Desthuilliers [email protected]> wrote: > > Russ P. a écrit : > > > > As I said before, if you have the source code you can always change > > > private attributes to public in a pinch if the language enforces > > > encapsulation. > > > > And then have to maintain a fork. No, thanks. > > For crying out loud, how many private attributes do you need to > access? If it's a dozen, then you and your library developer are > obviously not on the same page. If it's one or two, then it's hardly a > "fork." Just take note of the one or two places where you needed to > remove the access restriction and you're done. Heck, you don't even > need to do that, because you will be warned automatically anyway when > you get the new version of the library (unless those private > attributes are changed to public). > > > > But if you are working on a team project, you can't > > > change the code that another member of a team checks in. > > > > Why on earth couldn't I change the code of another member of my team if > > that code needs changes ? The code is the whole team's ownership. > > OK, fine, you can change the code of another member of the team. Are > you going to check with him first, or just do it? The point is that > changing an interface requires agreement of the team members who use > that interface, whether on the calling or the implementation side of > it. If you change interfaces without getting agreement with the other > team members, you probably won't be on the team for long. And without > access restrictions, accessing _private is equivalent to changing the > interface. > > > Now and FWIW, in this case (our own code), I just don't need to "mess > > with internals" - I just just change what needs to be changed. > > > > > That is how > > > enforced data hiding helps teams of developers manage interfaces. > > > > I totally fails to find any evidence of this assertion in the above > > "demonstration". > > > > > The > > > bigger the team and the bigger the project, the more it helps. > > > > Your opinion. > > > > > Mr. D'Aprano gave an excellent example of a large banking program. > > > Without enforced encapsulation, anyone on the development team has > > > access to the entire program and could potentially sneak in fraudulent > > > code much more easily than if encapsulation were enforced by the > > > language. > > > > My my my. If you don't trust your programmers, then indeed, don't use > > Python. What can I say (and what do I care ?). But once again, relying > > on the language's access restriction to manage *security* is, well, kind > > of funny, you know ? > > Are you seriously saying that if you were managing the production of a > major financial software package with hundreds of developers, you > would just "trust" them all to have free access to the most sensitive > and critical parts of the program? Now *that's*, well, kind of funny, > you know? > > Would you give all those developers your password to get into the > system? No? Wait a minute ... you mean you wouldn't "trust" them with > your password? But what about "openness"? Are you some sort of fascist > or what? > -- > http://mail.python.org/mailman/listinfo/python-list > -- http://mail.python.org/mailman/listinfo/python-list
file transfer over LAN
Hi all,
On generating log file on remote systems(say client), I want to transfer
them to the Network Admins(say Server) Computer. In doing so all the
contents of the log file r not transfered, only part of the file. I
appreciate ur help, here is the pre-existant code:
file sender !!!--client:
# Work in progress
import socket, os
from stat import ST_SIZE
HOST = '192.168.3.136'
PORT = 31400 # Arbitrary non-privileged port
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((HOST,PORT))
if s.recv(5)!='READY':
raw_input('Unable to connect \n\n Press any key to exit ...')
s.close()
exit()
f=open(r'C:\\Python25\src\log.txt', 'rb')
fsize=os.stat(f.name)[ST_SIZE]
#s.sendd(str(fsize))
s.send(str(fsize).zfill(8))
s.send(f.read())
s.close()
f.close()
##
file receiver : server
import socket
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
HOST = '192.168.3.136'
PORT = 31400
s.bind((HOST, PORT))
s.listen(3)
conn, addr = s.accept()
print 'conn at address',addr
conn.send('READY')
f = open(r'C:\\Python25\dest\dest.txt','wb')
fsize=int(conn.recv(8))
print 'File size',fsize
f.write(conn.recv(fsize))
f.close()
conn.close()
s.close()
###
Regards
Prakash
--
http://mail.python.org/mailman/listinfo/python-list
python -TFTP over LAN
Hi all, I am interested in using python based TFTP over my LAN. Do let me know how to ahead and any specific urls. Thaks in advance. Regards Prakash -- http://mail.python.org/mailman/listinfo/python-list
email from windows
Hi all, In windows environment, how to send email from one gmail address to another gmail (or another mail) addrress Regards Prakash -- http://mail.python.org/mailman/listinfo/python-list
Re: email from windows
preexistant code :
import sys, smtplib
import string
fromaddr = raw_input("From: ")
toaddrs = string.splitfields(raw_input("To: "), ',')
print "Enter message, end with ^D:"
msg = ''
count = 3
while count > 0:
line = sys.stdin.readline()
#if not line:
#break
msg = msg + line
count = count -1
# The actual mail send
server = smtplib.SMTP('localhost')
server.sendmail(fromaddr, toaddrs, msg)
server.quit()
-
Running the program:
--
From: [email protected]
To: [email protected]
hai
how r
u
---
error creeps in :
error says
Traceback (most recent call last):
File "C:\Python25\python-collection\mail\mail.py", line 17, in
server = smtplib.SMTP('localhost')
File "C:\Python25\lib\smtplib.py", line 244, in __init__
(code, msg) = self.connect(host, port)
File "C:\Python25\lib\smtplib.py", line 310, in connect
raise socket.error, msg
error: (10061, 'Connection refused')
On Mon, Mar 30, 2009 at 7:40 AM, prakash jp wrote:
> Hi all,
>
> In windows environment, how to send email from one gmail address to another
> gmail (or another mail) addrress
>
>
> Regards
> Prakash
>
--
http://mail.python.org/mailman/listinfo/python-list
Re: email from windows
nope not successful. DO let me know the usage of: #From : [email protected] #To: [email protected] import sys, smtplib import string fromaddr = raw_input("From: ") toaddrs = string.splitfields(raw_input("To: "), ',') print "Enter message, end with ^D:" msg = '' count = 3 while count > 0: line = sys.stdin.readline() #if not line: #break msg = msg + line count = count -1 # The actual mail send server = smtplib.SMTP('localhost') server.sendmail(fromaddr, toaddrs, msg) server.quit() #pls define the usage On Mon, Mar 30, 2009 at 7:40 AM, prakash jp wrote: > Hi all, > > In windows environment, how to send email from one gmail address to another > gmail (or another mail) addrress > > > Regards > Prakash > -- http://mail.python.org/mailman/listinfo/python-list
Re: Unix programmers and Idle
let run-cmd be used why go for IDLE 2009/3/31 Dale Amon > I wonder if someone could point me at documentation > on how to debug some of the standard Unix type things > in Idle. I cannot seem to figure out how to set my > argument line for the program I am debugging in an Idle > window. for example: > >vlmdeckcheck.py --strict --debug file.dat > > There must be a way to tell it what the command line args > are for the test run but I can't find it so far. > > > > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.4.9 (GNU/Linux) > > iD8DBQFJ0VLYZHES7UL0zXERAr+vAJ9FhD3fe6HY/Rd4/alqgb41jXy/oACfQWvQ > pyH4Cgd38KrIMVlLhN0gbb4= > =BVqw > -END PGP SIGNATURE- > > -- > http://mail.python.org/mailman/listinfo/python-list > > -- http://mail.python.org/mailman/listinfo/python-list
usb mass storage device detection
Hi all, I am interested in detecting usb mass storage devices, r there any scripts in python to do so. Thanks in advance. Regards Prakash -- http://mail.python.org/mailman/listinfo/python-list
py2exe fails to make valid exe
Hi all, i am trying to make an exe out of my py *prg which write to a text file*. On --> python setup.py py2exe the dist folder is created but the exe creted is not working it throws an error "pythons ps.popen function" setup.py: #python setup.py py2exe from distutils.core import setup import py2exe setup(console=['nameofprg.py']) Regards Praksh -- http://mail.python.org/mailman/listinfo/python-list
Re: Anyone mannaged to access parallel port on windows xp?
Hi all, just would like to say that most of the parallel port preexistant code is usually blinking leds, which is the not the true reprsentation of the paralle port behaviour. Here one needs to think that data is coming out byte after byte. Now plz look out for the sequence to push data byte after byte. One pin to pulse(programatically) for a byte of data to come out is the Pin 0, strobe pin, then reset the same to push the next byte of data. Latare u r expected to send these data byte in the sequnce that the target board requirement. I have done this in c - dos based regards Prakash On Tue, Apr 7, 2009 at 12:09 PM, alejandro wrote: > I have a switch that I should connect to the parallel port, but had no > luck > with it. Tha guy that made it for me told me that it would be easyer to > connect via parallel instead the USB > So did anyone have success? I only get suckess!! :-)) > tryed giveio.sys but it doesn't wort (can't figure out what is it) > > > -- > http://mail.python.org/mailman/listinfo/python-list > -- http://mail.python.org/mailman/listinfo/python-list
Re: Injecting python function in an embedded python engine
import os
ch = os.system("import -window root temp.png")
print ch
after that no way to store the screen shot
regards
Prakash
On Mon, Apr 6, 2009 at 10:28 PM, Roberto Fichera wrote:
> Hi All in the list,
>
> I've embedded python v2.6.x engine into my application without any problem.
> Now I would like to inject some additional functions after importing a
> python module.
> So, basically I'm importing a python module via PyImport_ImportModule()
> function.
> The python module is a simple set of functions and I would check if some
> functions
> does exist or not, than if doesn't I would add it from my C application.
> Checking if
> a function does exist or not isn't an issue, it works without any
> problem, my problem
> is only how to inject a new function in an already imported module.
>
> Thanks in advance,
> Roberto Fichera.
> --
> http://mail.python.org/mailman/listinfo/python-list
>
--
http://mail.python.org/mailman/listinfo/python-list
stand alone exec
Hi all, I want to run dos commands through python stand alone execs. The created Python stand alone executable (py2exe) works fine in my machine but on transferring the "dist" folder to other systems the executable fails to run. I tried to copy the MSVCP90.dll in the "dist" folder. Also tried to exclude the same dll in the options of the setup.py file The error reads as follows : "The application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem". Details of the installed setup files may be useful : 1- python-2.6.1.msi 2- py2exe-0.6.9.win32-py2.6.exe 3- pywin32-212.win32-py2.6.exe Thanks in advance Regards Prakash -- http://mail.python.org/mailman/listinfo/python-list
python script as service
Hi all, could any one tell how to run a python script as a scheduled service(say every one minute). I tried out the windows registration method but encountered an error . The error reads: "The 'script name' on local Computer started and then stopped. Some services stop automatically if they have no work to do, for example, the Performance Logs and Alerts service" Regards Prakash -- http://mail.python.org/mailman/listinfo/python-list
Re: Python py2exe - memory load error
Try to install "vcredist_x86.exe", then try to build using py2exe. I think that should solve the issue Regards Prakash On Mon, Nov 30, 2009 at 10:40 AM, koranthala wrote: > This is cross post from stackoverflow - I couldnt get the solution > there. Hopefully, nobody would mind. > > I am creating a medium level application in Python. Everything works > well now, and I am trying to make this a windows executable with > py2exe. The executable is created fine, but when I try to run it, it > fails with the following error. > > File "zipextimporter.pyc", line 82, in load_module > File "pyAA\__init__.pyc", line 1, in ? > File "zipextimporter.pyc", line 82, in load_module > File "pyAA\AA.pyc", line 8, in ? > File "zipextimporter.pyc", line 82, in load_module > File "pyAA\pyAAc.pyc", line 5, in ? > File "zipextimporter.pyc", line 98, in load_module > ImportError: MemoryLoadLibrary failed loading pyAA\_pyAAc.pyd > > I am using pyAA in this application. I searched internet, but was > unable to get any solution. I copied msvcp71.dll to windows/system32, > but still issue is there. > > I had solved it earlier (around 7 months back), but my hard drive > crashed and when I try to recreate it, I cannot seem to solve it > now. :-( > > I would be much obliged if someone could help me out here. > > When I use py2exe without bundle files option, it is working > perfectly. But when I use bundle file option, it is failing. > > I tried without zipfile option, wherein it creates a library.zip > alongwith the executable. Again it failed. I did unzip of library.zip > using 7-zip, and found that _pyAAc.pyd is there in pyAA folder inside > the zip file. So, it looks like some issue with memoryloadlibrary > function. > > >dir > 11/30/2009 09:48 AM25,172 AA.pyc > 11/30/2009 09:48 AM 3,351 Defer.pyc > 11/30/2009 09:48 AM 2,311 Path.pyc > 11/30/2009 09:48 AM11,216 pyAAc.pyc > 11/30/2009 09:48 AM 5,920 Watcher.pyc > 08/20/2005 02:00 PM49,152 _pyAAc.pyd > 11/30/2009 09:48 AM 162 __init__.pyc > > >From the trace it does look like it can extract AA.pyc etc. I am using > windows7 - can it be some clue? > -- > http://mail.python.org/mailman/listinfo/python-list > -- http://mail.python.org/mailman/listinfo/python-list
wrap exe with in another exe
Hi all, I need to call an external executable from my "calling_exe.py" python program. Can we make a executable say->"Final.exe" from the "calling_exe.py" and the "external.exe" *"calling_exe.py" ->(calling)-> "external.exe" || --- (integrate using py2exe) || how should the setup.py file look like? \||/ \/ "Final.exe" * *Regards* *Prakash* -- http://mail.python.org/mailman/listinfo/python-list
Re: Which version of MSVC?90.DLL's to distribute with Python 2.6 based Py2exe executables?
Hi all,
#use py2exe properly to create a single distributable exe
#setup.py- create a single exe that runs all boxex
from distutils.core import setup
import py2exe
import sys
# no arguments
if len(sys.argv) == 1:
sys.argv.append("py2exe")
# creates a standalone .exe file, no zip files
setup( options = {"py2exe": {"compressed": 1, "optimize": 2, "ascii": 1,
"bundle_files": 1}},
zipfile = None,
# replace test.py with your own code filename here ...
console = [{"script": *'test.py*'}] )
-------
vc ++ redistributable is a good option as well.
Regards
Prakash
--
http://mail.python.org/mailman/listinfo/python-list
Re: Which version of MSVC?90.DLL's to distribute with Python 2.6 based Py2exe executables?
*#How to use setup.py file with py2exe:*
**
python daniesetup.py py2exe --bundle 1
*#Also the data files have to taken care off in the options* list
*#Here is a sample setup.py:*
*#*
from distutils.core import setup
import py2exe
import sys
# no arguments
if len(sys.argv) == 1:
sys.argv.append("py2exe")
# creates a standalone .exe file, no zip files
setup( options = {"py2exe": {"compressed": 1, "optimize": 2, "ascii": 1,
"bundle_files": 1}},
zipfile = None,
# replace test.py with your own code filename here ...
console = [{"script": 'test.py'}] )
Regards
Prakash
--
http://mail.python.org/mailman/listinfo/python-list
search entire drive say c:
Hi all, can any of u help to search a file say "abc.txt" in entire c drive (windows) and print the path/s stating such a files presence. Thanks in advance Regards Prakash -- http://mail.python.org/mailman/listinfo/python-list
Re: search entire drive say c:
Thank u Tim Case, all, Also how to run the standalone generated from script taking unc path names to account regards Prakash On Fri, Feb 12, 2010 at 6:31 PM, Tim Chase wrote: > can any of u help to search a file say "abc.txt" in entire c drive >> (windows) >> and print the path/s stating such a files presence. >> > > Well, you can just do it from DOS: > > c:\> dir /s/b/a abc.txt > > Just use os.walk() and check the list of files returned at each > directory-level iteration. > > ROOT = "c:\\" > fname = "abc.txt".lower() > for p, d, f in os.walk(ROOT): >for fn in f: > if fn.lower() == fname: >print os.path.join(p, f) ># break > > You might also investigate using os.path.normcase() instead of .lower() > > -tkc > > > -- http://mail.python.org/mailman/listinfo/python-list
Re: How to use python to register a service (an existing .exe file)
Code of SmallestService.py is at: http://book.opensourceproject.org.cn/lamp/python/pythonwin/ Regards -- http://mail.python.org/mailman/listinfo/python-list
read text color from image
Hi All,
During automation of a test case the web interface throws failure and sucess
text in RED and GREEN colors respectively. Is there a method to read the
color of the Success(green) and Failure(red) from the screenshots of the
webinterfaces collect for Failure and Success
say :
import Image
import ImageChops
im2 = Image.open("Failure.JPG")
im1 = Image.open("Sucess.JPG")
#print list(im1.getdata())
diff = ImageChops.difference(im2, im1)
#print diff.getbbox()
#diff.show()
#print im1.tostring()
Thanks for all in advance
Prakash
--
http://mail.python.org/mailman/listinfo/python-list
FIX Message module
Hi all, Finacial Information Exchange (FIX) Protocol module is what I am looking for.Using it I would like to pump and listen to the FIX messages--(hard coded values). Please guide me through the relevant module (windows installer) and anything that you foresee as a potential bottleneck. So far I tried using QUICFIX at:*http://www.quickfixengine.org/download.html *, but could not start right away. Thanks in Advance Prakash -- http://mail.python.org/mailman/listinfo/python-list
tools for network adminstrator
Hi all, Can any one mention a list of *python based tools* (existant / could be developed) which network administrators might need. Regards Prakash -- http://mail.python.org/mailman/listinfo/python-list
python interview quuestions
Hi all, I would like to aquint myself with Python Interview questions . I am a Python Scripter, so if u could orient the pointers in the same direction it would be very handy Regards -- http://mail.python.org/mailman/listinfo/python-list
Re: WMI in Python
Very true most systems admins requirement range from : knoowing the Service
tag for a given IP to knowing the system harware details such as RAM sizes
etc. This is where Remote Inventory Management comes in handy. There is
vault of already existing vb scripts/perl scripts and batch files. To me it
looks fine if one can create a common interface and link the preexistant
scripts.
Else,
wmi command line can be directly implemented in python through
os.system("COMMAND WMI") so that redistributable python exe be created
through py2exe
Regards
Prakash
--
http://mail.python.org/mailman/listinfo/python-list
print to previous line in console
Hi, \t is for tab(forward) space; and \r is for carriage return (back space) When we are printing to the console, is there a way to display to the previous line in the console. We can achive that easily in file operations, But I want a solution in displaying on Console. regards Udhay Prakash Pethakamsetty -- https://mail.python.org/mailman/listinfo/python-list
stackless python 2.7.9 and openssl-1.1.1g
Hi,
I am using stackless Python 2.7.9 in my project and openssl-1.0.2q.
I just upgraded the Openssl version to 1.1.1g, due to which python
compilation started failing. So, I patched _hashopenssl.c and _ssl.c file
in Python Modules as per new openssl to make compilation successful.
But when I run my image on target HW, I am getting below errors. It
looks like Openssl 1.1.1g libraries are not linked to Python.
I am struggling with this issue since many days. Looks like something I
missed in my patching. Could someone please help on this.
ERROR:root:code for hash md5 was not found.
Traceback (most recent call last):
File "/usr/lib/python2.7/hashlib.py", line 147, in
globals()[__func_name] = __get_hash(__func_name)
File "/usr/lib/python2.7/hashlib.py", line 109, in
__get_openssl_constructor
return __get_builtin_constructor(name)
File "/usr/lib/python2.7/hashlib.py", line 97, in
__get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type md5
ERROR:root:code for hash sha1 was not found.
Traceback (most recent call last):
File "/usr/lib/python2.7/hashlib.py", line 147, in
globals()[__func_name] = __get_hash(__func_name)
File "/usr/lib/python2.7/hashlib.py", line 109, in
__get_openssl_constructor
return __get_builtin_constructor(name)
File "/usr/lib/python2.7/hashlib.py", line 97, in
__get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha1
ERROR:root:code for hash sha224 was not found.
Traceback (most recent call last):
File "/usr/lib/python2.7/hashlib.py", line 147, in
globals()[__func_name] = __get_hash(__func_name)
File "/usr/lib/python2.7/hashlib.py", line 109, in
__get_openssl_constructor
return __get_builtin_constructor(name)
File "/usr/lib/python2.7/hashlib.py", line 97, in
__get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha224
ERROR:root:code for hash sha256 was not found.
Traceback (most recent call last):
File "/usr/lib/python2.7/hashlib.py", line 147, in
globals()[__func_name] = __get_hash(__func_name)
File "/usr/lib/python2.7/hashlib.py", line 109, in
__get_openssl_constructor
return __get_builtin_constructor(name)
File "/usr/lib/python2.7/hashlib.py", line 97, in
__get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha256
ERROR:root:code for hash sha384 was not found.
Traceback (most recent call last):
File "/usr/lib/python2.7/hashlib.py", line 147, in
globals()[__func_name] = __get_hash(__func_name)
File "/usr/lib/python2.7/hashlib.py", line 109, in
__get_openssl_constructor
return __get_builtin_constructor(name)
File "/usr/lib/python2.7/hashlib.py", line 97, in
__get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha384
ERROR:root:code for hash sha512 was not found.
Traceback (most recent call last):
File "/usr/lib/python2.7/hashlib.py", line 147, in
globals()[__func_name] = __get_hash(__func_name)
File "/usr/lib/python2.7/hashlib.py", line 109, in
__get_openssl_constructor
return __get_builtin_constructor(name)
File "/usr/lib/python2.7/hashlib.py", line 97, in
__get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha512
Thanks & Regards,
Bhashkar
--
https://mail.python.org/mailman/listinfo/python-list
Re: stackless python 2.7.9 and openssl-1.1.1g
Hi Barry, Thanks for your response. I am not an expert in python code. Could you please elaborate a bit more on this. Which cpython code are you referring to? did you modify other files also apart from _hashopenssl.c and _ssl.c to work with openssl-1.1.1g ? Regards, Bhashkar On Fri, Sep 25, 2020 at 2:40 AM Barry Scott wrote: > > > > On 24 Sep 2020, at 19:21, bhashkar prakash Singh < > [email protected]> wrote: > > > > Hi, > > > > I am using stackless Python 2.7.9 in my project and openssl-1.0.2q. > > I just upgraded the Openssl version to 1.1.1g, due to which python > > compilation started failing. So, I patched _hashopenssl.c and _ssl.c > file > > in Python Modules as per new openssl to make compilation successful. > > But when I run my image on target HW, I am getting below errors. It > > looks like Openssl 1.1.1g libraries are not linked to Python. > > I am struggling with this issue since many days. Looks like something I > > missed in my patching. Could someone please help on this. > > I recently built python 2.7.18 against openssl 1.1.1g without issue. > Maybe look see what is in the cpython code that works fine. > > Barry > > Thanks & Regards, > > Bhashkar > > -- > > https://mail.python.org/mailman/listinfo/python-list > > > > -- https://mail.python.org/mailman/listinfo/python-list
Re: stackless python 2.7.9 and openssl-1.1.1g
>Get the source of python.org python 2.7.18 and you will find that builds without patches >against OpenSSL 1.1.1g. >I would then diff the C files that do not compile in stackless to look for the required fixes. Thanks Barry. Some warnings were left in code after patching cpython files. After fixing them, all those errors are gone. Now I have another issue. now the threading module in python is not found. I don't see this is anyway related to openssl upgrade but this issue is not occurred where openssl has not been upgraded. File "/usr/lib/python2.7/site-packages/websocket/__init__.py", line 22, in from ._abnf import * File "/usr/lib/python2.7/site-packages/websocket/_abnf.py", line 30, in from threading import Lock File "threading.py", line 6, in import thread ImportError: No module named thread Could you give any clue on this ? Thanks & Regards, Bhashkar On Fri, Sep 25, 2020 at 12:43 PM Barry wrote: > > > On 25 Sep 2020, at 03:28, bhashkar prakash Singh > wrote: > > > Hi Barry, > > Thanks for your response. > > I am not an expert in python code. Could you please elaborate a bit more > on this. Which cpython code are you referring to? > did you modify other files also apart from _hashopenssl.c and _ssl.c to > work with openssl-1.1.1g ? > > > Get the source of python.org python 2.7.18 and you will find that builds > without patches against OpenSSL 1.1.1g. > > I would then diff the C files that do not compile in stackless to look for > the required fixes. > > Barry > > > Regards, > Bhashkar > > On Fri, Sep 25, 2020 at 2:40 AM Barry Scott > wrote: > >> >> >> > On 24 Sep 2020, at 19:21, bhashkar prakash Singh < >> [email protected]> wrote: >> > >> > Hi, >> > >> > I am using stackless Python 2.7.9 in my project and openssl-1.0.2q. >> > I just upgraded the Openssl version to 1.1.1g, due to which python >> > compilation started failing. So, I patched _hashopenssl.c and _ssl.c >> file >> > in Python Modules as per new openssl to make compilation successful. >> > But when I run my image on target HW, I am getting below errors. It >> > looks like Openssl 1.1.1g libraries are not linked to Python. >> > I am struggling with this issue since many days. Looks like something I >> > missed in my patching. Could someone please help on this. >> >> I recently built python 2.7.18 against openssl 1.1.1g without issue. >> Maybe look see what is in the cpython code that works fine. >> >> Barry >> > Thanks & Regards, >> > Bhashkar >> > -- >> > https://mail.python.org/mailman/listinfo/python-list >> > >> >> -- https://mail.python.org/mailman/listinfo/python-list
python query on firebug extention
hello
i am working on selenium module of python, i know how to make
extension of firebug with selenium, but i want to know how to use
firebug extension with request module / mechanize . i search a lot
but unable to find it , please help .
i want technique similar like :-
from selenium import webdriver
fp = webdriver.FirefoxProfile()
fp.add_extension(extension='firebug-.8.4.xpi')
fp.set_preference("extensions.firebug.currentVersion", "1.8.4")
browser = webdriver.Firefox(firefox_profile=fp)
in request module or mechanize module
--
https://mail.python.org/mailman/listinfo/python-list
Re: Can't install/uninstall Python
On Tuesday, 14 July 2015 17:24:22 UTC+5:30, Chris Angelico wrote: > On Tue, Jul 14, 2015 at 7:20 AM, Thomas Via wrote: > > I'm trying to reinstall Python 2.7.9/2.7.10, but during the installation, it > > didn't let me, which gave me this: > > > > "There is a problem with this Windows Installer package. A program required > > for this install to complete could not be run. Contact your support > > personnel or package vendor." > > Hi! > > What version of Windows are you running? And what architecture (32-bit > or 64-bit)? Exactly what file did you download, and from where? The > more information you can provide, the easier it will be to figure out > what's going on. > > ChrisA Hi! You can uninstall the python directly through the control panel, normally. But, if the python was installed as part of any software package that you have installed in your system, then it requires that specific software to be uninstalled a prior its un-installation. Uday Prakash -- https://mail.python.org/mailman/listinfo/python-list
Re: request
Yes! it is working, and do you have any idea about pylauncher. If possible,
could you brief something about it.
*UDHAY PRAKASH*
Ph:+91-9533787794
udhayprakash.blogspot.com
On Wed, Oct 14, 2015 at 1:01 AM, Mathew Carrick
wrote:
> Hi Uday,
>
> Pip should support using the pip{version} command to install
> version-specific packages. Try using pip2.7 to install 2.7 packages.
>
> Best,
> Mathew Carrick
>
> On Tue, Oct 13, 2015 at 2:45 AM, Uday Pethakamsetty <
> [email protected]> wrote:
>
>> Hi
>>
>>
>>
>> I am working on python 2.x for long time.
>>
>>
>>
>> I thought of testing python 3.5 for possible usage.
>>
>>
>>
>> The problem is that when I installed python 3.5, all the pip installs are
>> directing to python 3.5, instead of my native python 2.7.
>>
>>
>>
>> I heard of a feature called pylauancher; but I didn’t find any satisfying
>> documentation on it.
>>
>>
>>
>> Either pylauncer, or something else Solution—could you help reply the
>> possible solution to work comfortably on either versions, without
>> interfering, in my windows 64 bit machine.
>>
>>
>>
>>
>>
>> Thanks & regards
>>
>>
>>
>> Udhay Prakash
>>
>> --
>> https://mail.python.org/mailman/listinfo/python-list
>>
>>
>
--
https://mail.python.org/mailman/listinfo/python-list
Expect Telnet
Hi all,
I am not sure how this works, but am composing my query here.
I am trying to expect the below snippet using telnetlib.
#
bash# install
blah blah blah
do you want to continue [y/n]? y
blah blah blah
blah blah blah
blah blah blah
blah blah blah
Installation complete
bash#
##
For the above, i am doing
t.read_until("bash#")
t.write("install\n")
t.read_until("n]? ")
t.write("y\n")
t.read_until("bash#")
t.write('exit\n")
However, from the time i key 'y/n' till the install script exits, there is a
lot of data that is to be logged. I takes around 1 hour for the whole script
to exit.
Is there some way i can read whats happening behind the scenes until it hits
the read_until?
Thanks for the help
--
Vinay
--
http://mail.python.org/mailman/listinfo/python-list
Animated GIF in Tkinter
Hello, I have created a frame in which i want to display an animated progressbar in a canvas. I use PhotoImage function of PIL. But it doesn't display the animated gif code looks like this self.imgobj = PhotoImage(file=imgpath) self.c = Canvas(self.frame2, bg='white',width=64,height=310) self.c.place(x=x0,y=y0) self.c.create_image(x0,y0,image=self.imgobj,anchor=NW) did a lot of googling on it. but nothing found. I can't switch to wxPython. Please help me. thanks -- Surya Prakash Garg Bangalore +919886801350 -- http://mail.python.org/mailman/listinfo/python-list
buggy popup
Hi All, Need some idea here: On my windows machine, there is a Java based program that runs all the time. Every now and then, a popup appears out of this program. To close this popup, it requires user to Check the Do-not-show-this-popup check box and then, click on OKAY button. Is there a python way of automating the above procedure? Say, I run a python script on my windows machine which waits all the time and then if the popup appears, the python guy checks the check box and then hits the OKAY button? Any modules/ packages that I can refer to? A small hint would be of a big help. Thanks, -- Vinay -- http://mail.python.org/mailman/listinfo/python-list
check MS SQL database status, and execute preconfigured jobs
Hi
I am using pyodbc to connect to MS SQL server. I got a result for
cursor.execute('SELECT * FROM sys.databases') statement.
But, I dont know what fields among them must be considered to ensure that
database is up and running and is fine.
IN this
https://www.mssqltips.com/sqlservertip/1477/methods-to-determine-the-status-of-a-sql-server-database/,
example 1 lists all the fields.
Post that, I want execute some procedures, I can do them with cursor.execute()
in the same way.
BUT, as I am new to MS SQL db, can someone let me know which fields must be
taken into consideration to ensure that db is up and running fine.
--
https://mail.python.org/mailman/listinfo/python-list
