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,
Harlin
--
http://mail.python.org/mailman
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
Thanks Jorgen!
I was reading the Tkinter tutorial (I was looking at this particular
page:
http://www.pythonware.com/library/tkinter/introduction/x5513-methods.htm)
and saw this for select_set():
select_set(index), select_set(first, last)
Add one or more items to the selection.
I think this was
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
I am trying to poll selections from a listbox but can't seem to get it
to work correctly.
class pollstuff:
def __init__(self, master):
self.listbox = Listbox(master)
self.listbox.pack()
names = ['Bob', 'Neal', 'Mike']
for n in names:
self.listbox.insert(END, n)
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
I am trying to use the geometry() method with the toplevel window
called root. I know that one can do the following:
root.geometry('400x400+200+200')
This will put the window in 200, 200 position with a size of 400x400.
Now, I don't really want to set the size. I simply want to set the
position o
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/listinfo/python
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/mailman/listinfo
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
Excellent point Warren. I have been working with Python for about 3
years in all, but only really seriously for about a year. I am still
utterly amazed that near everything that takes me about 5 to 20 lines
of code can be done in 1, 2 or 3 lines of Python code (when done
correctly). It is very frus
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
Do you need this toplevel window to not be iconified--where it shows up
as a separate window? You can also do this:
def new_window(self, master):
t = Toplevel()
t.transient(master)
etc...
Svennglen, I put this in here because most likely you're next question
may be, how in the world do
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
There are certain options for Tkinter widgets that have default values
that I don't much care for (borderwidth, font come to mind) and
continuously change when I'm building interfaces. With a bit of
tweaking I have been able to give the widgets a look that rivals the
best of them. However, I get ti
Not to make light of your tutorial but it can use some editing (the
English grammar and spelling is below par). I understand that most
likely English is not your first language. Given that, I think you did
a great job. If you like, email me back and I'll be glad to help out
with that, but I can onl
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
"phil" <[EMAIL PROTEC
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]
> Peter Mayne wrote:
"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 possible to do?
Thanks,
Harlin
--
http
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
I am using the following code:
for i, f in filelist, self.checkbox:
if f.get():
print i
I am getting an error:
Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Python23\lib\lib-tk\Tkinter.py", line 1345, in __call__
return self.func(*args)
File "install.
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
ahh Frame! I didn't even think of extending Frame. I kept wondering how
I could instead extend entry and listbox... thanks for the pointer.
Yeah I know there are others out there, I just wanted to create one
from tkinter widgets and keep the constructor as close to other tkinter
widgets as possible
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
Martin,
Take a look here:
http://mail.python.org/pipermail/tkinter-discuss/2004-March/10.html
It is a well-known post from what I understand. You may have already
seen it before. Actually, (as I'm looking at a 8.4 demo set from
ActiveTcl distribution), it seems the Tree widget has been added t
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.
Thanks,
Harlin
--
(snip)
>>That said I have got a Tile Button example working (and I can change
>>it's style) so perhaps not that much work
Do you happen to have a sampling of this that I can get my hands on??
>>I've cc'd the tkinter mailing list to see if there is any more
interest
>>over there...
Thanks for d
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
Amir Dekel wrote:
> This must be the silliest question ever:
>
> What about user input in Python? (like stdin)
> Where can I find it? I can't find any references to it in the
> documentation.
>
> Amir
Simple, Simple, Simple:
Var = raw_input("Some prompting te
parate function for it. It may actually take less time and be
a good deal more readable. Also, you'll be able to call this mess again if
you need to. :-)
--
Harlin Seritt
--
http://mail.python.org/mailman/listinfo/python-list
aste time on them. Why should this part of the langauge
> be any different?
>
> Jp
A lambda should be used for a one-time, one-line-use function that you have
no intention of calling again (anything more would be an
inefficiency--which you profess not to be fond of). It is not terribly
d
Quickie:
os.system("/path/to/script.sh &")
More elegant, have a look at threads
----
Harlin Seritt
Erik Geiger wrote:
> Hi,
>
> sorry, my english ist not that got but I'll try.
>
> I have a running python script (capisuit incoming.py). This script
How does one set the width of a gtk.Button explicitly? and height for
that matter as well...
thanks,
Harlin Seritt
--
http://mail.python.org/mailman/listinfo/python-list
dit.search(findString.get(), 1.0,
stopindex=END)
if not pos:
break
print pos
start = pos + "+1c"
break
---end code---
thanks,
Harlin Seritt
--
http://mail.python.org/mailman/listinfo/python-list
Frederik,
Thanks! Just looking at your site (effbot and pythonware). I don't know
what I'd do without it!
Cheers,
Harlin
--
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
hell by typing exit.
You'll need to do a Control-D & Enter ;-)
Hope this makes sense.
Good luck.
Harlin Seritt
--
http://mail.python.org/mailman/listinfo/python-list
diate 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 S
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
nsole=["helloform.py"])
---
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
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
1 - 100 of 176 matches
Mail list logo