stringa = "hi"
stringb = "hiy"
I'd like it to return -1 when I do:
returnVal = stringa.find(stringb);
Instead, it treats stringa as "hi" and stringb as "hi".
How do I solve this?
--
http://mail.python.org/mailman/listinfo/python-list
Hi. I need a dummy's explanation to utilizing the win32com component
to access Microsoft Excel.
So far, I have this code.
import win32com.client
xl = win32com.client.Dispatch("Excel.Application")
xl.Visible = 1
workbook = xl.Workbooks.Open("C:\test.xls")
Now, my question is, whe
Hey all. i solved this problem by logging on with my network domain
login (log in using...)
instead of NT AUTHORITY\SYSTEM which only gave out local privleges to
the process started off by Task scheduler.
On Oct 15, 10:36 am, korean_dave <[EMAIL PROTECTED]> wrote:
> Does anyone kn
Does anyone know how to properly kick off a script using Windows
Scheduled Task? The script calls other python modules within itself.
HERE'S THE CATCH:
I am used to running the script directly from the command window and
the print() is very handy for us to debug and monitor. When running
the task f
import datetime
def main():
timenow = datetime.datetime.now()
print(str(timenow.hour))
if __name__ == "__main__":
main()
If the time was, say, 2pm, how can I make output of timenow.hour "14"
instead of "2"?
Thanks.
-Dave
--
http://mail.python.org/mailman/listinfo/python-list
runs fast. So
we have basically 20 iterations in a second. When i sort by time, it
sorts by string (output) b/c there are 20 outputs in a second.
Thanks all.
On Aug 14, 12:07 pm, Bruno Desthuilliers wrote:
> korean_dave a écrit :
>
> > Still the same output...
>
> "sam
1:47 am, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> korean_dave wrote:
> > Still the same output...
>
> > Here's the actual code...
>
> > for x in range(0,2):
> > for y in range(0,27):
> > for z in range(0,15):
> >
Still the same output...
Here's the actual code...
for x in range(0,2):
for y in range(0,27):
for z in range(0,15):
print(str(x) + " " + str(y) + " " + str(z))
--
http://mail.python.org/mailman/listinfo/python-list
for y in range(0,iNumItems):
print(str(y))
How do i make the output go IN ORDER
0
1
2
3
4
5
6
etc.
instead of
0
1
10
11
12
13
14
2
3
4
5
6
7
8
9
--
http://mail.python.org/mailman/listinfo/python-list
so, i code this:
-
#!/usr/bin/python
import sys
import os
for param in os.environ.keys():
print "%20s %s" % (param,os.environ[param])
print(os.environ['PATH'])
print(sys.argv[1:])
--
and then when i type in -->
python test.py "testparamet
a = open("Thefile.txt","r")
while ?:
result = a.readln()
what do i put in if i want to keep reading line by line until i
reach the end of the file?
I don't want to break the loop if there is a blank line, because there
will be.
Ex. of a file:
map1
result1
map2
result 2
map3
result
What does this operator do? Specifically in this context
test.log( "[[Log level %d: %s]]" % ( level, msg ), description )
(Tried googling and searching, but the "%" gets interpreted as an
operation and distorts the search results)
--
http://mail.python.org/mailman/listinfo/python-list
>From command Prompt, i type in a script, "tryme.py".
This, instead, brings up PythonWin editor and Interactive Window.
Path variable is "C:\Python24". (I need Python 2.4 installed, not 2.5)
How do I make it so that the script runs?
--
http://mail.python.org/mailman/listinfo/python-list
How do I use the win32com API to manipulate IE windows ALREADY open?
ie = Dispatch("InternetExplorer.Application") opens a new window.
But I'd like to be able to find, of windows already open, a specific
window (with a specified property, matching url, etc.)
--
http://mail.python.org/mailman/list
Hi. Where can i find the API for this extension?
Sourceforge only has downloads. Python has stopped supporting the
upkeep of the versions.
Thanks.
--
http://mail.python.org/mailman/listinfo/python-list
How can i use the find() function on a string that is composed of tons
of symbols that cause errors...
THis is my string:
find("p, li { white-space: pre-wrap; }Connected!","margin")
The tough part about this is that the string is dynamically produced.
So I can't manually go into the string and e
What does sre_parse.py (Secret Labs' Regular Expression Engine) do?
I see this referred to in some errors when i call the source()
function
(e.g. source(findFile("scripts","thisonehere.py")) )
The error then refers to name "ImportWarning" not defined?? (<--that
might be a proprietary warning, as
This allows me to see output:
---begin of try.py
print "Hello World"
--end of try.py
This DOESN'T though...
--begin of try2.py
def main():
return "Hello"
--end of try2.py
Can someone explain why???
--
http://mail.python.org/mailman/listinfo/python-list
Hi all. I am using this to try to document my python-coded apps.
http://effbot [DOT] org/zone/pythondoc [DOT] htm
i am using windows XP professional. I have put the install directory
of pythondoc.py in my path file. So i "cd" to the directory containing
the python scripts I wish to python-doc, typ
19 matches
Mail list logo