is going to take longer.
Please suggest how should I go about implementing it.
I'm currently executing it as:
import main from script2
ret_code = main()
return ret_code
which surely is not going to achieve me what I intend.
Thanks,
Rajat.
--
http://mail.python.org/mailman/listinfo/p
On Jan 7, 2:21 pm, "VYAS ASHISH M-NTB837"
wrote:
> Use threads
>
> Regards,
> Ashish Vyas
>
>
>
> -Original Message-
> From: python-list-bounces+ntb837=motorola@python.org
>
> [mailto:python-list-bounces+ntb837=motorola@python.org] On Beh
Hi,
I'm using threading module in Python 2.6.4. I'm using thread's join()
method.
On the new thread I'm running a function which returns a code at the
end. Is there a way I access that code in the parent thread after
thread finishes? Simply, does join() could get me that co
the main function on a new thread, it
always used to run completely. I used to run it as:
exec("from " + passed_script_file + " import main")
retCode = main()
Thanks and regards,
Rajat
--
http://mail.python.org/mailman/listinfo/python-list
On Jun 30, 2:10 pm, Tim Golden wrote:
> Dudeja, Rajat wrote:
> > Hi,
>
> > I'm looking for a way to call the NtQueryInformationProces() and
> > ReadProcessMemory() of WindowsXP from Python.
>
> > Can anyone direct me to some examples where they have been s
Hi,
Using ctypes can I access the windows structures like:
PROCESS_INFORMATION_BLOCK, Process Environment Block(PEB),
PEB_LDR_DATA, etc?
Regards,
Rajat
--
http://mail.python.org/mailman/listinfo/python-list
> > Using ctypes can I access the windows structures like:
>
> > PROCESS_INFORMATION_BLOCK, Process Environment Block(PEB),
> > PEB_LDR_DATA, etc?
>
> ctypes.wintypes lists all of the Windows structures included with the
> module.
>
> You should be able to use ctypes.Structure class to roll your o
On Jul 8, 4:57 am, Lawrence D'Oliveiro wrote:
> In message , Christian
>
> Heimes wrote:
> > By the way most operating systems don't lock a file when it's opened for
> > reading or writing or even executed.
>
> The general conclusion seems to be that mandatory locking is more trouble
> than it's w
On Jul 8, 12:45 pm, Tim Golden wrote:
> Rajat wrote:
> > On Jul 8, 4:57 am, Lawrence D'Oliveiro > central.gen.new_zealand> wrote:
> >> In message , Christian
>
> >> Heimes wrote:
> >>> By the way most operating systems don't lock a
On Jul 9, 1:21 pm, Tim Golden wrote:
> Rajat wrote:
> > I've used the Handle.exe and got the following results:
>
> > ------
> > notepad.exe pid: 3540 COMP\rajatd
> > C: File (RW-)
On Jul 9, 3:21 pm, Tim Golden wrote:
> Rajat wrote:
> > The Notepad process information is fine here. However, with wordpad
> > the results are not much differentiating:
>
> > ------
> > wor
Hi,
I'm using Windows XP and I'm looking for way out to remove .svn folders from
my directory. But I'm unable to do that.
Does any one one has written any script for removing the hidden / readonly
files or directories?
Regards,
Rajat
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
Is there a module or script already written for creating backup of files ?
--
Regrads,
Rajat
--
http://mail.python.org/mailman/listinfo/python-list
son I did this inside a thread is because I want application to
wait until the backup created (making sure that the older ones are deleted
and new one created)
Can some one help in this?
Regards,
Rajat
--
http://mail.python.org/mailman/listinfo/python-list
This is not
appropriate for writing a wrapper.
Please suggest some way to write a wrapper.
Thanks and regards,
Rajat
--
http://mail.python.org/mailman/listinfo/python-list
t; placed in the Pythonxx/dlls directory in your Windows Python installation.
> Ctypes is mostly used to call functions in a dll that is *not* a python
> extension module, that was not written for Python.
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
Well I did n
e are some 150 APIs exposed by the dll. Is there
any tool that can autogenerate some of the member functions for the class
since new APIs might as well get added in future.
Could SWIG be of use here?
Cheers,
Rajat
--
http://mail.python.org/mailman/listinfo/python-list
Hi All,
Is ctypes or something like this available for Jython?
--
Regards,
Rajat
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I'm using Python 2.5.2. I'm getting this error whenever I try to unpack less
values from a function.
ValueError: too many values to unpack
I want to know if there is a way I can unpack less values returning from a
function?
Thanks,
Rajat
--
http://mail.python.org/mailman/listi
ng for an open source IDE / editor that has source level
debugging. Please suggest some tool.
I'm intending to write a testing tool that uses Subversion. Is there
some module available for subversion, out of the box, that I can import
in my script?
Regards,
Rajat
Notice: This e-mail is intended so
it does not mention what basic things need installation before you
use the Dynamic Language Toolkit. So, my question is : what combination
of packages are required for using eclipse as an IDE for python?
Thanks,
Rajat
Notice: This e-mail is intended solely for use of the individual or entity to
_install.html
I see that this link for Pydev provides a commercial version of pydev
(so this points the evaluation version of it) . Is there any open source
version of it?
cheers,
Rajat
Notice: This e-mail is intended solely for use of the individual or entity to
which it is addressed
ay in Python way or
an approach to organize my python GUI application code?
I'll be using Eclipse and PyDev as my development tools. So, please
suggest from these tools prespective.
Thanks & regards,
Rajat
Notice: This e-mail is intended solely for use of the individual or entit
more
output files (for example a text or graphic file)
>you might want to have an 'output' directory in your project.
>Some people use a 'src' directory, but that is not nearly as neccessary
as in a complied language.
Thanks Ken and Fredrik for your direction.
Cheer
Tkinter do I actually require Tk installed on my machine? Please
suggest and where can I find both these modules?
Also, please direct me to a good and short document on using Tkinter or
Tk in Python.
Cheers,
Rajat
Notice: This e-mail is intended solely for use of the individual or entity to
w
the GUI.
For your convenience, I'm attaching this code also as myModule1.py .
Please some one review it and help create me this GUI.
PS: The desired GUI is attached as a GIF file. The version v1.4.5.1 is
a label the contents of which are dynamically picked.
Thanks and regards,
Rajat
&l
m not able to
>place none of the widgets correctly in the GUI.
>
>For your convenience, I'm attaching this code also as myModule1.py .
>Please some one review it and help create me this GUI.
>
>PS: The desired GUI is attached as a GIF file. The version v1.4.5.1 is
>a label the
Hi,
I'm using the CTYPES module of python to load a dll. My dll contains a
Get_Version function as:
long __stdcall af1xEvdoRDll_GetVersion(long version[4]);
This function accepts a long array of 4 elements.
Following is the python code I've written:
from ctypes import *
abc = windll.af1xEvdoRD
On Tue, Aug 19, 2008 at 11:04 AM, <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm using the CTYPES module of python to load a dll. My dll contains a
> Get_Version function as:
> long __stdcall af1xEvdoRDll_GetVersion(long version[4]);
>
> This function accepts a long array of 4 elements.
>
> Following is
ion(version)
print version
for i in version: print i
*
Results are : 2, 1, 5, 0
Cheers,
Rajat
--
http://mail.python.org/mailman/listinfo/python-list
ng so quickly to all questions.
I also add the letter 'v' same as you suggested. However, I'm looking
to store this into some variable ( that variable could be be a string,
tuple or anything, Im not sure which is the suited one) so that I can
access it in some other module that will then display this version
information in a Label Widet in GUI.
So, what is the best way to store 'v1.2.3.4' in a variable? And, what
type of variable is most suited (so as able to be used in other module
probably, as string there)?
Thanks,
Rajat
--
http://mail.python.org/mailman/listinfo/python-list
add the letter 'v' same as you suggested. However, I'm looking
> to store this into some variable ( that variable could be be a string,
> tuple or anything, Im not sure which is the suited one) so that I can
> access it in some other module that will then display this version
> information in a Label Widet in GUI.
>
> So, what is the best way to store 'v1.2.3.4' in a variable? And, what
> type of variable is most suited (so as able to be used in other module
> probably, as string there)?
>
> Thanks,
> Rajat
>
Googled and found :
s = "v%d.%d.%d.%d" % tuple(version)
print s
it's working.
Result is : v1.2.3.4
Thanks,
Rajat
--
http://mail.python.org/mailman/listinfo/python-list
efer some other entry level tutorial, the following is said to be
> really good:
>
>http://www.ibiblio.org/g2swap/byteofpython/read/
>
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
Thanks Fredrik for your support.
Regrads,
Rajat
--
http://mail.python.org/mailman/listinfo/python-list
sion under Test
self.lblVersionUnderTest = Label(master, \
text = "v2.1.5.0")
self.lblVersionUnderTest.grid(row = 15, \
column = 2, \
sticky = W, \
padx = 30)
Please sugges
ould I call the Tix's combo box from my existing
GUI application that heavily uses the Tkinter widgets?
Kindly provide me some code examples.
Thanks and regards,
Rajat
--
http://mail.python.org/mailman/listinfo/python-list
isLib.set,\
> height = 1,
> width = 30)
>
> Please suggest how could I call the Tix's combo box from my existing
> GUI application that heavily uses the Tkinter widgets?
> Kindly provide me some code example
hnically called?
Please suggest how can I do this?
--
Regrads,
Rajat
--
http://mail.python.org/mailman/listinfo/python-list
n Tix combo box.
Thanks and regards,
Rajat
--
http://mail.python.org/mailman/listinfo/python-list
rsion(),
C_getVesion()
The functionality I'm lookking for is that depending on the dll passed
the right getVersion should be passed.
I'm able to load the all the dlls passed to the function but I'm not
able to call the function names dynamically
Please help
Regards,
Rajat
--
http://mai
>
> Use getattr - same as with any other object.
> Suppose some_dll is your loaded DLL, then:
>
> function = getattr(some_dll, function_name)
>
> --
> Gabriel Genellina
>
> --
> http://mail.python.org/mailman/listinfo/python-list
Hi Gabriel,
Thanks for the help. That solved my problem.
--
Regards,
Rajat
--
http://mail.python.org/mailman/listinfo/python-list
2. As a results of this messagebox (called before the mainloop) the
original Gui started by mainloop doesnot work as desired. Some of the
checkbuttons are displayed as unset (i.e un-ticked). These
checkbuttons used to be set at initialization before I stared using
this messagebox.
Please help.
Th
tried using a variable for http path but still I'm getting the same error
Please help.
--
Regards,
Rajat
--
http://mail.python.org/mailman/listinfo/python-list
nother window" is inevitable, but you can hide and
> show it again when needed. You could do something like this:
>
> import tkMessageBox
> import Tkinter
>
> class App(object):
>def __init__(self, master):
>self.master = master
> print &qu
check whether
the item is a list or just a string?
Thanks,
Rajat
--
http://mail.python.org/mailman/listinfo/python-list
g.
Please help
--
Regrads,
Rajat
--
http://mail.python.org/mailman/listinfo/python-list
else:
dirListFinal.append(item)
item.endswith() does not seem to be working.
Please help
--
Regrads,
Rajat
--
http://mail.python.org/mailman/listinfo/python-list
indentation level as the "if" and delete those 3 lines.
>
> Not that these changes will necessarily fix your program, but they do
> make it easier to comprehend for the reader.
>
> - Chris
>
>>
>>
>> item.endswith() does not seem to be working.
>>
>> Please he
; for item in dirList:
>>print item
>>if item.endswith('\\') == True:
>>item = item[0:-1] # This one I googled and
>> found to remove the last character /
>>dirListFinal.append(item)
>>else:
&
# This one I googled and
>>> found to remove the last character /
>>> dirListFinal.append(item)
>>>else:
>>>dirListFinal.append(item)
>>>
>>> item.endswith() does not seem to be working.
>>>
>>
t;>>print item
>>>if item.endswith('\\') == True:
>>
>> if item[-1] == '\\':
>
> Which will fail badly if item is the empty string.
>
>
> Rajat, rather than trying to invent your own code to join dir
se suggest how can I clear up the ( delete the entries) in combo2.
Thanks and regards,
Rajat
--
http://mail.python.org/mailman/listinfo/python-list
subLB = self.combo2.subwidget("listbox")
subLB.delete(0, END)
#Add the results to the combo box
for results in resultsVer:
self.combo2.insert(END, results)
--
Regards,
Rajat
--
http://mail.python.org/mailman/listinfo/python-list
= self.cbAnalysisLibVersion.subwidget("entry")
subEntry.delete(0,END)
This does not seem to be working?
--
Regrads,
Rajat
--
http://mail.python.org/mailman/listinfo/python-list
= self.cbAnalysisLibVersion.subwidget("entry")
subEntry.delete(0,END)
But this is not working.
Please help.
Thanks and regards,
Rajat
--
http://mail.python.org/mailman/listinfo/python-list
ince this closes my parent GUI ( the
main GUI).
Please suggest some other way around.
Thanks and regards,
Rajat
--
http://mail.python.org/mailman/listinfo/python-list
be able
to easily access the update value of the variable.
Could some one provide me a sample code of module intialization? And
how can I ensure that module initialization is done only once?
Thanks and regards,
Rajat
--
http://mail.python.org/mailman/listinfo/python-list
> While this is technically legal, you should restrain yourself from doing
> such a thing, unless you *really* know what you're doing and why.
>
>> but the variable is not getting updated in the module
>> containing global symbols ( variables).
>
> I suspect you didn't use a qualified name when imp
object to the importing module's namespace.
>
> have you read:
>
> http://effbot.org/zone/import-confusion.htm
>
> ?
>
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
Thanks for your help guys that I got my problem resolved.
Regards,
Rajat
--
http://mail.python.org/mailman/listinfo/python-list
for something that generates actual differences and
moreover it is cross platform as well. As I need that same thing in
both my windows and linux box.
Even if it is a utlility please suggest.
Thanks and regards,
Rajat
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I've a batch file that I open with the subprocess .Popen() . When this
batch file is run I want to bring it to the foreground.
Please suggest how can I do this?
Regards,
Rajat
--
http://mail.python.org/mailman/listinfo/python-list
kMessageBox._show("Error", \
type='ok', icon='error', \
message="Error executing %s Test
Harness" % libName)
return None
else:
print retCode
But the message is never displayed. Please suggest if there is
something wrong with this code
--
Regards,
Rajat
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I m using subprocess module and using the Popen call. While the
subprocess if running, I want to display a tkMessageBox().
Does some one has a sample code for this?
Thanks and regards,
Rajat
--
http://mail.python.org/mailman/listinfo/python-list
% libName)
>> return None
>> else:
>> print retCode
>>
>> But the message is never displayed. Please suggest if there is
>> something wrong with this code
>
> I think you should first show your message, *then* wait for the
> process to finish.
>
> Paul
> --
> http://mail.python.org/mailman/listinfo/python-list
>
Such a silly mistake I'm committing.
Thanks a ton.
--
Regrads,
Rajat
--
http://mail.python.org/mailman/listinfo/python-list
ocess.PIPE).communicate()[0]
batchFilePath is the path of the batch file.
--
Regrads,
Rajat
--
http://mail.python.org/mailman/listinfo/python-list
ll = True, \
> stdout = subprocess.PIPE, \
> stderr = subprocess.PIPE).communicate()[0]
>
>
> batchFilePath is the path of the batch file.
>
>
>
> --
> Regrads,
> Rajat
>
Ok, I re-phrase my question
PE, \
>> > stderr =
subprocess.PIPE).communicate()[0]
>>
>> > batchFilePath is the path of the batch file.
>>
>> > --
>> > Regrads,
>> > Rajat
>>
>> Ok, I re-phrase my question:
>>
>> there i
Or may be some one has written some parser?
Any help is greatly appreciated.
Thanks and regards,
Rajat
--
http://mail.python.org/mailman/listinfo/python-list
mod1
a = 20
mod.update(a)
print mod.a < does not print anything
mod1
a = 10
def update(someInt):
global a
a = someInt
print a < this does actually print a = 20
Please help.
Regards,
Rajat
--
http://mail.python.org/mailman/listinfo/python-list
this does actually print a = 20
>
> I'm surprised it runs at all -- as far as I can see "mod" in
> "mod.update(a)" and "print mod.a" is not defined. Did you mean "mod1"?
> If I change it to that, both print statements print "20" as I'd
> expect.
>
> I take it you do have a *really* good reason to use a global?
>
> --
> Tim Rowe
> --
> http://mail.python.org/mailman/listinfo/python-list
>
--
Regrads,
Rajat
--
http://mail.python.org/mailman/listinfo/python-list
>I take it you do have a *really* good reason to use a global?
Please suggest some way other than using global. I want to get rid of it
--
Regards,
Rajat
--
http://mail.python.org/mailman/listinfo/python-list
c:\12.txt
Config File:c:\abc.ini
###
I intent to show only the things that differ with their proper headings(as
above)
Please help me to get the heading stuff out.
Regards,
Rajat
--
http://mail.python.org/mailman/listinfo/python-list
this after the function func() has processed
completely.
PS : I'm not using any threading stuff here..
Please help me resolve this problem.
Regards,
Rajat
--
http://mail.python.org/mailman/listinfo/python-list
mat1 = pat1.search(line)
if mat1:
print line
line = fd.readline()
But the above prints the whole file instead of the hash lines only.
Please help
Regards,
Rajat
--
http://mail.python.org/mailman/listinfo/python-list
le):
>if "#" in line:
> print line
>
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
Thanks Fredrik, this works. Indeed it is a much better and cleaner
approach.
--
Regards,
Rajat
--
http://mail.python.org/mailman/listinfo/python-list
in %s'%' range" %(toleranceInPer))
TypeError: not enough arguments for format string
I've also tried this:
fdTolFile.writelines("\n\tdiff Not in %s \% range" %(toleranceInPer))
But still I get the same error
Thanks and regards,
Rajat
--
http://mail.python.org/mailman/listinfo/python-list
txtLogger.xview())
self.vsb.config(command = self.txtLogger.yview())
Please help.
Thanks and regards,
Rajat
--
http://mail.python.org/mailman/listinfo/python-list
character to the file using the following
>> format:
>>
>> fdTolFile.writelines("\n\tdiff Not in %s '%' range" %(toleranceInPer))
>>
>
> Try %% :)
>
> Christian
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
Thanks Garry & Christian.
It worked.
Regards,
Rajat
--
http://mail.python.org/mailman/listinfo/python-list
print 'Path does not exist'
This always prints the above print statements whether or not the Results
folder exists or not.
Is there any such function to check existence of files. / folder at Http
paths?
--
Thanks and regards,
Rajat
--
http://mail.python.org/mailman/listinfo/python-list
> yscrollcommand = self.vsb.set, \
> wrap = NONE, \
> font = ("courier",12))
> self.hsb.config(command = self.txtLogger.xview())
> self.vsb.config(command = self.txtLogger.yview())
>
wrap = NONE, \
>> font = ("courier",12))
>> self.hsb.config(command = self.txtLogger.xview())
>> self.vsb.config(command = self.txtLogger.yview())
>>
>>
>> Please help.
>>
>>
>> Thanks and regards,
>> R
)
self.btViewComparisonResults.config(state = NORMAL)
Please suggest what is that I am missing
Regards,
Rajat
--
http://mail.python.org/mailman/listinfo/python-list
else:
> #Check box is ticked
> #Enable the Tolerance text box
> self.txtTolerance.config(state = NORMAL, \
> bg = "white")
> #Enable the Reference Analysis Combo box
> #self.cbAnalysisLibVersion.config(state = NORMAL, ed
Hello,
I'm looking for a script that creates a backup of a directory but keeps only
one backup.
I've tried using all the os modules commands but could not create one.
Does any one has any such custom script or function?
Thanks and regards,
rajat
--
http://mail.python.org/mailma
est of the widgets are
tkinter widgets.
So,
1. Is the above approach fine?
2. How can I stop the dos window from opening up?
--
Regrads,
Rajat
--
http://mail.python.org/mailman/listinfo/python-list
Test Automation")
#Create GUI Object and pass the logger object
myAppGUIObject = myAppGUI(myRoot, logger) #My AppGUI class creates the GUI
which heavily uses the Tkinter widgets and only TixComboBox
myRoot.mainloop()
Please suggest if there is anything I'm missing.
Thanks a
t; myRoot.title("Test Automation")
> > #Create GUI Object and pass the logger object myAppGUIObject =
> > myAppGUI(myRoot, logger) #My AppGUI class creates the GUI which
> > heavily uses the Tkinter widgets and only TixComboBox
> >
> > myRoot.mainloop()
&g
creen.
My program is staring as :
myRoot = Tix.Tk()
myRoot.title("Test Automation")
< some stuff>
< ...>
myRoot.mainloop()
Thanks and regadrs,
Rajat
--
http://mail.python.org/mailman/listinfo/python-list
ting as
v1.3.5.0
But on wIindows 2000 it prints v0.0.0.0
Please suggest why does it happen.
Thanks and regards,
Rajat
--
http://mail.python.org/mailman/listinfo/python-list
wser and supply a wrong password. It appears
password is not accepting.
I'm new to web programming. The aim is to automate user clicks on a web
server which can be replicated using python and http. Please suggest / help.
Regards,
Rajat
--
http://mail.python.org/mailman/listinfo/python-list
only solution?
Pleae suggest.
Thanks,
Rajat
Notice: This e-mail is intended solely for use of the individual or entity to
which it is addressed and may contain information that is proprietary,
privileged, company confidential and/or exempt from disclosure under applicable
law. If the reader is no
Hi,
I've a PID of a process (the process is a notepad application), I want to know
which file is opened by this process.
regards,
Rajat
Notice: This e-mail is intended solely for use of the individual or entity to
which it is addressed and may contain information that is propri
Hi,
I'm looking for a way to call the NtQueryInformationProces() and
ReadProcessMemory() of WindowsXP from Python.
Can anyone direct me to some examples where they have been successfully called
through Python?
Thanks and regards,
Rajat
Notice: This e-mail is intended solely for use o
e has
done implementation and could pointing me in some right direction.
Regards,
Rajat
--
http://mail.python.org/mailman/listinfo/python-list
I have had a look at psutil, however, this only works with Python 2.6.x and
above. We are using Python 2.5.2 and updating python could pose certain
problems. So, I'm not keep on using psutils.
--
Regrads,
Rajat
--
http://mail.python.org/mailman/listinfo/python-list
How to check if a particular file is locked by some application? (i.e. the
file is opened by some application)?
--
Regrads,
Rajat
--
http://mail.python.org/mailman/listinfo/python-list
Hi Everyone,
Is there a way to log all function calls of a class without changing anything
in that class.
What I mean to say is if I have written a class previously and I want to enable
logging in that then I would probably need to write the following before my
function calls-
logger.debug('
96 matches
Mail list logo