On Feb 17, 3:56 am, Benjamin [EMAIL PROTECTED] wrote:
How would I go about flattening a dict with many nested dicts
within? The dicts might look like this:
{mays : {eggs : spam},
jam : {soda : {love : dump}},
lamba : 23}
I'd like it to put / inbetween the dicts to make it a one
dimensional
On Sat, 16 Feb 2008 19:40:51 -0800, W. Watson wrote:
from Tkinter import *
class App:
def __init__(self, master):
fm = Frame(master)
Button(fm, text='Left').pack(side=LEFT)
Button(fm, text='This is the Center button').pack(side=LEFT)
Button(fm,
Arnaud Delobelle wrote:
In Python you can do anything, even
...pass the Turing test with a one-liner. Back after 9/11, when US patriotism
was the rage, Python knew how to answer correctly the query
filter(lambda W : W not in 'ILLITERATE','BULLSHIT')
And Python 3.0 slated for next August
Paul Rubin wrote:
[EMAIL PROTECTED] [EMAIL PROTECTED] writes:
Historically, though, the ultimate authority on this kind of stuff is
Richard Stevens and his Unix and TCP/IP books
I recommend these books if you want to get into network programming.
I keep wanting to get that book, but it
On Feb 16, 11:59 pm, Zack [EMAIL PROTECTED] wrote:
Zack wrote:
Diez B. Roggisch wrote:
Zack schrieb:
If I have a class static variable it doesn't show up in the __dict__
of an instance of that class.
class C:
n = 4
x = C()
print C.__dict__
{'__module__': '__main__',
On 22:51, 16Feb2008, John Machin wrote:
On Feb 17, 5:40 pm, Pradnyesh Sawant wrote:
fire up python2.4 interactive prompt
do this:
import sys; sys.path
import xmltramp; xmltramp.__file__
then fire up python2.5 interactive prompt
do this:
import sys; sys.path
Hey,
thanks a lot for that
I have new blog. please seemy blog and give me score for my blog.
My blog is www.cahenom.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
On Feb 17, 3:29 pm, Pradnyesh Sawant [EMAIL PROTECTED] wrote:
Hello,
I have a small program which does 'import hashlib'. This program runs fine
with python2.5. But when I try running the same program through mod_python,
I get the error: 'ImportError: No module named hashlib' in the apache2
On 02:07, 17Feb2008, Graham Dumpleton wrote:
On Feb 17, 3:29 pm, Pradnyesh Sawant wrote:
Hello,
Your mod_python isn't compiled against Python 2.5 but is using an
older version. You will need to rebuild mod_python to use Python 2.5
instead. You cannot just point mod_python at the Python
On Feb 16, 8:40 pm, W. Watson [EMAIL PROTECTED] wrote:
The following two examples are from Grayson's book on Tkinter. He's making a
simple dialog with three buttons. In the first example, he does not use the
Frame class, but in the second he does. Doesn't the first example need a
container?
On Feb 17, 9:29 am, Francesco Bochicchio [EMAIL PROTECTED] wrote:
Anyway, Tk() already opens a frame, so in the first example the buttons
are created inside that frame, while in the second example two frames
are created: the one creaded by Tk() il left empty but you should see it
(maybe very
Take a look at Fred Lundh's Squeeze programme.
quote ... " If all you need is to wrap up a couple of Python scripts
and
modules into a single file, Squeeze might be what
you need.
The squeeze utility can be used to distribute a
complete Python application as one or two files, and run it using
Hi Arnaud Benjamin
Here's a version that's a bit more general. It handles keys whose values
are empty dicts (assigning None to the value in the result), and also dict
keys that are not strings (see the test data below). It's also less
recursive as it only calls itself on values that are dicts.
I did run them both, but not simultaneously. They looked the same to me. I
should have probably captured both. I'll check for a small one somewhere.
Francesco Bochicchio wrote:
On Sat, 16 Feb 2008 19:40:51 -0800, W. Watson wrote:
from Tkinter import *
class App:
def __init__(self,
Thanks very much. I'm somewhat new to this, but I would think that Frame
might carry some properties not available to the root. If so, then there
might be some advantage to it.
7stud wrote:
On Feb 16, 8:40 pm, W. Watson [EMAIL PROTECTED] wrote:
The following two examples are from Grayson's
nexes wrote:
there is more data that needed to be assigned(i.e. a couple
megs of data) it would be simpler (and more efficient) to
do a compare rather then assigning all that data to an array,
since you are only going to be using 1 value and the rest
of the data in the array is useless.
On Feb 17, 12:18 pm, Terry Jones [EMAIL PROTECTED] wrote:
Hi Arnaud Benjamin
Here's a version that's a bit more general. It handles keys whose values
are empty dicts (assigning None to the value in the result), and also dict
keys that are not strings (see the test data below). It's also less
On 16 fév, 11:35, Steven D'Aprano [EMAIL PROTECTED]
cybersource.com.au wrote:
(snip)
If
you're not a native English speaker, please say so
Actually, from looking at the OP's GoogleGroup profile, I think we can
safely assert he's not a native English speaker.
--
I have this script:
import os, thread, threading, time, sys
class Script1(threading.Thread):
def run(self):
os.system('runScript1.py')
class Script2(threading.Thread):
def run(self):
os.system('runScript2.py')
if __name__ == '__main__':
s = Script1()
s.start()
Harlin Seritt wrote:
When x is typed, everything does shut down but the main script never
fully ends. Is there any way to get it to quit?
You don't need threads. Please use the subprocess module instead of
threads + os.system.
Christian
--
http://mail.python.org/mailman/listinfo/python-list
In article [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
If you don't care about the address of the sender, e.g. you are not
going to send anything back, is there an advantage to using recv()?
At the system call level, recv() is marginally faster since there's less
data to pass back and forth
hi
i am using PIL to get and set image data.Using image.getdata() i can
get a tuple of ints for each pixel. also i can use im.putdata(data)
to set pixels .
suppose i am given a double value as a pixel value (say 7245654.32456
which i may get from some image processing calc..) and thus i have
Afternoon Guys,
I've got what I would consider to be a strange memory leak within an
application I've been working on. When the application is running the
consumed system memory creeps up slowly, getting higher and higher.
However, when looking at 'top' to display the memory allocation for
On Feb 16, 3:06 pm, Vamp4L [EMAIL PROTECTED] wrote:
Thanks Mike,
Simple enough! I was wandering about the close method too, I had to
hack that together from what I knew about python already. I'll be
sure to join that mailing list.
If you get the chance, check out the wxPython in Action
Dan Bishop wrote:
I will say, however, that hasattr(item, '__iter__') isn't a perfect
way of checking whether an object is iterable: Objects that just
define __getitem__ are iterable too (e.g., UserList).
Speaking of which, what *is* the best way to check if an object is
iterable?
I always
Christian Heimes wrote:
Harlin Seritt wrote:
When x is typed, everything does shut down but the main script never
fully ends. Is there any way to get it to quit?
You don't need threads. Please use the subprocess module instead of
threads + os.system.
Christian
That's a good
Hello,
I have created a frame in which i want to display an animated progressbar in
a canvas. I use PhotoImage function of PIL. But it doesn't display the
animated gif code looks like this
self.imgobj = PhotoImage(file=imgpath)
self.c = Canvas(self.frame2, bg='white',width=64,height=310)
On Feb 17, 10:17 am, Matthew Marshall [EMAIL PROTECTED]
wrote:
Dan Bishop wrote:
I will say, however, that hasattr(item, '__iter__') isn't a perfect
way of checking whether an object is iterable: Objects that just
define __getitem__ are iterable too (e.g., UserList).
Speaking of which,
On Feb 17, 7:51 am, Arnaud Delobelle [EMAIL PROTECTED] wrote:
BTW, I keep using the idiom itertools.chain(*iterable). I guess that
during function calls *iterable gets expanded to a tuple. Wouldn't it
be nice to have an equivalent one-argument function that takes an
iterable of iterables
George Sakkis wrote:
On Feb 17, 7:51 am, Arnaud Delobelle [EMAIL PROTECTED] wrote:
BTW, I keep using the idiom itertools.chain(*iterable). I guess that
during function calls *iterable gets expanded to a tuple. Wouldn't it
be nice to have an equivalent one-argument function that takes an
Arnaud == Arnaud Delobelle [EMAIL PROTECTED] writes:
Arnaud BTW, I keep using the idiom itertools.chain(*iterable). I guess
Arnaud that during function calls *iterable gets expanded to a tuple.
Arnaud Wouldn't it be nice to have an equivalent one-argument function
Arnaud that takes an iterable
Gary Herron wrote:
That's a good answer. However, it you *do* want threads, and you don't
want the main thread to wait for the threads to quit, you can make the
threads daemon threads. See setDaemon method on Thread objects in the
threading module.
In general you are right. But I don't
--
http://mail.python.org/mailman/listinfo/python-list
Apologies for any multiple copies received. We would appreciate it if you
could distribute
the following call for papers to any relevant mailing lists you know of.
CALL FOR PAPERS
Special
On Feb 17, 4:03 pm, Boris Borcic [EMAIL PROTECTED] wrote:
George Sakkis wrote:
On Feb 17, 7:51 am, Arnaud Delobelle [EMAIL PROTECTED] wrote:
BTW, I keep using the idiom itertools.chain(*iterable). I guess that
during function calls *iterable gets expanded to a tuple. Wouldn't it
be
Anybody willing to help?
On Feb 14, 11:17 am, John Henry [EMAIL PROTECTED] wrote:
Thank you for the response. I am having trouble using the script. I
am assuming the TUI is the application this script was developed for
and did my best to replace that with the name of my own.
To make things
I've been looking at the Python source code recently, more
specifically trying to figure out how it's garbage collector works.
I've gathered that it uses refcounting as well as some cycle-detection
algorithms, but I haven't been able to figure out some other things.
Does Python actually have a
Can I get reference to module object of current module (from which the
code is currently executed)? I know __import__('filename') should
probably do that, but the call contains redundant information (filename,
which needs to be updated), and it'll perform unnecessary search in
loaded modules
Pie Squared [EMAIL PROTECTED] writes:
Also, if it does, how does it deal with memory segmentation? This
question bothers me because I've been trying to implement a moving
garbage collector, and am not sure how to deal with updating all
program pointers to objects on the heap, and thought
Consider what happens when you add two fractions:
1/2 + 1/5
To do that, you have to take the LCD of the denomintor, in this case
10, so you get
5/10 + 2/10 = 7/10
Now imagine that you're adding a lot of different numbers with a lot
of different bases. That LCD's going to be pretty big.
I went to Python.org, DL'd Python 2.5 source code per the usual
inadequate instructions and ran the make files successfully (sort of).
Python 2.5 works fine. But from Tkinter import * gets a What's
Tkinter? message. IDLE's no where to be found.
What's not in the instructions is what directory
Everything I've read about Tkinter says you create your window and
then call its mainloop() method. But that's not really true. This is
enough to launch a default window from the console:
from Tkinter import *
foo = Tk()
Google's great, but it has no truth meter. Do I inherit from Frame? Or
is
In article [EMAIL PROTECTED],
[EMAIL PROTECTED] [EMAIL PROTECTED] writes:
I have had some difficulty following the assertions, corrections,
and misquoting in this article thread, so apologies in advance if
I have missed a correction or misunderstood an assertion.
[ quoting partially corrected:
Tkinter gets no respect. But IDLE's a Tkinter-based app and every
example I've Googled up shows Tkinter as needing about half as much
code as wx to do the same job. I'm beginning to Tkinter up my language
application. Am I making a big mistake?
--
Paul Rubin wrote:
Pie Squared [EMAIL PROTECTED] writes:
Also, if it does, how does it deal with memory segmentation? This
question bothers me because I've been trying to implement a moving
garbage collector, and am not sure how to deal with updating all
program pointers to objects on the
[EMAIL PROTECTED] writes:
Tkinter gets no respect. But IDLE's a Tkinter-based app and every
example I've Googled up shows Tkinter as needing about half as much
code as wx to do the same job. I'm beginning to Tkinter up my language
application. Am I making a big mistake?
I still use tkinter do
On Feb 17, 1:57 pm, Paul Rubin http://[EMAIL PROTECTED] wrote:
Pie Squared [EMAIL PROTECTED] writes:
Also, if it does, how does it deal with memory segmentation? This
question bothers me because I've been trying to implement a moving
garbage collector, and am not sure how to deal with
Lie wrote:
Consider what happens when you add two fractions:
1/2 + 1/5
To do that, you have to take the LCD of the denomintor, in this case
10, so you get
5/10 + 2/10 = 7/10
Now imagine that you're adding a lot of different numbers with a lot
of different bases. That LCD's going to be
I researched this for some Java I wrote. Try to avoid shuffling
physical memory - you'll write a lot less code and it will be faster,
too.
Use an allocated list and an available list. Keep them in address
order. Inserting (moving list elements from insertion point to end)
and deleting
hi John,
John Henry wrote:
Anybody willing to help?
I struggled the past few days with the same problem,
and with the help of Werner Bruhin (wxPython list) I found a solution.
I had 2 problems:
- not finding mpl datapath
- matplotlib insisted on installing backends that were distorted on
On 17 Feb, 20:38, [EMAIL PROTECTED] wrote:
I went to Python.org, DL'd Python 2.5 source code per the usual
inadequate instructions and ran the make files successfully (sort of).
Python 2.5 works fine. But from Tkinter import * gets a What's
Tkinter? message. IDLE's no where to be found.
It
On Feb 17, 7:05 am, Wolfgang Draxinger [EMAIL PROTECTED]
wrote:
nexes wrote:
there is more data that needed to be assigned(i.e. a couple
megs of data) it would be simpler (and more efficient) to
do a compare rather then assigning all that data to an array,
since you are only going to be
On Feb 16, 2:59 pm, Jeff Schwab [EMAIL PROTECTED] wrote:
Carl Banks wrote:
On Feb 16, 1:39 pm, Jeff Schwab [EMAIL PROTECTED] wrote:
Aahz wrote:
In article [EMAIL PROTECTED],
Jeff Schwab [EMAIL PROTECTED] wrote:
[EMAIL PROTECTED] wrote:
On Feb 14, 10:50 pm, [EMAIL PROTECTED] (Aahz)
Pie Squared wrote:
I've been looking at the Python source code recently, more
specifically trying to figure out how it's garbage collector works.
I've gathered that it uses refcounting as well as some cycle-detection
algorithms, but I haven't been able to figure out some other things.
On Feb 17, 3:05 pm, [EMAIL PROTECTED] wrote:
I researched this for some Java I wrote. Try to avoid shuffling
physical memory - you'll write a lot less code and it will be faster,
too.
Use an allocated list and an available list. Keep them in address
order. Inserting (moving list elements
On Feb 18, 5:25 am, Alex [EMAIL PROTECTED] wrote:
Can I get reference to module object of current module (from which the
code is currently executed)? I know __import__('filename') should
probably do that, but the call contains redundant information (filename,
which needs to be updated), and
On Feb 15, 7:54 pm, [EMAIL PROTECTED] wrote:
I assert it's easier to write:
start_new_thread( this_func )
def thrA():
normal_suite()
than
def thrA():
normal_suite()
start_new_thread( thrA )
If you don't, stop reading.
Nothing beats if
On 17 fév, 20:38, [EMAIL PROTECTED] wrote:
(snip)
What's not in the instructions is what directory should I be in when I
download? Where should I put the .bz2 file? What dir for running the
make files?
Neither are the basic shell commands like cd, tar etc. Nothing Python-
specific here, and
[EMAIL PROTECTED] schrieb:
I went to Python.org, DL'd Python 2.5 source code per the usual
inadequate instructions and ran the make files successfully (sort of).
Python 2.5 works fine. But from Tkinter import * gets a What's
Tkinter? message. IDLE's no where to be found.
What's not in the
Pie Squared [EMAIL PROTECTED] writes:
It seems to me that another, perhaps better strategy, would be to
allocate a large heap space, then store a pointer to the base of the
heap, the current heap size, and the beginning of the free memory.
When you need to 'allocate' more room, just return a
On Feb 17, 10:01 pm, Pie Squared [EMAIL PROTECTED] wrote:
[...]
It seems to me that another, perhaps better strategy, would be to
allocate a large heap space, then store a pointer to the base of the
heap, the current heap size, and the beginning of the free memory.
When you need to 'allocate'
Also, if it does, how does it deal with memory segmentation? This
question bothers me because I've been trying to implement a moving
garbage collector, and am not sure how to deal with updating all
program pointers to objects on the heap, and thought perhaps an answer
to this question would
Which xmlns:ns1 gets redefined because I just didn't figure out how
get xmlns:ns0 definition into the Workbook tag. But too bad for me.
What about actually *reading* the links I post?
http://codespeak.net/lxml/tutorial.html#the-e-factory
Hint: look out for the nsmap keyword argument.
I'm just a beginner, but I think I understand some of this:
The mainloop is not there to build the window, it is there to check for
events, i.e. continually refresh all the widgets. Without, any events you
bind will not be detected.
Tk() is the first window you make, any after that are
Martin v. Löwis [EMAIL PROTECTED] writes:
That's not exactly true, i.e. it isn't mark-and-sweep, but some similar
scheme that allows incremental collection without write barriers. This
particular scheme heavily relies on refcounting itself (specifically,
an object is garbage in a certain
days_in_month 12:
31
30
28
31
...
30
31
assign $days days_in_month[$month]
This is missing
days_in_month 12:
31
break
30
break
Or the addition
add $x' $x offset
store $r0 $x'
assign $days $r0
Is that 4 ticks or 5; or 24 blips?
--
http://mail.python.org/mailman/listinfo/python-list
On 22 Jan., 23:56, [EMAIL PROTECTED] wrote:
So anyone got an answer to which set of numbers gives the most targets
from 100 onwards say (or from 0 onwards)? IsPythonupto the task?
It's (5, 8, 9, 50, 75, 100): 47561 targets altogether (including
negative ones), 25814 targets = 100.
(BTW, 1226
I am using the xml.sax package, and I'm running into a little
problem. When I use the parse(url, ContentHandler()) method, I don't
know what parse() is naming the instance of ContentHandler.
I have a sub-class of ContentHandler make a dictionary of what it
parses, but the problem is I don't know
Adam W. schrieb:
I am using the xml.sax package, and I'm running into a little
problem. When I use the parse(url, ContentHandler()) method, I don't
know what parse() is naming the instance of ContentHandler.
I have a sub-class of ContentHandler make a dictionary of what it
parses, but the
[EMAIL PROTECTED] wrote:
days_in_month 12:
31
30
28
31
...
30
31
assign $days days_in_month[$month]
This is missing
days_in_month 12:
31
break
30
break
What shall there be missing? breaks? You noticed, that I defined
some artificial architecture on purpose. days_in_month 12:
On Feb 17, 12:15 pm, [EMAIL PROTECTED] (Douglas Wells) wrote:
For example:
import socket, sys
host = 'localhost' #sys.argv[1]
port = 3300
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.settimeout(1.0)
buf = ''
data = 'hello world'
num_sent = 0
while num_sent
Adam W. [EMAIL PROTECTED] writes:
I am using the xml.sax package, and I'm running into a little
problem. When I use the parse(url, ContentHandler()) method, I don't
know what parse() is naming the instance of ContentHandler.
I'm not sure what you're asking. Why do you need to know the
On Sun, 17 Feb 2008 11:36:25 -0800, MartinRinehart wrote:
Everything I've read about Tkinter says you create your window and
then call its mainloop() method. But that's not really true. This is
enough to launch a default window from the console:
from Tkinter import *
foo = Tk()
Depends on
On Feb 17, 6:12 pm, Diez B. Roggisch [EMAIL PROTECTED] wrote:
It's a bit hard to get what you are after, but maybe this solves your
problem?
handler = FeedHandler()
parse(handler)
print handler.my_instance_variable_of_choice
The above assumes that my_instance_variable_of_choice is
I am using PIL to make images that I need to display in a sequence.
The image needs to change when a an event happens from a serial port.
I call the following function to display the image, but then the
application is waiting for an event. I need to return to the main
code which is sending
I have created a group of scripts to manage an XML-based database. I'd
like to make it into a proper package that will let me keep track of
the code. I have a lot of files that are similar in name and they just
get crowded in one folder.
Here's a sample of the file structure:
IMS/
On Feb 14, 5:54 pm, W. Watson [EMAIL PROTECTED] wrote:
See Subject. It's a simple txt file, each line is a Python stmt,
but I need up to four digits added to each line with a space
between the number field and the text.
FWIW here is a Zeus editor, Python macro script to do this:
import
[EMAIL PROTECTED] wrote:
Do I use
Tk() or toplevel()? (Support for both and if a cogent explanation of
the differences exists, I didn't find it.)
If you close the window created by Tk(), the program terminates. If
you close a window created by Toplevel() only that window closes. The
Tk()
On Feb 17, 12:36 pm, [EMAIL PROTECTED] wrote:
Everything I've read about Tkinter says you create your window and
then call its mainloop() method. But that's not really true. This is
enough to launch a default window from the console:
from Tkinter import *
foo = Tk()
You shouldn't care what
Here is a file test.csv
number,name,description,value
1,wer,tape 2,5
1,vvv,hoohaa,2
I want to convert it to tab-separated without those silly quotes. Note
in the second line that a field is 'tape 2' , ie two inches: there is
a double quote in the string.
When I use csv module to read this:
Suppose I write some Win XP application using the Tkinter GUI, and do not
provide a mechanism to exit other than the user clicking on the X in the
upper right corner of a window. Is there a mechanism that will allow me to
put up an save-dialog to give the user the option to save his present
Here is a file test.csv
number,name,description,value
1,wer,tape 2,5
1,vvv,hoohaa,2
I want to convert it to tab-separated without those silly quotes. Note
in the second line that a field is 'tape 2' , ie two inches: there is
a double quote in the string.
The input format is ambiguous - how is
What shall there be missing? breaks? You noticed, that I defined
some artificial architecture on purpose. days_in_month 12:
tells it, that the next 12 blurps are tabular data, that can be
indexed. If the interpreter hits the line days_in_month 12:
it will unconditionally jump 12 instructions
On Feb 17, 8:09 pm, Christopher Barrington-Leigh
[EMAIL PROTECTED] wrote:
Here is a file test.csv
number,name,description,value
1,wer,tape 2,5
1,vvv,hoohaa,2
I want to convert it to tab-separated without those silly quotes. Note
in the second line that a field is 'tape 2' , ie two inches:
On Feb 17, 8:31 pm, W. Watson [EMAIL PROTECTED] wrote:
Suppose I write some Win XP application using the Tkinter GUI, and do not
provide a mechanism to exit other than the user clicking on the X in the
upper right corner of a window. Is there a mechanism that will allow me to
put up an
#!/usr/bin/env python
import os, pty, time
class pty_Popen:
def __init__ (self, command, *args):
self.pid, self.fd = pty.fork ()
if self.pid == 0:
os.execv (command, command, args)
else:
pass
def read (self, max_read):
return
I don't have Grayson's Tkinter book, but I see he uses something called Pmw.
Why is it needed with Tkinter?
--
Wayne Watson (Nevada City, CA)
Web Page: speckledwithStars.net
--
http://mail.python.org/mailman/listinfo/python-list
Good. Thanks.
Mike Driscoll wrote:
On Feb 17, 8:31 pm, W. Watson [EMAIL PROTECTED] wrote:
Suppose I write some Win XP application using the Tkinter GUI, and do not
provide a mechanism to exit other than the user clicking on the X in the
upper right corner of a window. Is there a mechanism
On Feb 17, 9:33 pm, W. Watson [EMAIL PROTECTED] wrote:
I don't have Grayson's Tkinter book, but I see he uses something called Pmw.
Why is it needed with Tkinter?
--
Wayne Watson (Nevada City, CA)
Web Page: speckledwithStars.net
It's not
On Feb 17, 7:09 pm, Christopher Barrington-Leigh
[EMAIL PROTECTED] wrote:
Here is a file test.csv
number,name,description,value
1,wer,tape 2,5
1,vvv,hoohaa,2
I want to convert it to tab-separated without those silly quotes. Note
in the second line that a field is 'tape 2' , ie two inches:
I wonder why he uses it? If I want to run his examples, where do I put the
lib he includes? Same folder as the example?
Mike Driscoll wrote:
On Feb 17, 9:33 pm, W. Watson [EMAIL PROTECTED] wrote:
I don't have Grayson's Tkinter book, but I see he uses something called Pmw.
Why is it needed
Thanks. I'm just getting started in Python, so probably don't want to go far
off the main stream. Don't see Misc. I see things like Presentations, Search
this site, ...
Mike Driscoll wrote:
On Feb 15, 2:28 pm, W. Watson [EMAIL PROTECTED] wrote:
I want to allow a user who is looking at a
On Feb 17, 9:11 pm, 7stud [EMAIL PROTECTED] wrote:
On Feb 17, 7:09 pm, Christopher Barrington-Leigh
[EMAIL PROTECTED] wrote:
Here is a file test.csv
number,name,description,value
1,wer,tape 2,5
1,vvv,hoohaa,2
I want to convert it to tab-separated without those silly quotes. Note
Wolfgang Draxinger wrote:
Somehow you seem to think, that a lookup table will require more
resources (memory I guess you thought) than a sequence of
comparisons. However you didn't take into account, that the
program code itself requires memory, too (for the operation
codes).
In Python,
7stud wrote:
On Feb 17, 9:11 pm, 7stud [EMAIL PROTECTED] wrote:
On Feb 17, 7:09 pm, Christopher Barrington-Leigh
[EMAIL PROTECTED] wrote:
Here is a file test.csv
number,name,description,value
1,wer,tape 2,5
1,vvv,hoohaa,2
I want to convert it to tab-separated without those silly quotes.
On Feb 17, 1:45 pm, Lie [EMAIL PROTECTED] wrote:
Any iteration with repeated divisions and additions can thus run the
denominators up. This sort of calculation is pretty common (examples:
compound interest, numerical integration).
Wrong. Addition and subtraction would only grow the
Paul Rubin wrote:
As I understand it, Python primarily uses reference counting, with a
mark and sweep scheme for cycle breaking tacked on as an afterthought.
It's not mark-and-sweep, it's a cycle detector. It goes through
all allocated objects of certain types, and all objects reachable
from
Christian Heimes wrote:
In release builds PyObject_HEAD only contains the ref count and a link
to the object type. In Py_DEBUG builds it also contains a double linked
list of all allocated objects to debug reference counting bugs.
There's also a doubly-linked list used by the cycle detector,
En Sun, 17 Feb 2008 16:25:44 -0200, Alex [EMAIL PROTECTED] escribi�:
Can I get reference to module object of current module (from which the
code is currently executed)? I know __import__('filename') should
probably do that, but the call contains redundant information (filename,
which needs to
Guilherme Polo added the comment:
Have you read
http://docs.python.org/lib/optparse-standard-option-actions.html ?
If yes, what is the problem with store_true/store_false ?
--
nosy: +gpolo
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2130
1 - 100 of 141 matches
Mail list logo