If you give it a good go, you will be amazed at how the text processing
is so much better than Perl's. The same with the object orientation
(what oop in Perl?? none... at least none worth mentioning :-) It's
been said before by many Python users... Python allows newbies to
program and wizards to be
s?
Thanks,
Harlin
--
http://mail.python.org/mailman/listinfo/python-list
x27;wait' you can use the Time module.
import time
seconds = 10 #This is an integer value
time.sleep(seconds)
Only on Unix systems can you use the system command 'sleep'. However,
in the name of portability it's better to use the Python modules
whenever possible
atter, a quick way of testing whether a the variable is a
factor of any other arbitrary number.
* In some programs (a weight control program I worked on comes to mind)
it's necessary to get a remainder so that you can get the results of a
leftover evenly divisible number.
Regards,
Harlin
ad
For MySQL on windows go here:
http://dev.mysql.com/get/Downloads/MySQL-4.1/mysql-4.1.10-win32.zip/from/pick#mirrors
For Python 2.3.5 binary installer for win32:
http://www.python.org/ftp/python/2.3.5/Python-2.3.5.exe
--
http://mail.python.org/mailman/listinfo/python-list
Any reason you're asking about wxPython for "DOS"? Just curious.
--
http://mail.python.org/mailman/listinfo/python-list
Can you be a bit more specific about what you're wanting? A design
process will be very similar across languages no matter which language
it is. If you'd like a "small evaluation" of Python you're best served
by reading the official summary:
http://www.python.org/doc/Summary.html
Else you'll alwa
Easy, easy... Use py2exe:
http://starship.python.net/crew/theller/py2exe/
--
http://mail.python.org/mailman/listinfo/python-list
Sorry about the mis-read. Keep in mind that if you're doing this on
win32 (and it looks like you are), you can use ODBC a bit easier. :)
--
http://mail.python.org/mailman/listinfo/python-list
Need more info on this. Are you:
1. Trying to create a GUI window of your own making? If so, what
toolkit are you using?
2. Trying to open a web browser? If so, you can do the following:
import os
os.system('path/to/executable options')
or
os.startfile('pagename.html')
--
http://mail.python
import time
play_something()
time.sleep(LengthOfSongInSeconds)
do_something()
Have you tried that? I'd be interesting in seeing this app you have. !
--
http://mail.python.org/mailman/listinfo/python-list
Is there a way to write a ping client? I would like to be able to write
a small ping client so that I dont have to do os.system('ping args')
and thereby keep the resource overhead low. Does anyone know how this
can be done or can point me in the right direction?
thanks,
Harlin
whoa... this is not in the standard library, is it? I never knew this
was out there. Thanks!
Please use your powers for good (the one about halting production on
teenage sex comedies :)
--
http://mail.python.org/mailman/listinfo/python-list
es anyone know what I can do to differentiate each
button so that it has its own separate argument for self.OpenFile?
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
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
T INFORMATION: Pinging '+ip+' at '+time.asctime()
AttributeError: 'str' object has no attribute 'asctime'
Press any key to exit
I'm sure this is something simple but for this I am having trouble
figuring it out.
Thanks,
Harlin Seritt
--
http://mail.python.org/mailman/listinfo/python-list
Traceback (most recent call last):
File "TixTest.py", line 8, in ?
Tix.tixControl().pack()
AttributeError: 'module' object has no attribute 'tixControl'
Any reason why I am not able to pull up this widget to work with it?
Thanks,
Harlin Seritt
--
http://mail.python.org/mailman/listinfo/python-list
?
--
http://mail.python.org/mailman/listinfo/python-list
as needing something for web apps, CherryPy is great -- just learn
Python first. PHP is good but it has fallen out of favor with me though
there are a ton of people out 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
t '\n' is not being used.
Is there anything I can do to make sure paragraphs show up properly?
Thanks,
Harlin Seritt
--
http://mail.python.org/mailman/listinfo/python-list
This is perfect. Thanks!
--
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 Se
d out how to output the matches for this expression
of my 'wordList' into a neat 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
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
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
time
shake a stick at :-).
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
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
x27;s like 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
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
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 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
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 g
g:
try:
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/mai
Thanks Frederik. I knew it was not binding the way I intended to, but
just had no idea why or how to make it do so... thanks for the quick
lambda lesson :-)
--
http://mail.python.org/mailman/listinfo/python-list
Tkinter!
Ease* Well-documented? Easy to Learn?
Functionality * Can I get it to do what I need it to do?
Looks *** Does it look good?
Well, beauty is after all in the eye of the beholder. Anything I can
get to work on either platform with minimum effort
?
--
http://mail.python.org/mailman/listinfo/python-list
I'm not familiar with Exchange log files but this can be done rather
easily assuming the log file is a flat text file (which usually these
are not-- like NT event logs).
search_str = "words and phrases"
data = open(LogFile, 'r').read()
if search_str in data:
flag = 1
If they are binary files,
Actually MIT is an abbreviation and not an acronym in the true sense of
the word :)
--
http://mail.python.org/mailman/listinfo/python-list
IDLE, PytonWin and SPE are all free and offer all of the important
features you'll see even in commercial IDE's.
--
http://mail.python.org/mailman/listinfo/python-list
Whenever I set up something similar:
vals = ['1', '2','3']
for v in vals:
listbox.inset(END, v)
I notice that when this listbox is displayed, there is never a default
value. How can I make sure that one of the indices is selected by
default?
Thanks,
Harl
Here is the old one...
http://www.wxpython.org/tutorial.php
It truly is a short tutorial though. This one's even better:
http://wiki.wxpython.org/index.cgi/FrontPage
I am not a wxPython enthusiast. I like Tkinter much better. If you have
an interest, take a look at:
http://www.pythonware.com/lib
was why I overlooked it. The description for it says the
listbox adds one or more items to a selection. I would think the
description should say the listbox sets the index or element.
Thanks again,
Harlin
--
http://mail.python.org/mailman/listinfo/python-list
Would this be for a GUI toolkit or maybe using a standard class scheme?
--
http://mail.python.org/mailman/listinfo/python-list
I like the type logo (on the right of the image). The black snake-like
image can be cropped though. :-)
Harlin
--
http://mail.python.org/mailman/listinfo/python-list
hangelabel's text option only
showed what the selection index was BEFORE the event took place. Does
anyone know of any special thing I need to do in order to poll the
listbox items?
Thanks,
Harlin
--
http://mail.python.org/mailman/listinfo/python-list
Not exactly sure what you're looking for but you can do the following:
def dosomething(numlist):
return numlist[0] + numlist[1]
numlist = [ 5, 10]
val = dosomething(numlist)
If so, that would be somewhat pointless. It's always best to keep it
simple. It looks like the function you wrote above
?
--
http://mail.python.org/mailman/listinfo/python-list
et the
position of the window. I've tried this:
root.geometry('200+200')
However, this doesn't seem to work. What can I do to set the position
of the window without actually setting the size?
Thanks,
Harlin
--
http://mail.python.org/mailman/listinfo/python-list
They actually won't ban your IP for this. They only limit your number
of searches per day. I discovered this once when I used
http://www.google.com as a test metric for my network monitoring
program. I do like your script though.
Regards,
Harlin
--
http://mail.python.org/mailman/lis
Is there really a major performance difference between doing the
following:
import Tkinter as TK
TK.Label(yada yada)
OR
from Tkinter import *
Label(yada yada)
I'm unable to tell a real difference other than in the code writing
:-).
Thanks,
Harlin
--
http://mail.python.org/ma
I've got the following code:
nums = range(0)
for a in range(100):
nums.append(a)
Is there a better way to have num initialized to a list of 100
consecutive int values?
Thanks,
Harlin
--
http://mail.python.org/mailman/listinfo/python-list
ll in 100 spots (more or less) in an
array er... list, but I'd like to be able to do it in intervals of
2, 4, 8 etc. as well as other things.
Thanks,
Harlin
--
http://mail.python.org/mailman/listinfo/python-list
You can add this:
button = Button(top, text="Close Me", command=top.destroy)
button.pack()
That will kill the Toplevel window.
Cheers,
Harlin Seritt
--
http://mail.python.org/mailman/listinfo/python-list
n's Python and Tkinter
Programming from Manning Publications. I won't provide the link so that
no one will think I'm spamming (:-). Grayson's book is essential
reading if you are to write any serious apps with Tkinter.
Good luck,
Harlin
--
http://mail.python.org/mailman/listinfo/python-list
Pardon a question I should already know the answer to, but what are the
*args in the:
def xscrollboth(*args):
c1.xview(*args)
c2.xview(*args)
Thanks,
Harlin
--
http://mail.python.org/mailman/listinfo/python-list
s/classes that I can change the values for
these things like font, border, etc.?
Thanks,
Harlin
--
http://mail.python.org/mailman/listinfo/python-list
I can only do it if I can get my hands on the source of
your docs (not sure if you're using some type of doc tool -- it does
appear that way).
I must say, I thought your tutorial was very good. I despise RAD tools
but you almost had me convinced to give PyGTK and Glade a shot ;-)
Regard
You can use the textvariable option for the Entry widget. Set a bind event
for this widget that when any key pressed the StringVar() will be polled via
StringVar().get(). You do some checking for certain chars you don't want
entered and then delete them as they occur.
Harlin
"phi
I think the bottom line on this is using your own sense of risk/reward with
each given module imported. Some modules (Tkinter comes to mind) it makes
sense to pollute while others it doesn't.
Harlin
"Peter Hansen" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED
"Maxim Khesin" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hello Folks,
> I recently started working on a graph-algorithms library in Python. What
> makes this one different from the other couple of libs that are
> available is a heavy influence from the C++ Boost Graph Library.
I am making use of a Checkbutton widget. However, I would like to add
an option or method "on the fly." For example I would like to bind a
filename ("filename.txt") to a particular Checkbutton widget so that I
call it later as:
widget["filename"]
Is this po
Here's what I came up with:
#objtest.py
class first:
def __init__(self):
a = 'a'
self.a = a
print self.a
def update(self):
print 'initially, a is', self.a
self.a = second(self.a)
print 'afterwards, a is', self.a.call(self.a)
class secon
gs)
File "install.py", line 123, in select_stage
for i, f in filelist, self.checkbox:
ValueError: unpack list of wrong size
Both filelist and self.checkbox are the same size (4 items btw). Is
there any way to get this done?
Thanks,
Harlin
--
http://mail.python.org/mailman/listinfo/python-list
Would I do this like:
buttondict = {button1, "name.txt"}
??
Thanks,
Harlin
--
http://mail.python.org/mailman/listinfo/python-list
Actually the sequences are of the same length. Forgot to mention that.
thanks,
Harlin
--
http://mail.python.org/mailman/listinfo/python-list
Actually it should be here:
http://py.vaults.ca/apyllo.py/808292924.247038364.90387689.96972321
Cheers,
Harlin
--
http://mail.python.org/mailman/listinfo/python-list
You most likely need to construct your script using OOP. Can give you
give an example of code you're using when you get this error? This
helps a lot.
Regards,
Harlin
--
http://mail.python.org/mailman/listinfo/python-list
"Phantom of the Keyboard" ... now that's a name!
--
http://mail.python.org/mailman/listinfo/python-list
I have the following code and I would like to know how to set the
length and width of widgets like Buttons. When the window opens the
button fills up the space even though I have told it not to. Anyone
know how I can accomplish this?
:
import pygtk, gtk
class Greeter:
def __init__(self)
You have:
="@/test.xbm"
take the '/' out or (if it is in a different dir which i think it is),
do
="/@test.xbm"
also... make sure your *.xbm is really a bitmap file (that would just
be another thing to check... not to say its not the proper format)...
Reg
If this is for making money, make it either a proprietary license or
BSD.
If you're giving it away and expect nothing for it except maybe fame,
do GPL.
:-)
Regards,
Harlin Seritt
--
http://mail.python.org/mailman/listinfo/python-list
When you ask an opinion, you can expect a long thread list... even if
it's something inane like "What kind of license should I use?"...
hacker/geeks/freaks/wannabes are only too happy to issue an opinion --
warranted or otherwise...
Regards,
Harlin Seritt
--
http://mail.pyt
Try not to triple post if you can help it (I'll assume you accidentally
hit the SENT button three times )
Regards,
Harlin Seritt
--
http://mail.python.org/mailman/listinfo/python-list
hah, this code is anything but simple...
--
http://mail.python.org/mailman/listinfo/python-list
python programmer who forgets that there
usually is a better, faster more graceful way to do things with Python
than with C/C++/Java.
Cheers,
Harlin
##
# Seritt Extensions:
# Date: 02262005
# Class ComboBox
# Add this sect
same dilemma as you. Good luck. If
you find a better way please post it.
Thanks,
Harlin Seritt
--
http://mail.python.org/mailman/listinfo/python-list
Or if you prefer you can download it here:
http://www.seritt.org/pub/tkinter/Tkinter-03132005.py
Replace your Tkinter.py with this one. Make sure you back up your old
one in case you decide mine sucks.
Thanks,
Harlin
--
http://mail.python.org/mailman/listinfo/python-list
. When I go and manually change the startpath on the
icon's property box, everything works fine. How do I ensure that the
icon starts in the apppath?
Thanks,
Harlin Seritt
--
http://mail.python.org/mailman/listinfo/python-list
Thanks Will! That did the trick.
--
http://mail.python.org/mailman/listinfo/python-list
Thanks nirinA... I've played with that one before. I'm not a big fan of
Pmw or Tix so much I guess although when it gets down to it, those
'extra' toolkits are probably more functional.
Cheers,
Harlin
--
http://mail.python.org/mailman/listinfo/python-list
ts as possible. I notice that when you use Pmw you have different
option names and methods that are a bit inconsistent (not too hard to
remember though--it's not a criticism of Pmw or Tix). I am very
narrow-minded. :-)
As far as the other lists/wiki, I will be looking at them.
Thanks,
Harlin
Is there any reason why you can't import both?
import urllib as u
import urllib2 as uu
--
http://mail.python.org/mailman/listinfo/python-list
What GUI toolkit are you using? I think this is the point Jeremy is
making.
Harlin Seritt
--
http://mail.python.org/mailman/listinfo/python-list
Is there a way to call up the Font dialog box (at least in the Windows
API) from Tkinter or another module?
thanks,
Harlin Seritt
--
http://mail.python.org/mailman/listinfo/python-list
I am trying the following:
Listbox(parent).pack(fill=BOTH, expand=YES)
I notice that the listbox will fill on the X axis but will not on the Y
axis unlike other widgets. Is there any way to force this?
thanks,
Harlin
--
http://mail.python.org/mailman/listinfo/python-list
That was it Martin. I forgot to expand the parent.
Thanks!
--
http://mail.python.org/mailman/listinfo/python-list
either YES, True, or 1 should work.
--
http://mail.python.org/mailman/listinfo/python-list
I was looking at the Tcl/Tk sourceforge page and found that there were
a couple of new widgets being produced for Tcl 8.5. Does anyone know if
there are any Tkinter wrappers somewhere?
thanks,
Harlin
--
http://mail.python.org/mailman/listinfo/python-list
added to the
8.4 set. I don't think the Tiles has been added just yet though.
Harlin
--
http://mail.python.org/mailman/listinfo/python-list
George,
Know what they will be wanting you to do with Jython. This has bitten
me in @ss a couple of times. I guess it was lack of attention to
detail. :-)
Good Luck!
Harlin Seritt
--
http://mail.python.org/mailman/listinfo/python-list
Martin,
If I may ask, who actually works on the Tkinter module? Is there a
certain group that does this? I'm just curious as I've never been able
to find this information. I know there are, of course, someone who
develops Tk but just not sure who does this on the Python side.
Thank
est
>>over there...
Thanks for doing so!
Harlin
--
http://mail.python.org/mailman/listinfo/python-list
uction/
[wxPython:]http://www.wxpython.org/
[PyGTK:] http://www.pygtk.org/
Purusing these links will give you a very good idea of whether Python
is right for you. Naturally we'd all like to say 'YES Python is good
for you!' but you have to investigate for yourself.
Goo
eted widget's space (in this case the button). That
works ok but I've found that while waiting I can't activate (or
'click') on the button until the PopMsg has shown up. Is there anything
I can do to solve this problem?
thanks,
Harlin Seritt
--
http://mail.python.org/mailman/listinfo/python-list
Tom B.:
If you're not having trouble saving with dict then use that. You only need
pickle if using lists or dicts are not doing the job when the data in them
are integers or long.
"Tom B." <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> "Rodney Dangerfield" <[EMAIL PROTECTED]> wr
ironments you can do:
"set path=c:\path\to\whatever" # As a line in a Batch file
--
Harlin Seritt
--
http://mail.python.org/mailman/listinfo/python-list
1 - 100 of 190 matches
Mail list logo