, everything does shut down but the main script never
fully ends. Is there any way to get it to quit?
Thanks,
Harlin Seritt
--
http://mail.python.org/mailman/listinfo/python-list
Is there a module that can pull str values for say the last 3 months?
Something like:
print lastMonths(3)
['Sep', 'Aug', 'Jul']
Thanks
--
http://mail.python.org/mailman/listinfo/python-list
Is there a module that can pull str values for say the last 3 months?
Something like:
print lastMonths(3)
['Sep', 'Aug', 'Jul']
Thanks
--
http://mail.python.org/mailman/listinfo/python-list
,
Harlin
--
http://mail.python.org/mailman/listinfo/python-list
pyobfuscate.
Good Luck
Harlin Seritt
--
http://mail.python.org/mailman/listinfo/python-list
Is there a Python odbc module that will work on Linux? I have a jdbc
connection to a DB2 server. I am looking hopefully for an open source
solution and not a commercial one.
Thanks,
Harlin
--
http://mail.python.org/mailman/listinfo/python-list
Is there any type of lame_enc.dll wrapper for Python that's available?
Thanks,
Harlin Seritt
--
http://mail.python.org/mailman/listinfo/python-list
:
print Something unexpected happened
---END CODE---
In the last 'except' block, how can I print out the particular error
name even though one is not specifically named?
Thanks,
Harlin
--
http://mail.python.org/mailman/listinfo/python-list
On Mar 23, 9:42 am, [EMAIL PROTECTED] wrote:
On Mar 23, 8:16 am, Harlin Seritt [EMAIL PROTECTED] wrote:
Using the code below:
---BEGIN CODE---
value = raw_input(Type a divisor: )
try:
value = int(value)
print 42 / %d = %d % (value, 42/value)
except ValueError
format so that it shows the original value. Is there any
way to do this in Python?
Thanks!
Harlin
--
http://mail.python.org/mailman/listinfo/python-list
On Feb 21, 7:02 pm, Colin J. Williams [EMAIL PROTECTED] wrote:
Harlin Seritt wrote:
Hi...
I would like to take a string like 'supercalifragilisticexpialidocius'
and write it to a file in binary forms -- this way a user cannot read
the string in case they were try to open in something
On Feb 21, 7:12 pm, Larry Bates [EMAIL PROTECTED] wrote:
Harlin Seritt wrote:
Hi...
I would like to take a string like 'supercalifragilisticexpialidocius'
and write it to a file in binary forms -- this way a user cannot read
the string in case they were try to open in something like
Is there any way to automatically log errors that occur within an
executed script to a file?
Thanks,
Harlin
--
http://mail.python.org/mailman/listinfo/python-list
I have a script that I want to import called upper.py. It is 2
directories above the script that will call it - i'll call that one
main.py. How am I able to import a script in a directory that is above
it?
Thanks,
Harlin
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
How does one get the name of a class from within the class code? I
tried something like this as a guess:
self.__name__
Obviously it didn't work.
Anyone know how to do that?
Thanks,
Harlin
--
http://mail.python.org/mailman/listinfo/python-list
Hi Ed,
Generally checking the sources give a very good clue as to what
exceptions the interpreter can raise. Look around _builtins_ for this.
Harlin Seritt
Ed Jensen wrote:
I'm really enjoying using the Python interactive interpreter to learn
more about the language. It's fantastic you can
Hi Frank,
Usually Python is installed in /usr/lib/python[VER] but you should be
able to call up /usr/bin/python without any difficulty.
Harlin Seritt
Frank Potter wrote:
I installed fedora core 6 and it has python installed.
But the question is, where is the executable python file?
I can't
Is there any way to fetch a website's host/version headers using
Python?
Thanks,
Harlin
--
http://mail.python.org/mailman/listinfo/python-list
I have this string that I am sending via a Cursor.execute() using
MySQLdb:
insert into table Ping82_eb13__elearn__ihost__com (`dateTime`,
`values`) values(
Fri May 12 11:39:02 2006, 1)
Does anyone see anything wrong with this SQL syntax?
Thanks,
Harlin Seritt
--
http://mail.python.org
_mysql_exceptions.ProgrammingError: (1064, You have an error in your
SQL syntax
; check the manual that corresponds to your MySQL server version for
the right s
yntax to use near 'values) values('Sat Apr 15 08:58:13 2006', '0')' at
line 1)
Any idea why I'm getting this?
Thanks,
Harlin Seritt
--
http
I am using the exact same query string generated and it works when i
type it in the MySQL client but doesn't work when using the MySQLdb
module.
:(
--
http://mail.python.org/mailman/listinfo/python-list
I have some code here:
groups = {'IRISH' : 'green', 'AMERICAN' : 'blue'}
I want to add another key: 'ITALIAN' : 'orange'
How do I append this to 'groups'?
Thanks,
Harlin Seritt
--
http://mail.python.org/mailman/listinfo/python-list
they use
something more robust like DB2 (IBM shop)?
Any suggestions are welcome.
Thanks,
Harlin Seritt
--
http://mail.python.org/mailman/listinfo/python-list
to memory.
Harlin Seritt
--
http://mail.python.org/mailman/listinfo/python-list
... strange choices (especially Kate) but they both do what
I need them to do. :-)
Harlin Seritt
--
http://mail.python.org/mailman/listinfo/python-list
to phpBB?
thanks,
Harlin
--
http://mail.python.org/mailman/listinfo/python-list
Was actually going to throw in jEdit for the category of what's good on
both platforms... For someone who despises Java, I actually like it.
:-)
Harlin
--
http://mail.python.org/mailman/listinfo/python-list
sudo is something of a quick fix.
Harlin Seritt
--
http://mail.python.org/mailman/listinfo/python-list
You'll almost certainly need to take a look at mascyma's support
facilities: support web page, forum, etc (provided they do indeed
exist).
Harlin Seritt
--
http://mail.python.org/mailman/listinfo/python-list
actually prefer to have the CGI code
execute this rather than depend on the HTML to do it.
Thanks,
Harlin Seritt
--
http://mail.python.org/mailman/listinfo/python-list
Ack... I'm an idiot... Thanks Richard -- You're the Man!
--
http://mail.python.org/mailman/listinfo/python-list
\lib\ftplib.py, line 241, in sendcmd
return self.getresp()
File C:\Python24\lib\ftplib.py, line 216, in getresp
raise error_perm, resp
ftplib.error_perm: 500 Syntax error, command unrecognized.
Thanks,
Harlin Seritt
--
http://mail.python.org/mailman/listinfo/python-list
.
Thanks,
Harlin Seritt
--
http://mail.python.org/mailman/listinfo/python-list
, 'Connection refused'):
and
except (socket.error, 10061, 'Connection refused'):
to no avail. What do I need to do to catch each one specifically?
Thanks,
Harlin Seritt
--
http://mail.python.org/mailman/listinfo/python-list
if something is up or
down (and perhaps the only real way to do it running from a Win32
platform). Thanks for the help. However, if you do have suggestions on
how to get this done better, I am more than glad to hear it!
Thanks,
Harlin Seritt
--
http://mail.python.org/mailman/listinfo/python-list
well. Maybe my standards are not so high. :-|
Nonetheless, thanks for the help and the commentary. I was beginning to
think I was losing my mind.
Harlin
--
http://mail.python.org/mailman/listinfo/python-list
machines and this either takes too long or causes
severe memory leakage due to MS's horrible ping client). Also, I am
unable to use Jeremy Hylton's Python ping client because it does little
more than call gethostbyaddr(). Thanks for taking a look at this.
Harlin Seritt
--
http://mail.python.org/mailman
How can I take a time given in milliseconds (I am doing this for an
uptime script) and convert it to human-friendly time i.e. 4 days, 2
hours, 25 minutes, 10 seonds.? Is there a function from the time
module that can do this?
Thanks,
Harlin Seritt
--
http://mail.python.org/mailman/listinfo
I would like to take milliseconds and convert it to a more
human-readable format like:
4 days 20 hours 10 minutes 35 seconds
Is there something in the time module that can do this? I havent been
able to find anything that would do it.
Thanks,
Harlin Seritt
--
http://mail.python.org/mailman
Thanks Dan, that would be perfect or close enough I should say. :-)
Regards,
Harlin Seritt
--
http://mail.python.org/mailman/listinfo/python-list
?
thanks,
Harlin
--
http://mail.python.org/mailman/listinfo/python-list
it out.
Thanks,
Harlin Seritt
--
http://mail.python.org/mailman/listinfo/python-list
Thanks Mike,
that will work just as well... just disappointed in myself that i lack
the creativity to think of something that simple ;-)
thanks,
Harlin
--
http://mail.python.org/mailman/listinfo/python-list
Is there a function that allows one to get the name of the same script
running returned as a string?
Thanks,
Harlin Seritt
--
http://mail.python.org/mailman/listinfo/python-list
You can do the following:
import os
data = os.popen('ping machineName').read()
if 'request timed out' in data or 'unknown host' in data:
Ping Failed Code
else:
Ping Returned Something Good Code
This is the quickest and really most effective way to get it done IMO.
Harlin Seritt
:
open(file, 'r').read()
flag = 1
except:
pass
This may seem nice on paper but I hate to run a while for an
indeterminate amount of time. Is there anything else that can be done
that would be better?
Thanks,
Harlin Seritt
--
http://mail.python.org/mailman/listinfo/python
Hi DH,
Thanks for this blurb from ASPN. I am really looking, however, to do
this on a Windows machine as opposed to a Unix one at this point. This
will come in handy down the road I am sure.
Thanks,
Harlin Seritt
--
http://mail.python.org/mailman/listinfo/python-list
I am looking for a module that will render html to console but
formatted much like one might see with Lynx. Is there such a module
already out there for this?
Thanks,
Harlin
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
Is anyone aware of an available open-source/free search engine app
(something similar to HTDig) written in Python that is out there?
Googling has turned up nothing. Thought maybe I'd mine some of you
guys' minds on this.
thanks,
Harlin Seritt
Internet Villa: www.seritt.org
--
http
30USD but it does a great job and adds a few extra features.
HTH,
Harlin Seritt
Internet Villa: www.seritt.org
--
http://mail.python.org/mailman/listinfo/python-list
What are you getting in your smtpd logs? Are you using postfix?
sendmail? or are you running this against a Windows stmp service?
Harlin Seritt
Internet Villa: www.seritt.org
--
http://mail.python.org/mailman/listinfo/python-list
Is it possible to use Python to create snapins for the MMC?
Thanks,
Harlin Seritt
Internet Villa: www.seritt.org
--
http://mail.python.org/mailman/listinfo/python-list
Is there any reason why you wouldn't want to do this using the the
threading class? To each his own I suppose. You can try the following
though you'll at least need to use functions:
import time
import thread
def myfunction(string,sleeptime,*args):
while 1:
print string
you can shake a stick at :-).
Harlin Seritt
Internet Villa: www.seritt.org
--
http://mail.python.org/mailman/listinfo/python-list
How does one get the machine name with Python that the actual script is
running on? Obviously, one could parse the hosts file but I was
wondering if there was a quick way to get it done?
thanks,
Harlin Seritt
--
http://mail.python.org/mailman/listinfo/python-list
list variable. How do I get this done?
Thanks,
Harlin Seritt
--
http://mail.python.org/mailman/listinfo/python-list
Ahh that's it Frederik. That's what I was looking for. The regular
expression problems I will take care of, but first wanted to walk
before running. ;)
Thanks,
Harlin Seritt
--
http://mail.python.org/mailman/listinfo/python-list
Forgive another question here, but what is the 'r' for when used with
expression: r'\w+...' ?
--
http://mail.python.org/mailman/listinfo/python-list
I have a remote linux server where I can only access it via ssh. I have
a script that I need to have run all the time. I run like so:
python script.py
It runs fine. When I log off ssh I notice that the script died when I
logged off. How do I make sure it stays running?
thanks,
Harlin Seritt
This is perfect. Thanks!
--
http://mail.python.org/mailman/listinfo/python-list
.
Is there anything I can do to make sure paragraphs show up properly?
Thanks,
Harlin Seritt
--
http://mail.python.org/mailman/listinfo/python-list
there who think it is the greatest thing
since sliced bread.
Take a look at the Python tutorial: http://docs.python.org/tut/tut.html.
Good luck,
Harlin Seritt
--
http://mail.python.org/mailman/listinfo/python-list
?
--
http://mail.python.org/mailman/listinfo/python-list
?
--
http://mail.python.org/mailman/listinfo/python-list
Not a grid widget necessarilly but a 'grid' method you can use instead
of pack(). Take a look at
http://www.pythonware.com/library/tkinter/introduction/grid.htm. If
this isn't what you mean, come back.
Harlin Seritt
--
http://mail.python.org/mailman/listinfo/python-list
Does anyone know if there are any Python Active Directory Modules out
there? I looked at LDAP module but there is no version for Python 2.4
and it's support for Active Directory seems to be lacking a bit.
Thanks,
Harlin Seritt
--
http://mail.python.org/mailman/listinfo/python-list
I am trying to use SGMLlib module to extract all links from some data I
pulled from the web (via urllib). I have looked at the documentation
online and can not make sense of it. As a quick example, how would I
get the hyperlinks for an html file?
thanks,
Harlin
--
http://mail.python.org
with Python on your own!
Thanks for the help,
Harlin Seritt
--
http://mail.python.org/mailman/listinfo/python-list
would like to do is to
.split() using something akin to this:
textdata.split('{*}') # The '*' being a wildcard
Is this possible to do? If so, how is it done?
Thanks,
Harlin Seritt
--
http://mail.python.org/mailman/listinfo/python-list
I've used multiple listboxes in the past. Also, you can build a widget
that contains multiple listboxes as well. As far as there being one
ready to go, I don't know of one.
--
http://mail.python.org/mailman/listinfo/python-list
Try EasyDialog:
http://www.talkaboutprogramming.com/group/comp.lang.python/messages/314003.html
It should also be on Vaults of Parnassus.
--
http://mail.python.org/mailman/listinfo/python-list
George that is what I'm looking for. Thanks, Harlin
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I have a script.py that is converted to .exe using py2exe. From another
script I call script.exe and would like to be able to run this
script.exe in the background (as well as in console -- giving the user
some simple options). How can I make this happen?
thanks,
Harlin
--
http
I actually tried mapping the PID to an integer value and it still
didn't work. At any rate, I found another way to do it. Thanks anyways.
--
http://mail.python.org/mailman/listinfo/python-list
a more elegant way to
accomplish this, please post back !
Harlin Seritt
--
http://mail.python.org/mailman/listinfo/python-list
I am looking for a way for my script to write to a log file saying
something like this:
I was killed at time.asctime()
I would like to be able to do this if/when the script is killed by
means rather than my own. How in the world would I accomplish this?
Thanks,
Harlin
--
http
Let's say I have a simple script on Windows NT. I would like for that
script to find its own PID once it's started and store that as a value
within the script. Also, down the road I'd like to kill that process by
its PID. How is this done?
Thanks,
Harlin Seritt
--
http://mail.python.org
I am using os.getpid() to get the pid value for a script running. I
store that value (as a string) to a file. Later when I try to kill that
pid (i pull this from the file as a string value) I get errors.
Using the following lines I get the subsequent error.
(pid is a string value)
Yeah I've kind of figured that. I was just wanting to know what I could
use to kill a pid that is a string value. Thanks though.
Harlin
--
http://mail.python.org/mailman/listinfo/python-list
I think I need something besides TerminateProcess(). Is there anyway
possible to terminate a process by just passing a string value to the
function? Honestly, I am not interesting in terminating a process by
its handle.
--
http://mail.python.org/mailman/listinfo/python-list
(root, text='Button 2', command=say_hello)
button2.pack()
root.mainloop()
Thanks,
Harlin Seritt
--
http://mail.python.org/mailman/listinfo/python-list
.
If you would like to obfuscate your code (disguise it) without an
executable you can try pyobfuscate as well. Just Google for these two
and you'll find easily.
Harlin Seritt
--
http://mail.python.org/mailman/listinfo/python-list
.
What I am hoping to do is to work on some Python versions of PSTools. I
think the win32 modules will be perfect for helping me do this,
however, I am having a (more than it should be) difficult time making
sense of the win32process module.
Any help would be appreciated.
Thanks,
Harlin Seritt
Kartic,
Thanks for the help. It's good to get a different perspective on
something (i.e. MSDN, dir() etc).
--
http://mail.python.org/mailman/listinfo/python-list
Not Allowed/TITLE
/HEADBODY
H1Method Not Allowed/H1
The requested method POST is not allowed for the URL P
HR
ADDRESSApache/1.3.27 Server at website.com Port 80/ADDRESS
/BODY/HTML
How can I make sure that I get the actual html data instead of the data
from redirected URL?
thanks,
Harlin
I have three tuples of the same size: tup1, tup2, tup3
I'd like to do something like this:
for a,b,c in tup1, tup2, tup3:
print a
print b
print c
Of course, you get an error when you try to run the pseudocode above.
What is the correct way to get this done?
Thanks,
Harlin
--
http
')
photo = ImageTk.PhotoImage(im)
label = Label(master, image=photo)
label.pack()
if __name__ == '__main__':
root = Tk()
app = App(root)
root.mainloop()
---END of CODE---
Thanks,
Harlin Seritt
--
http://mail.python.org/mailman/listinfo/python-list
:-)
Seriously though, you can use the Listbox for almost anything you would
need a combobox for. In my mind, it's good for tight spaces (I'm sure
someone on this fine board will add something or disagree with me),
looks and little else.
Regards,
Harlin Seritt
--
http://mail.python.org/mailman/listinfo
No reason why they shouldn't be.
-Harlin
--
http://mail.python.org/mailman/listinfo/python-list
Max,
Thanks and good job!
Harlin
--
http://mail.python.org/mailman/listinfo/python-list
Benedict,
Best to hand-code your code ;-) -- even GUI. This is kind of why I like
Tkinter so much. Good luck.
Harlin Seritt
--
http://mail.python.org/mailman/listinfo/python-list
Hi Raghul,
If possible, run your program as root.
Harlin
--
http://mail.python.org/mailman/listinfo/python-list
When using try... except... errors don't show up. Is there a way to
force stderr despite using try...except?
thanks,
Harlin Seritt
--
http://mail.python.org/mailman/listinfo/python-list
If anyone has time, would you mind explaining the code that Dan Bishop
was so kind as to point out to me:
int(''.join(num1))
This worked perfectly for me, however, I'm not sure that I understand
it very well.
Thanks,
Harlin Seritt
--
http://mail.python.org/mailman/listinfo/python-list
])
---
I run the setup like this: python setup.py py2exe.
Is there anything else I need to do to get this converted into a *.exe
file successfully?
Thanks,
Harlin Seritt
--
http://mail.python.org/mailman/listinfo/python-list
or even advanced (in a lot of cases),
CherryPy allows one to actually program an entire website in Python.
For me CherryPy has been the holy grail of web applications (at least
for now) making me forget entirely about using PHP or even ASP.NET for
web development projects.
Cheers,
Harlin Seritt
faramarz,
Most likely, you'll need to replace the 'forgotten' frame with another
one or other widget. You can immediately do *.pack() and it will
replace the frame (assumming you haven't already packed something else
there).
Harlin Seritt
--
http://mail.python.org/mailman/listinfo/python-list
a Control-D Enter ;-)
Hope this makes sense.
Good luck.
Harlin Seritt
--
http://mail.python.org/mailman/listinfo/python-list
Diez,
Thanks for the quick reply. I am running this under KDE. I actually
haven't tried doing so under any other wm for the moment. Any ideas how
to get it to show in KDE?
Thanks,
Harlin Seritt
--
http://mail.python.org/mailman/listinfo/python-list
I have a tkinter program that shows the 'maximize' button while running
on Windows but not in Linux. Is there a way to make it show in Linux?
Thanks,
Harlin Seritt
--
http://mail.python.org/mailman/listinfo/python-list
1 - 100 of 175 matches
Mail list logo