Dennis Lee Bieber wrote:
On 11 Jul 2006 06:45:42 -0700, [EMAIL PROTECTED] declaimed the
following in comp.lang.python:
Could it be that the SERVER is limiting things to 5
concurrent/parallel connections from any single IP?
I know I've encountered sites that only allowed two FTP
D wrote:
Hi, I currently have a Python app with a Tkinter GUI frontend that I
use for system administration. Everytime it launches, it reads a text
file which contains info about each host I wish to monitor - each field
(such as IP, hostname, etc.) is delimited by !!. Now, I want to be
[EMAIL PROTECTED] wrote:
Lets say that I have an application consisting of 3 files. A main.py
file, gui.py and a data.py which handles persistent data storage.
Suppose data.py defines a class 'MyDB' which reads in data from a
database, and main.py creates an instance of this object. How does
D wrote:
Thanks, guys. So overall, would it just be easier (and not too rigged)
if any changes were made by just editing the text file? I want to do
snip
[EMAIL PROTECTED] wrote:
snip
Might be overkill - but pickle the data memeber that contains the
information. If you use text
[EMAIL PROTECTED] wrote:
snip
Doh! How simple. Why didn't I think of that? I'm too used to procedural
scripts where you'd just put everything in a global data structure. I
know this is bad, but it's hard to get out of that mentality.
Sounds like you got it. Just pass it on down as needed.
On 11 Jul 2006 06:45:42 -0700, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
I'm trying to use ftp in python in a multi-threaded way on a windowsbox - python version
2.4.3.Problem is that it appears that it's onlypossible to have five instances/threads at one point in time.Errorslook like: File
[EMAIL PROTECTED] wrote:
I'm trying to use ftp in python in a multi-threaded way on a windows
box - python version 2.4.3. Problem is that it appears that it's only
possible to have five instances/threads at one point in time. Errors
look like:
File C:\Python24\lib\ftplib.py, line 107,
sandorf wrote:
I'm using the Windows version of Python and IDLE. When I debug my .py
file, my modification to the .py file does not seem to take effect
unless I restart IDLE. Saving the file and re-importing it doesn't help
either. Where's the problem?
Thanks.
No problem. Just reload()
could ildg wrote:
I have 2 thead instances,
A and B,
In A's run method, if I call B.Method(), it will be executed in thead A,
but I want B.Method() to be executed in B's thread.
That's to say, I want to tell Thead B to do B's stuff in B's thread,
kinda like PostMessage in win32.
Can I do
Gerard Flanagan wrote:
Hello
I'm sure its basic but I'm confused about the error I get with the
following code. Any help on basic tempfile usage?
ActivePython 2.4.1 Build 247 (ActiveState Corp.) based on
Python 2.4.1 (#65, Jun 20 2005, 17:01:55) [MSC v.1310 32 bit (Intel)]
on win32
Type
, the release (or news) information, and what the
project is about. I'm planning on posting nightly at around 5PM GMT +5
(10PM Eastern time in the states), so email that I receive before that
time should be posted the same day.
Jeremy Jones
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
Hi,
I am a python newbie and need some advice.
I have been charged with redeveloping a web application with a front end
written in python that has a backend of XML files.
Currently it doesn't adequately separate out the presentation code from the
content code.
Frankly
Junhua Deng (AL/EAB) wrote:
Hi,
I have a simple server-client application with threading. It works fine when
both server and client on the same machine, but I get the following error
message if the server is on another machine:
... ...
self.socket.send(outgoingMsg)
socket.error: (32,
Tim Golden wrote:
snip
As it happens, (and I suspect I'll have to don my flameproof suit here),
I prefer the Windows command line to bash/readline for day-to-day use,
including in Python. Why? Because it does what I can't for the life of
me get readline to do: you can type the first few letters
Negoescu Constantin wrote:
Hello.
I know that Python is */not fully threadsafe/*. Unlike Java, where
threading was considered to be so important that it is a part of the
syntax, in Python threads were laid down at the altar of Portability.
But, i really have to finish a project
Xah Lee wrote:
Peter Hansen wrote:
Xah Lee wrote:
If you think i have a point, ...
You have neither that, nor a clue.
Dear Peter Hansen,
My messages speak themselfs. You and your cohorts's stamping of it does
not change its nature. And if this is done with
[EMAIL PROTECTED] wrote:
I just need confirmation that I think right.
Is the files thread_xxx.h (xxx = nt, os2 or whatever) responsible for
the
global interpreter lock in a multithreaded environment?
I'm currently writing my own thread_VW for VxWorks, thats why I'm
asking.
//Tommy
Kenneth McDonald wrote:
For unfortunate reasons, I'm considering switching back to Win XP
(from OS X) as my main system. Windows has so many annoyances that
I can only compare it to driving in the Bay Area at rush hour (OS X
is like driving in Portland at rush hour--not as bad, but getting
Maurice LING wrote:
I had the opportunity to glance through the book in Borders yesterday.
On the whole, I think it is well covered and is very readable. Perhaps I
was looking for a specific aspect, and I find that threads did not get
enough attention. Looking at the index pages, the topics on
Wenhua Zhao wrote:
A.T.T
Thanks a lot.
If you could elaborate a bit more, it might be helpful. I'm guessing
you want something like StringIO or cStringIO.
- jmj
--
http://mail.python.org/mailman/listinfo/python-list
on memory???
Jeremy Jones wrote:
Wenhua Zhao wrote:
A.T.T
Thanks a lot.
If you could elaborate a bit more, it might be helpful. I'm guessing
you want something like StringIO or cStringIO.
- jmj
If the function takes a file object as an argument, you should be able
Dick Moores wrote:
(Sorry, my previous post should not have had Tutor in the subject header.)
Magnus Lie Hetland's new book, _Beginning Python: From Novice to
Professional_ was published by Apress on Sept. 26 (in the U.S.). My copy
arrived in the mail a couple of days ago. Very much worth a
[EMAIL PROTECTED] wrote:
Damjan Is there some python module that provides a multi process Queue?
Not as cleanly encapsulated as Queue, but writing a class that does that
shouldn't be all that difficult using a socket and the pickle module.
Skip
What about bsddb? The example code
[EMAIL PROTECTED] wrote:
Damjan Is there some python module that provides a multi process Queue?
Skip Not as cleanly encapsulated as Queue, but writing a class that
Skip does that shouldn't be all that difficult using a socket and the
Skip pickle module.
Jeremy What about
Gopal wrote:
Hello,
I'm Gopal. I'm looking for a solution to the following problem:
I need to create a text file config.txt having some parameters. I'm
thinking of going with this format by having Param Name - value. Note
that the value is a string/number; something like this:
PROJECT_ID =
Gopal wrote:
Thanks for the reference. However, I'm not understanding how to use it.
Could you please provide with an example? Like I open the file, read
line and give it to parser?
Please help me.
I had thought of recommending what Peter Hansen recommended - just
importing the text you
DataSmash wrote:
Hello,
I think I've tried everything now and can't figure out how to do it.
I want to read in a text list from the current directory,
and for each line in the list, make a system directory for that name.
My text file would look something like this:
1144
1145
1146
1147
I simply
Ed Hotchkiss wrote:
I'm new to Python, not programming. I agree with the point regarding
the interpreter. what is that? who uses that!? Why are most examples
like that, rather than executed as .py files?
I think showing examples at the Python interpreter prompt is *very*
helpful and IMHO a
yoda wrote:
This feels like a stupid question but I'll ask it anyway.
Definitely not a stupid question.
How can I process files chronologically (newest last) when using
os.walk()?
Try this:
In [16]: file_list = [(os.stat(f)[8], f) for f in [os.path.join(i[0],
j) for i in
Will McGugan wrote:
Tim Peters wrote:
[john basha]
send me the britney nude photos
Because they're a new feature, you'll have to wait for Python 2.5 to
be released.
She has just spawned a child process. Give her to Python 2.6 to get back
in shape.
Will McGugan
[EMAIL PROTECTED] wrote:
snip
I am not sure to understand the big difference between time spent in
different areas of code and how long did this thing take to run?.
Looking at python doc for deterministic profiling, I understand the
implementation difference, and the performance implications, but
Roel Schroeven wrote:
Jeremy Jones wrote:
Andy Leszczynski wrote:
Is there any way to pass the prefix to the make install? Why make
depends on that?
A.
What does it matter? If you *could* pass it to make, what does that buy
you? I'm not a make guru, but I'm not sure you
Thomas Bellman wrote:
Xah Lee [EMAIL PROTECTED] writes:
suppose i'm calling two system processes, one to unzip, and one to
tail to get the last line. How can i determine when the first
process is done?
Example:
subprocess.Popen([r/sw/bin/gzip,-d,access_log.4.gz]);
Andy Leszczynski wrote:
Hi,
I run Mandrake 10.0 with python 2.3 installed by default. I want to keep
it as it is but need another, very customized Python installation based
of 2.3 as well. I would prefer to have it the way it is on Windows, one
folder e.g. /opt/mypython with all the stuff
Andy Leszczynski wrote:
Jeremy Jones wrote:
Andy Leszczynski wrote:
Download the source, untar, cd to the new directory, run:
./configure --prefix=/opt/mypython
make
make install
Is there any way to pass the prefix to the make install? Why make
depends on that?
A.
What does
Michael Sparks wrote:
Jeremy Jones wrote:
snip
And maybe
Steve's magical thinking programming language will have a ton of merit.
I see no reason to use such derisory tones, though I'm sure you didn't mean
it that way. (I can see you mean it as extreme skepticism though
[EMAIL PROTECTED] wrote:
Hi there,
I have some scientific application written in python. There is a
good deal of list processing, but also some simple computation such
as basic linear algebra involved. I would like to speed things up
implementing some of the functions in C. So I need
Thierry Lam wrote:
Let's say I have the following xml tag:
para role=success1/para
I can't figure out what kind of python xml.dom codes I should invoke to
read the data 1? Any help please?
Thanks
Thierry
In [20]: import xml.dom.minidom
In [21]: s = '''para role=success1/para'''
In [22]:
Steve Jorgensen wrote:
On Mon, 05 Sep 2005 21:43:07 +0100, Michael Sparks [EMAIL PROTECTED] wrote:
Steve Jorgensen wrote:
On 05 Sep 2005 10:29:48 GMT, Nick Craig-Wood [EMAIL PROTECTED] wrote:
Jeremy Jones [EMAIL PROTECTED] wrote:
One Python process will only
John Brawley wrote:
Greetings, all.
I have a program I'm trying to speed up by putting it on a new machine.
The new machine is a Compaq W6000 2.0 GHz workstation with dual XEON
processors.
I've gained about 7x speed over my old machine, which was a 300 MHz AMD
K6II, but I think there ought to be
Paul Rubin wrote:
Jeremy Jones [EMAIL PROTECTED] writes:
to pass data around between processes. Or an idea I've been tinkering
with lately is to use a BSD DB between processes as a queue just like
Queue.Queue in the standard library does between threads. Or you
could use Pyro between
Xah Lee wrote:
Python Doc Problem Example: os.system
Xah Lee, 2005-09
today i'm trying to use Python to call shell commands. e.g. in Perl
something like
output=qx(ls)
in Python i quickly located the the function due to its
well-named-ness:
import os
os.system(ls)
however, according to the
Diez B. Roggisch wrote:
Kevin McGann wrote:
-Expert Java or C++
Now why exactly do you post that in c.l.python?
THEY ARE LOCATED IN NEW YORK, THIS IS FULL-TIME ONLY, WILL NOT CONSIDER
ANYONE FROM OUTSIDE THE US! THIS TEAM IS AN ELITE TEAM, YOU BETTER BE
GOOD
I'm pretty
Christopher DeMarco wrote:
Hi all...
...I've got a Python script running on a bunch of boxen sharing some
common NFS-exported space. I need (not want :) to lock files for
writing, and I need (not want :) to do it safely (i.e. atomically).
I'm doing this in Linux; NFS4 is available. As I
, if you have a question that's in line with Robert's advice, please
post it and it will have a much higher chance of getting answered. I
sincerely hope this helps.
Jeremy Jones
--
http://mail.python.org/mailman/listinfo/python-list
to the browser calling the cgi script, or in your apache logs?)
Jeremy Jones
--
http://mail.python.org/mailman/listinfo/python-list
uwb wrote:
Jeremy Jones wrote:
uwb wrote:
I've got a call to glob in a .py file sitting in an apache cgi-bin
directory which refuses to work while the exact same code works from a
python console session.
I'm guessing that in order to read or write files from any sort of a
script file
needing to do, but that small snip smells like it needs
a state machine which this book has an excellent, simple one in (I
think) chapter 4.
Jeremy Jones
--
http://mail.python.org/mailman/listinfo/python-list
(foobar.file, w)
In [3]: f.write(foo\n)
In [4]: f.doing_something()
in my own method
But do you really need to subclass file, or can you just use a file
instance in your class?
Jeremy Jones
--
http://mail.python.org/mailman/listinfo/python-list
]: 0.65521407248459007
In [18]: random.random()
Out[18]: 0.74525381787627598
In [20]: r = range(10)
In [21]: random.shuffle(r)
In [22]: r
Out[22]: [6, 4, 9, 7, 2, 0, 8, 3, 5, 1]
Jeremy Jones
--
http://mail.python.org/mailman/listinfo/python-list
Xah Lee wrote:
Very very nice! I don't know scheme well... but oh the macros, such a
wonderful facility...
Macros suck. They created by moron so-called computer scientists and IT
puntits in order opress the programming masses. But I say we must bring
freedom to all programmers. In order
/Periodic_dosage_dir/t2/xlali_skami_cukta.html
Xah
[EMAIL PROTECTED]
http://xahlee.org/
It's really bad enough that you waste the time of the folks on
comp.lang.python. Why cross post like you are? I really fail to see
the point.
Jeremy Jones
--
http://mail.python.org/mailman/listinfo/python
be
dangling. Why not use the Queue from the Queue module? You can push
stuff in from one side and (have as many threads pushing stuff onto it
as you like) and pull stuff off from the other side (again, you can have
as many consumers as you'd like as well) in a thread safe manner.
HTH,
Jeremy
I've got a couple of new articles on ONLamp:
Writing Google Desktop Search Plugins
http://www.onlamp.com/pub/a/python/2005/06/01/kongulo.html
and
Python Standard Logging
http://www.onlamp.com/pub/a/python/2005/06/02/logging.html
Comments, criticisms, flames all welcome.
Jeremy Jones
any idea as to why this is writing over 14,000 \x00
characters to my file to start off with where printable characters
should go and then writing the remainder of the file correctly?
Jeremy Jones
--
http://mail.python.org/mailman/listinfo/python-list
Fredrik Lundh wrote:
Jeremy Jones wrote:
#
file_dict = {}
a_list = [("a", "a%s" % i) for i in range(2500)]
b_list = [("b", "b%s" % i) for i in range(2500)]
c_list = [("c", "c%s" % i) for
.
Jeremy Jones
--
http://mail.python.org/mailman/listinfo/python-list
codecraig wrote:
Jeremy Jones wrote:
codecraig wrote:
Hi,
I thought I posted this, but its been about 10min and hasnt shown
up
on the group.
Basically I created a SimpleXMLRPCServer and when one of its
methods
]:phone.items()
Out[2]:[('billy', 3), ('mike', 10), ('john', 3), ('sue', 8)]
In [3]:[i[0] for i in phone.items() if i[1] == 3]
Out[3]:['billy', 'john']
I added an additional person named billy with a number of 3 since
values in a dictionary don't have to be unique.
Jeremy Jones
--
http
- mylogger - ERROR - this is error
2005-03-09 12:28:33,518 - mylogger - CRITICAL - this is critical
HTH,
Jeremy Jones
--
http://mail.python.org/mailman/listinfo/python-list
modulus).
107 % 4 == 3
because
107 / 4 == 26 R3
and 7 % 3 == 1
because 7 / 3 == 2 R1
HTH,
Jeremy Jones
--
http://mail.python.org/mailman/listinfo/python-list
were more into multi-process systems when it comes to
multi-processors.
I think I even heard some discussion about efficient inter-process
messaging system, but I can't remember where :o)
Hope it'll help.
Pierre
Jeremy Jones
--
http://mail.python.org/mailman/listinfo/python-list
#SECTION00060
Jeremy Jones
--
http://mail.python.org/mailman/listinfo/python-list
become an indispensible tool in my toolbox. I cannot say enough great
things about it.
Jeremy Jones
--
http://mail.python.org/mailman/listinfo/python-list
Brian van den Broek wrote:
Terry Reedy said unto the world upon 2005-01-26 14:08:
Xah the arrogant wrote, among other things,
SNIP
However, there are several errors in the above that would mislead a
Python learner. I advise any such to ignore Xah's writings.
Terry J. Reedy
Hi all,
here's a
Claudio Grondi wrote:
You don't have to rely on expensive and proprietary EDI conversion software
to parse, validate, and translate EDI X12 data to and from XML; you can
build your own translator with any modern programming language, such as
Python.
by Jeremy Jones
http://www.devx.com
://www.python.org/doc/current/lib/ftp-objects.html
HTH,
Jeremy Jones
--
http://mail.python.org/mailman/listinfo/python-list
until the resolve the conflict.
Jeremy Jones
--
http://mail.python.org/mailman/listinfo/python-list
McCarty, Greg wrote:
Ok, I'm new to python,
and I'm trying to come to grips with
a few things. Got
lots of years of
experience with Java and asp/aspx,
etc. Trying to relate
Python's behavior to what
I already know.
Here's the python code
(line #'s added for my question)
')
Traceback (most recent call last):
File stdin, line 1, in ?
TypeError: an integer is required
Thanks in advance!
Scott
If you just want to create a file for writing to, you probably want:
foo = open('foo.txt', 'w')
Jeremy Jones
--
http://mail.python.org/mailman/listinfo/python-list
Alban Hertroys wrote:
Jeremy Jones wrote:
(not waiting, because it already did happen). What is it exactly
that you are trying to accomplish? I'm sure there is a better approach.
I think I saw at least a bit of the light, reading up on readers and
writers (A colleague showed up with a book
into and considering.
Jeremy Jones
--
http://mail.python.org/mailman/listinfo/python-list
his case) to call
mainCond.notify(). This approach is a deadlock just wanting to happen
(not waiting, because it already did happen). What is it exactly that
you are trying to accomplish? I'm sure there is a better approach.
Jeremy Jones
--
http://mail.python.org/mailman/listinfo/python-list
73 matches
Mail list logo