Tim Golden wrote:
>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 projec
here? I apologize if
this is kind of a rookie question but Ive been searching for about a
week with no luck.
Thanks!
Jeremy Martin
NWS WFO GLD
--
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.
>Fra
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
>
> Read in blocks, not byte for byte. I had good experiences with block
> sizes like 4096 or 8192.
It's difficult to handle overlaps. The four byte sequence may occur at the
end of one block and beginning of the next. You'd need to check for these
special cases.
Jeremy
--
J
Jumping right into the code (which should speak for itself):
# ---
try:
# this will fail and be caught
# below, w
import foobar
except ImportError, error:
class foobar:
@staticmethod
def __getattr
am using. :) What I'm wondering is if the other
method could work, of if it simply impossible in Python considering it's
underlying implementation.
> On Fri, Oct 28, 2005 at 02:02:29PM -0400, Jeremy Moles wrote:
> > Jumping right into the code (which should speak for itself):
&
#x27;s homepage, 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
oding
practices and what API's are useful in your domain.
That should be your guide as to when you have
"learned" a language, when you can answer more
questions than you have about a language's style,
coding practices, and API.
aum wrote:
> But for smaller gui programs not needing the power of wx, I find I get
> the job done much more quickly and effortlessly with PyFLTK.
Interesting. I've found PyQt very easy to use too. I wonder how they compare
(providing you can GPL your app, of course).
--
Jeremy S
as the windowing runs
in a separate thread.
The main problem is that I have only really tested it on Unix, but I have
reports that it "mostly" works in Windows (I'm looking into supporting this
soon).
http://home.gna.org/veusz/
Alternatively matplotlib may be another solution.
--
e process,
and use ulimit (or the resource module) to limit the memory usage.
--
Jeremy Sanders
http://www.jeremysanders.net/
--
http://mail.python.org/mailman/listinfo/python-list
I think you answered your own question. :)
x = 0.12345678
y = "%.4f something here" % x
On Wed, 2005-11-09 at 11:52 -0800, Tuvas wrote:
> I would like to limit a floating variable to 4 signifigant digits, when
> running thorugh a str command. Ei,
>
>
> x=.13241414515
> y=str(x)+" something here
ng back and forth all the time.
--
Jeremy Sanders
http://www.jeremysanders.net/
--
http://mail.python.org/mailman/listinfo/python-list
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
>
I'm working on a project using ncurses w/ Python. As an aside, I
implemented addchstr in the cursesmodule.c file in Python SVN, if anyone
wants me to try and get that made permanent.
AT ANY RATE...
I was wondering--and this is more a general curses question rather than
a Python one, but I know th
On Tue, 2005-11-29 at 20:50 +, Tony Nelson wrote:
> In article <[EMAIL PROTECTED]>,
> Jeremy Moles <[EMAIL PROTECTED]> wrote:
>
> > I'm working on a project using ncurses w/ Python. As an aside, I
> > implemented addchstr in the cursesmodule.c file in
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
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 r
I was looking through some code of my today and noticed this little gem
I wrote a few days back that I had totally forgot about:
fill = [("%%-%ds\n" % (columns - 1)) % " " for i in range(yoffset - 2)]
...and then I went on to do:
"".join(fill)
Talk about using the wrong tool for the job... :(
plexity
involved in managing a software distribution composed of third party
software packages. At the very least, you've got the original sources
and the copy in the distribution package, which leads to a
synchronization problem.
Jeremy
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, 04 Jan 2005 17:12:04 -0800, Paul Rubin wrote:
> Irrelevant, the issue isn't what docs can be written if someone wants to
> do it, it's what docs are actually already there
> I just see various other free software projects as
> trying to live up to higher standards and I think Python sh
On Wed, 05 Jan 2005 12:15:29 +0300, Roman Suzi wrote:
> As for concepts, they are from Generic Programming (by Musser and
> Stepanov) and I feel that Python is in position to implement them to the
> fullest extent. And IMHO it will be nicer than just Java-like interfaces
> or Eiffel's contract app
On Thu, 06 Jan 2005 03:27:56 -0800, lbolognini wrote:
> Could you please give me some advice on the best approach to solve this
> problem?
To the best of my knowledge, and I'd be surprised if this wasn't true,
wxPython does not have the necessary tools to do this.
That program doesn't even use t
On Fri, 07 Jan 2005 12:15:48 -0500, Anand S Bisen wrote:
> Is there a simple way to extract words speerated by a space in python
> the way i do it in awk '{print $4 $5}' . I am sure there should be some
> but i dont know it.
mystr = '1 2 3 4 5 6'
parts = mystr.spl
On Fri, 07 Jan 2005 14:39:09 +0100, BJÃrn Lindqvist wrote:
> It works! exec(magic()) does the needed hi = self.hi.
No it doesn't. Try "hi = 'newValue'" and see what happens.
So the next step is to write an "unmagic" function. So now how do you add
instance variables?
There is no way to avoid "se
On Mon, 10 Jan 2005 01:51:07 +0100, BJÃrn Lindqvist wrote:
> This is promising, I'm content with whatever slowdowns necessary as long
> as I can prove those who say "you can't do it" wrong. :)
Since I think I'm the only person in this discussion that said anything
about what you can't do, be clear
On Sun, 09 Jan 2005 08:36:04 -0800, onlyonemc wrote:
> I would like to have functions that operate on long strings, 10-100 MB. In
> C I would of course pass a pointer to the string for a quick function
> call. What is an efficient way to do this in python? Cheers,
> -mark
Others have pointed ou
r the nlst command:
http://www.python.org/doc/current/lib/ftp-objects.html
HTH,
Jeremy Jones
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, 11 Jan 2005 03:32:01 -0800, Flavio codeco coelho wrote:
> So my question is: how can I check for the availability of X? i.e., How
> will my program know if its running in a text only console or in console
> window over X?
The first thing that leaps to mind is... try it. If it fails, switch
On Fri, 14 Jan 2005 16:26:02 -0600, Evan Simpson wrote:
> WEBoggle needs a new game board every three minutes. Boards take an
> unpredictable (much less than 3min, but non-trivial) amount of time to
> generate.
I gotta ask, why?
Looking over your information about "how to play", my only guess
On Sat, 15 Jan 2005 10:54:28 +, Michael Hoffman wrote:
> Xah Lee wrote:
>
>> Â a = range(1,51)
>> Â for x in a:
>> Â if x % 2 == 0:
>> Â print x, 'even'
>
> Now he's mixing tabs and spaces. Hideous.
>
> Are you doing things wrong on purpose?
I think the most exciting thing is the br
On Sun, 16 Jan 2005 05:30:37 +0200, ionel wrote:
> how to make a efficient server.. please point me to some good and clear
> examples
Your question is too broad. There is no such thing as "a server", the
server must *do* something and it is generally named for what it does..
Please read http://w
On Sun, 16 Jan 2005 22:08:13 +0800, bwobbones wrote:
> Hi all,
>
> I'm a java programmer struggling to come to terms with python - bear
> with me!
Christophe already identified the problem, I wanted to address another
Javaism in your code, for your educational benefit.
Speaking "idiomaticall
On Tue, 18 Jan 2005 14:05:15 +, Antoon Pardon wrote:
> I don't see how generating byte code for a = 9; when seeing the
> expression a = 3 + 6, would be a problem for non-functional
> languages.
To answer nearly every post you've made to this thread, "because Python
doesn't have the resources t
On Tue, 18 Jan 2005 12:59:07 -0800, Robert Brewer wrote:
> Especially since you can already do it explicitly with Raymond
> Hettinger's cookbook recipe:
> http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/277940
You know, Guido might as well give in now on the Macro issue. If he
doesn't come
On Tue, 18 Jan 2005 14:36:08 -0800, Jeff Shannon wrote:
> I think that this sort of thing is better to have as an explicitly
> risky hack, than as an endorsed part of the language. The mere fact
> that this *is* something that one can clearly tell is working around
> certain deliberate limitati
On Tue, 18 Jan 2005 22:53:10 -0800, Eric Pederson wrote:
> Perhaps I've answered my question and the under-the-hood mechanics are
> handled on the OS side, and Python is just making requests of the OS...
Almost by definition, the only correct way to read a file is to use the
file system, which on
).
You might also consider berkeley db, which is a simple database to add to
an application, (and which I believe supports locks), but I must admit I'm
not a fan of the library.
I assume that the bottleneck is processing the records, otherwise this all
seems a bit academic.
Jeremy
--
http://
On Wed, 19 Jan 2005 16:35:23 -0800, Erik Bethke wrote:
> So it seems to me, that ElementTree is just not expecting to run into the
> Korean characters for it is at column 16 that these begin. Am I
> formatting the XML properly?
You should post the file somewhere on the web. (I wouldn't expect Us
On Thu, 20 Jan 2005 21:54:30 +0100, Martin v. LÃwis wrote:
> Luis P. Mendes wrote:
>> When I access the url via the Firefox browser and look into the source
>> code, I also get:
>>
>> > xmlns="http"> ~
>> ~439 ~
>>
>
On Thu, 20 Jan 2005 21:06:31 -0800, Eric Pederson wrote:
> Here the sort of thing (seek, then read) I think I want:
>
IDV2=open(("http://musicsite.com/song453.mp3","rb";)[:-128])
>
song453.tags=IDV2.read()
>
len(song453.tags)
>
> 128
>
>
> But it's not a Python problem. :-(
O
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
On Fri, 21 Jan 2005 23:27:28 +0800, Craig Ringer wrote:
> The chances are that whatever you want to do with dynamically created
> properties is better done with __getattr__ and __setattr__ instead.
Rather than post my own comment, I'd like to highlight this, emphasize it,
and underline it twice. T
On Fri, 21 Jan 2005 03:08:50 -0800, Xah Lee wrote:
> i've started to read python tutorial recently.
> http://python.org/doc/2.3.4/tut/tut.html
>
> Here are some quick critique:
You don't have the respect points for anyone to give a damn. Step one
would be demonstrating that you understand the la
On Fri, 21 Jan 2005 21:01:00 -0400, Andrà Roberge wrote:
> etc. Since I want the user to learn Python's syntax, I don't want to
> require him/her to write
> alex = CreateRobot(name = 'alex')
> to then be able to do
> alex.move()
This is just my opinion, but I've been involved with teaching new
pro
On Sun, 23 Jan 2005 08:27:49 -0800, EP wrote:
>
>> My brain-teaser: What I'd like to do is read the last ~2K of a large
>> number of large files on arbitrary servers across the net, without
>> having to read each file from the beginning (which would be slow and
>> resource inefficient)...
>>
>>
On Mon, 24 Jan 2005 12:17:13 -0600, Philippe C. Martin wrote:
> I use "__"for private variables because I must have read on net it was the
> way to do so - yet this seems to have changed -
It's still as true as ever, at least in terms of language support, it's
just that the Python community, and
On Mon, 24 Jan 2005 15:35:11 -0600, Philippe C. Martin wrote:
> The real reason behind my using private variables is so they do not appear
> in the epydoc generated documentation and confuse my users.
You mean single or double underscores? I just checked and at least epydoc
2.1 doesn't include si
On Tue, 25 Jan 2005 15:01:23 -0800, Davor wrote:
> Thanks,
>
> I do not hate OO - I just do not need it for the project size I'm
> dealing with - and the project will eventually become open-source and
> have additional developers - so I would prefer that we all stick to
> "simple procedural" stuf
> want to know.
It probably would be easy to convert source in the form using brackets to
indented form on the fly, and use exec to interpret the converted form.
You need to do something like convert { to
:
foo
Of course this isn't a good idea.
Jeremy
--
http://mail.pyth
of us mere
mortals. So, ignore him, post responses for the benefit of others out
there, entertain yourself by pointing out to yourself and others his
folly, but don't waste your time replying back to him and trying to talk
sense. Like I said, we're stuck with him.
Jeremy
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, 27 Jan 2005 04:04:38 +, phr wrote:
> Skip Montanaro <[EMAIL PROTECTED]> writes:
>> Because good requirements specification is difficult and testing improves
>> the breed. Better to have the major API changes and bugs taken care of, and
>> to have its popularity demonstrated *before* i
n. IPython has
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
On Thu, 27 Jan 2005 15:01:12 -0500, Chris Mattern wrote:
> Is it just me, or is the disappointing lack of flamewars
> slowly ratcheting up the level of vitriol in his posts?
What flabbergasts me is the stunning failure in trolling that XL is.
I've accidentally trolled (if you can extend the trol
On Sun, 30 Jan 2005 21:54:46 -0500, Daniel Bickett wrote:
> Indeed, here is a detailed help document on GMail POP3 access:
>
> http://gmail.google.com/support/bin/answer.py?answer=12103
>
> huh...look at that, they're using python :) Never noticed that before.
Can you expand on that for us non-
On Sun, 30 Jan 2005 19:42:22 -0800, rasdj wrote:
> I have a lot of SQL to convert to postgres from oracle. I have most of the
> problems worked out except for this last bit. Many of my tables need the
> last comma replaced with a close parenthesis - they look like this:
>
> create table schema.ta
On Sun, 30 Jan 2005 20:21:49 -0800, rasdj wrote:
> Thanks Jeremy, something like this would work:
>
> try:
> lines = [ line.replace(",\n;", ")\n;") for line in input ]
>
> If I could figgure out how to:
>
> IF ':' in line
> READ next
On Sun, 30 Jan 2005 22:25:10 -0600, John Hunter wrote:
> The question is: does shipping a backend which imports a module that
> links with GPL code make some or all of the library GPL. This
> question is complicated, in my mind at least, by several factors.
I believe the best and most honest answ
On Tue, 01 Feb 2005 00:43:21 +, Raymond Hettinger wrote:
> My guess is that there will be two issues. One is that no one
> implementation of graphs seems to satisfy all users. The second is that
> only a small fraction of Python users need for graph support (there is
> probably a much greater
On Tue, 01 Feb 2005 09:13:36 -0600, Thomas Bartkus wrote:
> *Is* there a reason why the interpreter couldn't/shouldn't require formal
> variable declaration?
You mean, other than the reasons already discussed at length in this
thread, not to mention many many others?
Your not *liking* the reasons
On Tue, 01 Feb 2005 21:57:45 +, Grant Edwards wrote:
> On 2005-02-01, alexrait1 <[EMAIL PROTECTED]> wrote:
>
>> Do something useful... (at least for me) For instance I need a gtk
>> frontend for pgp. So here you can have an opportunity to learn both
>> pyGTK and pgp. A lot of python code... :
On Tue, 01 Feb 2005 17:47:39 -0800, Joel Eusebio wrote:
> Whenever I access test.py from my browser it says "The page cannot be
> found" , I have the file on /var/www/html, what did I miss?
>
> Thanks in advance,
> Joel
In general, you will need to post the relevant entries from your Apache
erro
On Tue, 01 Feb 2005 19:24:20 -0800, aurora wrote:
> I have a parser I need to optimize. It has some disk IO and a lot of
> looping over characters.
>
> I used the hotspot profiler to gain insight on optimization options. The
> methods show up on on the top of this list seems fairly trivial and do
sets itself as a "default browser" on startup, so python could
also look for a similar setting.
webbrowser could identify whether it was running under KDE/Gnome (maybe
scan the processes?), identify the correct desktop's browser (or just use
Gnome, maybe), and start that web browser
On Wed, 02 Feb 2005 10:28:46 +0100, Christian wrote:
> Hello,
>
> i have an apache 1.3 server with python on debian. Python works fine but
> the scripts wontÂt work.
I know what your problem is.
But first, check your apache error log. Then you will know what your error
is, too.
If you can't
On Wed, 02 Feb 2005 02:35:03 -0800, python wrote:
> Each pair in a dictionary is separated by CRLF and in each dictionary
> numbers of pairs can be different.
> I need to read only the the first and the last dictionaries.What is a
> best solution?
> Thanks
> Lad
Who cares about the best solution?
On Wed, 02 Feb 2005 20:49:07 +, Axel Straschil wrote:
You are doing several things wrong.
> I was fooling around with creating classes for a module with eval,
You shouldn't create classes with eval, because you don't need to.
"class" isn't a declaration, it is an executable statement that c
On Wed, 02 Feb 2005 11:52:29 -0800, [EMAIL PROTECTED] wrote:
> So... Should I turn this into a PEP?
I would think a much more productive step one would be to put together the
proposed functionality with unittest and the trace module, and use the
output of your tool to drive some sort of simple ou
On Wed, 02 Feb 2005 16:20:41 -0500, Jeremy Bowers wrote:
> That said, "__main__" indicates you ran it in the interactive shell.
Or ran it directly on the command line. Duh. I thought that clause really
loudly, but I guess I never actually typed it.
--
http://mail.python.org/mai
On Thu, 03 Feb 2005 09:26:08 +0200, Ilias Lazaridis wrote:
> My question is essentially:
>
> How many of those constructs are already supported by python (and the
> surrounding open-source-projects):
>
> http://lazaridis.com/case/stack/index.html
This post is hard to follow, but I'm going to as
On Thu, 03 Feb 2005 09:40:55 -0800, [EMAIL PROTECTED] wrote:
> Thanks, Jeremy,
>
>> No prose can compare to a live, functional demonstration.
>
> I agree; that's what my prototype amounts to:
>
> <http://prdownloads.sourceforge.net/zbt/zbt.zip?download>
>
On Thu, 03 Feb 2005 13:55:13 +0100, Christian wrote:
> from mod_python import apache
> ^
> SyntaxError: invalid syntax
>
>
> My test script:
> #!/usr/bin/python
>
> print 'Content-Type: text/plain\r'
> print '\r'
> import os
> print os.getcwd()
For the quote of the error message, I'
On Thu, 03 Feb 2005 07:45:22 -0500, Steve Holden wrote:
> Fredrik Lundh wrote:
>> in theory, if PyInt_FromLong succeeds, and PyTuple_SetItem fails, you'll leak
>> an object.
>>
>>
>>
> And in practice this will only happen during a period when you are
> relying critically on it *not* to ...
On Thu, 03 Feb 2005 15:48:05 +, C Gillespie wrote:
> Dear All,
>
> I have a simple class
> class hello:
> def world(self):
> return 'hello'
> def test(self,arg):
> return self.arg
>
> When I want to do is:
>>hello.test('world')
> 'hello'
>
> i.e. pass the method name
On Thu, 03 Feb 2005 22:46:24 -0500, Markus Wankus wrote:
> I realize your admirable intentions and the fact that you are simply
> trying to help (the beauty of this community), but I beg you all
> now...PLEASE...do not feed this troll. Any responses to his posts will
> simply snowball into the
On Thu, 03 Feb 2005 19:00:30 -0800, Paul Rubin wrote:
> Hmm, I'm not familiar with Nevow. Twisted is pretty neat, though
> confusing. I don't see how to scale it to multiple servers though.
Same way you'd scale any webserver, load balancing in hardware, store all
user state in a database, and te
On Thu, 03 Feb 2005 20:50:16 -0800, Paul Rubin wrote:
> I understood the Twisted suggestion as meaning avoiding database
> traffic by keeping both user and server state resident in the
> application. Yes, if you use a database for that, you get multiple
> app servers instead of a heavily loaded ce
On Fri, 04 Feb 2005 12:43:37 -0500, Alan McIntyre wrote:
> def straightforward_collapse(myList):
> collapsed = [myList[0]]
> for n in myList[1:]:
> if n != collapsed[-1]:
> collapsed.append(n)
>
> return collapsed
>
> Is there an elegant way to do this, or sho
On Fri, 04 Feb 2005 10:48:44 -0700, Steven Bethard wrote:
> I have lists containing values that are all either True, False or None,
> e.g.:
>
> [True, None, None, False]
> [None, False, False, None ]
> [False, True, True, True ]
> etc.
>
> For a given list:
> * If all
On Fri, 04 Feb 2005 14:49:43 -0500, rbt wrote:
> Alan McIntyre wrote:
>> I think it's because you're modifying the list as you're iterating over
>
> In this case then, shouldn't my 'except Exception' raise an error or
> warning like:
>
> "Hey, stupid, you can't iterate and object and change it
On Fri, 04 Feb 2005 16:44:48 -0500, Daniel Bickett wrote:
> [ False , False , True , None ]
>
> False would be returned upon inspection of the first index, even
> though True was in fact in the list. The same is true of the code of
> Jeremy Bowers, Steve Juranich, and Jeff Shannon.
On Sat, 05 Feb 2005 16:44:11 +0200, Ilias Lazaridis wrote:
>> * Deployment: I don't generally have enough problems with this to be
>> worth thinking about. I don't know what the state of the remote
>> debugging is on Python; Google "remote debugging Python".
>
> [I like to avoid interaction with g
lysis of the same situation in Java, see
>http://xahlee.org/java-a-day/assign_array_to_list.html
>
>How to write a tutorial
>http://xahlee.org/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-list
e the first letter to divide
the names up, for instance, or part of the hash value.
Many Linux FSs can cope with lots of files, but it doesn't hurt to try to
avoid this.
Jeremy
--
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 ord
Negroup wrote:
> Do you guys know an alternative that fits my needings without moving
> from Python?
Turbo Vision in dos used to be really good. There's a python binding to the
free version here:
http://tvision.sourceforge.net/
(I haven't tried it)
--
Jer
Erik Max Francis wrote:
> But it doesn't return a tuple of them. Which is what the tuple call
> there does.
Yes, but I think he meant:
t = tuple(d.items())
--
Jeremy Sanders
http://www.jeremysanders.net/
--
http://mail.python.org/mailman/listinfo/python-list
epr() writes onto one line.
If you're storing types without repr() representations this will not work.
Jeremy
--
Jeremy Sanders
http://www.jeremysanders.net/
--
http://mail.python.org/mailman/listinfo/python-list
921336622176518
In [17]: random.random()
Out[17]: 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
Jeremy wrote:
>Hello all,
> I am trying to inherit the file object and don't know how to do it. I
>need to open a file and perform operations on it in the class I am
>writing. I know the simple syntax is:
>
>class MyClass(file):
> ...
>
>but I do
class BaseClass:
def __init__(self):
self.__data = None
def getMember(self):
return self.__data
class GoodSubClass(BaseClass):
def __init__(self):
BaseClass.__init__(self)
class BadSubClass(BaseClass):
def __init__(s
This is my first time working with some of the more lower-level python
"stuff." I was wondering if someone could tell me what I'm doing wrong
with my simple test here?
Basically, what I need is an easy way for application in userspace to
simply echo values "down" to this fifo similar to the way pr
at all? Spitting out an error? If so, what error? (And is it an error
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 conso
": http://gnosis.cx/TPiP/ Don't know
what all you're 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
fargo wrote:
> I'm looking for some way to sort files by date.
you could do something like:
l = [(os.stat(i).st_mtime, i) for i in glob.glob('*')]
l.sort()
files = [i[1] for i in l]
Jeremy
--
Jeremy Sanders
http://www.jeremysanders.net/
--
http://mail.python.org/mailman/listinfo/python-list
rbt wrote:
> What is the appropriate way to break out of this while loop if the for
> loop finds a match?
queue discussion why Python doesn't have a "break N" statement...
--
Jeremy Sanders
http://www.jeremysanders.net/
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, 2005-07-13 at 09:00 -0700, [EMAIL PROTECTED] wrote:
> I'm trying to open a text file, remove all instances of the words
> "f=x;" and "i=x;" where x can be any number 0-14. Also, I want to
> remove all { " or ) or ( or ' } each time one of those characters
> occurs respectively. This
101 - 200 of 604 matches
Mail list logo