.
Do you mean that one of the imported modules wishes to use an instance
created in the main script? If that's the case, you're going to have
to pass the instance to the module somehow, since the module knows
nothing of what if anything has imported it.
--
Rhodri James *-* Wildebeest Her
doesn't grievously abuse at least one of the terms you are using. Could
you post some illustrative code snippets, please?
--
Rhodri James *-* Wildebeest Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
u want more than one statement
executed per step was to wrap sequences of statements in a
SEQ construct. You end up indenting a long way very fast if
you aren't careful.
I'm afraid much as I love PAR, Python's dynamicism makes it
rather more 'exciting' than it was in occam.
; > I searched and found many solutions like : os.execvp("./Launch.py",
> > ["./Launch.py","ProcessName"]), but nothing worked so far.
>
> This works for me:
>
> os.execvp("./Launch.py", ["ProcessName"]])
>
> -- HansM
Hello,
This worked for me:
os.execvp("./Launch.py", ["python", "ProcessName"])
Best regards,
James
--
http://mail.python.org/mailman/listinfo/python-list
Looks good I am going to plug twisted into this.
On Mon, Nov 21, 2011 at 9:49 PM, Bart Thate wrote:
> Hello world !! I released JSONBOT 0.80.3 .. the first in the 0.80 series ;]
>
> about
> ~
>
> JSONBOT is a chatbot that can take commands and react to events on the
> network it is connected
You may have some issues with disk reading as the drive heads move in
different ways
On Mon, Nov 21, 2011 at 8:15 AM, wrote:
> Hi All,
>
> ** **
>
> Just a question in general. Is it possible that we have opened one file
> in r+ mode ( file1.txt ).
>
> We have 2 threads,
>
> **·
t pointers
Hey Pedro,
You could also use pygments
to nicely format the logfile
perhaps even with Syntax Highlighting.
https://bitbucket.org/freecodeteam/hpaste/src/749c36d184a6/hpaste.circuits/paste.py
You could also provide an "Download" link
that services the file up as Content
- Phil [2013-02-17 17:47:15 +1000] - :
> Thank you for reading this.
>
> My adventures with Python have just begun and during the few weeks I
> have tried many IDEs. The following piece of code fails under all
> IDEs, and the interpreter, except under the Wing IDE.
>
> Why would this co
of course, OK when run as
python program.py
but that removes some of the benefit of the shebang line.
James
--
http://mail.python.org/mailman/listinfo/python-list
[- Sat 2.Mar'13 at 17:54:57 +1100 Chris Angelico :-]
> On Sat, Mar 2, 2013 at 5:09 PM, Devin Jeanpierre
> wrote:
> > On Fri, Mar 1, 2013 at 10:54 PM, Chris Angelico wrote:
> >>> No offence Chris, but you're the only person I know who *regularly*
> >>> replies to the wrong list
[- Tue 5.Mar'13 at 2:42:07 + Steven D'Aprano :-]
> On Mon, 04 Mar 2013 11:09:10 -0500, David Robinow wrote:
>
> > But here's what I don't understand. Why does somebody who posts as
> > much as Steven (and thanks for that. Getting cussed at occasionally is a
> > cheap pric
groups
news.groups.proposals
comp.lang.forth
comp.lang.python
comp.os.linux.misc
PROPONENT:
James Harris james.harris.1Agmail.com (replace A with @ - but please
discuss the proposal on Usenet!)
CHANGE HISTORY:
2013-03-09 Initial RFD
--
http://mail.python.org/mailman/listinfo/python-list
Dear All,
I need some assistance with Python so that values in the "Name" field e.g.
Murray - James - Leo can be labeled as:
Murray
James
Leo
with a new line replacing every dash.
Basically I need the equivalent of this VB in Python:
replace ( [Name] , "-", vbNewLine)
I tr
balls for tck/tk, sqlite or dl on
the Scientific Linux website, but maybe I am not looking in the right
place. Do you know how I can find which tarballs I need?
James
On Tue, Apr 16, 2013 at 12:55 PM, Terry Jan Reedy wrote:
> On 4/16/2013 10:30 AM, rosoloum wrote:
>
>> I
nals back you go further through precedence chain:
comparisons, then bitwise operators (*not* bitwise comparisons!), then
shifts, then arithmetic operators, the unary operators, the power
operator, and finally primaries.
--
Rhodri James *-* Wildebeest Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
7;t know what else to try. Any
thoughts?
Thanks,
James
On Tue, Apr 16, 2013 at 1:28 PM, James Jong wrote:
> Thank you Terry, I am working with:
> > cat /proc/version
> Linux version 2.6.18-274.el5xen (brewbuil...@norob.fnal.gov) (gcc version
> 4.1.2 20080704 (Red Hat 4.1.2-50))
I should
watch for?
James,
On Wed, Apr 17, 2013 at 9:59 PM, Chris Angelico wrote:
> On Thu, Apr 18, 2013 at 8:39 AM, James Jong
> wrote:
> > I managed to compile sqlite with:
> >
> > CPPFLAGS='-I/path_to_sqlite-3.7.16.2/include -I/path_to_tk8.6.0/include'
tkstub8.6.a
tkConfig.sh
libtk8.6.so
==
The file libtk8.6.so has 1.5M and is definitely there.
So why did that compilation fail?
James
On Thu, Apr 18, 2013 at 11:05 AM, Jason Swails wrote:
>
>
>
> On Thu, Apr 18, 2013 at
rough `LDFLAGS`
* /path_to/sqlite3/lib
* /path_to/tcl/lib
* /path_to/tk/lib
and the following lib paths through `LD_LIBRARY_PATH`:
* /path_to/sqlite/lib
* /path_to/tcl/lib
* /path_to/tk/lib
Thanks,
James
On Thu, Apr 18, 2013 at 12:24 PM, James Jong wrote:
> Thanks Jason. I have pinpoi
a similar system and copy it to the
supercomputer). But this thread shows that, at least, setup.py tries to
load libtk.so (a dynamic shared library).
Does Python then load dynamic libraries from sqlite, tcl, tk when using the
respective modules?
James
On Thu, Apr 18, 2013 at 3:10 PM, Terry Jan Re
I see, just to be clear, do you mean that Python 2.7.4 (stable) is
incompatible with Tk 8.6 (stable)?
James
On Fri, Apr 19, 2013 at 12:27 PM, Serhiy Storchaka wrote:
> 18.04.13 19:24, James Jong написав(ла):
>
>> The file libtk8.6.so <http://libtk8.6.so> has 1.5M and is d
this less tedious to write.
Odd that this subject should have come up so many times in various guises
in the last week or two.
--
Rhodri James *-* Wildebeest Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
probably your problem. Seems like you might have a bug. Is this cygwin?
If not try it.
James
--
http://mail.python.org/mailman/listinfo/python-list
worked on horrible code and beautiful code, and I
know what a difference these things make. However, you also cannot
program blindly by general rules. The toughest code I've ever had to
modify would probably have passed quite a few OO-style guides; the
author was really trying to adhere to
module for recursive deletion.
3. Use os.path to construct paths. Try to avoid, for example,
"c:\blah\blah" on dos, '/blah/blah' on unix, etc.
4. If you only have one argument, you don't need a tuple for string formatting.
5. "(dateYest)" is not a tuple anywa
livier.
>
Obligatory "ugh."
Are you sure you want to do that? Just make the part you want to execute into a
function and then import it as a module. You will thank me later.
To reluctantly answer your question: see os.system.
But don't see os.system. Use python like pyth
on, it is a "More powerful command line option parser".
http://docs.python.org/lib/module-optparse.html
James
--
http://mail.python.org/mailman/listinfo/python-list
ecify a bitmap or textual value to display in the widget; the image
option may be reset to an empty string to re-enable a bitmap or text display."
So try setting to an empty string instead of None.
For many Tkinter issues, you can try:
<http://www.astro.princeton.edu/~rhl/Tcl-Tk_docs/tk8
old all
of the data in memory as well?
* Are there any other shared memory models that would work for this
task?
OK, I think that is enough. I look forward eagerly to your replies!
Yours,
James Aguilar
--
http://mail.python.org/mailman/listinfo/python-list
ell, write back with your admonishments, they will be
wasted keystrokes. Sorry, I just want to read this list.
On the upside, I wouldn't be so vehement about any other list.
James
--
http://mail.python.org/mailman/listinfo/python-list
James Stroud wrote:
> I know this is despised, but I am actually testing this list with an
> email. If you knew the circles I've been running around trying to get
> UCLA to fix their news server for the c.l.python list, you would not
> blame me. The hours I've wasted on t
Grant Edwards wrote:
> On 2005-12-15, James Stroud <[EMAIL PROTECTED]> wrote:
>
>
>>I know this is despised, but I am actually testing this list with an
>>email. If you knew the circles I've been running around trying to get
>>UCLA to fix their news ser
ws if you are lucky.
You will need to bind the scrollbar separately if you want it to respond
to the mousewheel.
See also:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52266
(and the discussion that follows).
James
--
http://mail.python.org/mailman/listinfo/python-list
Alex Hunsley wrote:
> Can anyone recommend some code for creating drop-down menus in tkinter?
> To be absolutely clear, here's an example of a drop-down:
>
> http://www.google.co.uk/preferences?hl=en
> (see the language selection widget)
>
> I've found the odd bit of code here and there, such as:
t
be garbage collected, even though they are destroyed when the frame is
destroyed.
James
--
http://mail.python.org/mailman/listinfo/python-list
or message you are getting is an artefact of Tk. I have yet
to find any Tkinter-specific documentation on the Canvas.addtag method,
but the Tk documentation suggests the following is equivalent to the above:
canvas.addtag("some_tag", "withtag", pic)
James
--
http://mail.python.org/mailman/listinfo/python-list
on on the Canvas.addtag
method, but the Tk documentation suggests this has the same affect as above:
canvas.addtag("some_tag", "withtag", pic )
James
--
http://mail.python.org/mailman/listinfo/python-list
from the
hello world program of a new language to an interactive gui interface. I
think you can save yourself a lot of frustration and confusion by first
working throught the python tutorial:
http://docs.python.org/tut/tut.html
Then working throught the "Tkinter tutorial":
http://w
computing is in my future, one way or another, so I want to
make sure it's possible to use python to do that well and efficiently.
- James Aguilar
--
http://mail.python.org/mailman/listinfo/python-list
more Perl-like syntax. It doesn't quite have as much
of a diverse module selection as Python and Perl but that will change
with time. Open source gives us an unprecendented amount of choices,
try them all out.. I have, and I came up with Python because for me it
is the "best fit." That
I wonder how so many coders actually came to be
interested in the field -- one that pretty much thrives in part on its
neverending ability to vary, grow, and change -- if something so small
can warrant so much attention.
--
James Tanis
[EMAIL PROTECTED]
http://pycoder.org
--
http://mail.python.org/mailman/listinfo/python-list
f usr.password == password
or something less elaborate :P.
> --
> http://mail.python.org/mailman/listinfo/python-list
>
--
James Tanis
[EMAIL PROTECTED]
http://pycoder.org
--
http://mail.python.org/mailman/listinfo/python-list
, I've seen them offer more than the
average on the UK version, which puzzled me quite a lot.
James M
--
http://mail.python.org/mailman/listinfo/python-list
character. If I'm getting those mixed up, switch 'em around or
whatever. I find true tabs to be very annoying since different
editors/programs seem to translate them differently, just give me
spaces :P. Their are plenty of freeware and proprietary programs that
do both and everything in between
mplementations
with absolutely no documentation and plenty of one letter variable
names. I haven't checked the web site either, are you allowing third
party modules to be used? If so, that causes even more problems in the
comparison. How are you going to compare those who use a module vs
implement it themselves in pure python?
--
James Tanis
[EMAIL PROTECTED]
http://pycoder.org
--
http://mail.python.org/mailman/listinfo/python-list
o this.
>
Such as from the python docs..
import copy
x = copy.copy(y)# make a shallow copy of y
x = copy.deepcopy(y)# make a deep copy of y
> -carl
>
> --
>
> Carl J. Van Arsdall
> [EMAIL PROTECTED]
> Build and Release
> MontaVista Software
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
--
James Tanis
[EMAIL PROTECTED]
http://pycoder.org
--
http://mail.python.org/mailman/listinfo/python-list
ut
then I realized that this wouldn't work due to the fact that I will have
multiple forks doing the same thing at the same time. Thanks in advance :)
James
--
My blog: http://www.crazydrclaw.com/
My homepage: http://james.colannino.org/
"If Carpenters made houses the way programmers
t;[EMAIL PROTECTED]> wrote:
> Hi
> are there any future perspectives for Python to be as fast as java? i
> would like to use Python as a language for writing games.
>
> best regards
> krystian
> --
> http://mail.python.org/mailman/listinfo/python-list
>
--
James Tan
[EMAIL PROTECTED] wrote:
> Dicts and sets require immutable keys, like tuples or frozensets
Not really...
def freeze(anobj):
"""returns a new hashable object"""
import copy
try: hash(anobj)
except: pass
else: return copy.deepcopy(anobj)
class FrozenType(type):
def __new__(c
independent and seem to correspond to events pretty
well. For pasting, you will want to access the pasteboard(s) via
Event.widget.selection_get(selection='PRIMARY')
Event.widget.selection_get(selection='CLIPBOARD')
in that order, using try/except.
James
--
http://mail.python.org/mailman/listinfo/python-list
arted by cygwin & look to the
main cygwin window for output (what is special about this window?). Then
try sshing to your cygwin box and running. It locks up.
Thanks in advance,
James
--
http://mail.python.org/mailman/listinfo/python-list
braver wrote:
> I need a magical expanding hash with the following properties:
>
> * it creates all intermediate keys
>
> meh['foo']['bar] = 1
>
> -- works even if meh['foo'] didn't exist before
>
> * allows pushing new elements to leaves which are arrays
>
> meh['foo']['list] << elem1
> meh['
Peter Hansen wrote:
> James Stroud wrote:
>
>> I am helping someone write a python script to run their DOS
>> application through an SSH terminal. It seems that this program wants
>> to access a DOS shell and send output there. If running remotely, this
>> causes
on't try this on a populated meh!
return other
m = meh()
# mindreading way
m['carol'] += 4
m['carol'] += 5
m['bob'] << 44 # "You are thinking of '44'."
# better, not mindreading way
m['alice'] = [10]
m['a
braver wrote:
> Thanks, James! This is really helpful.
>
> : It would take a lot of coding to make that << work right. Better is
> the pythonic
> :
> : m[key] = [value]
> :
> : Its really only one more keystroke than
> :
> : m[key] << value
>
>
[EMAIL PROTECTED] wrote:
> I've noticed that there's a few functions that return what appears to
> be a tuple, but that also has attributes for each item in the tuple.
> For example, time.localtime() returns a time.time_struct, which looks
> like a tuple but also like a struct. That is, I can do:
Would anyone else find this syntax useful for generator expressions?
py> [x for x in '1234' if x%2 else 'even']
[1, 'even', 3, 'even']
I'm guessing this has been suggested before?
James
--
http://mail.python.org/mailman/listinfo/python-list
James Stroud wrote:
> Would anyone else find this syntax useful for generator expressions?
>
> py> [x for x in '1234' if x%2 else 'even']
> [1, 'even', 3, 'even']
>
> I'm guessing this has been suggested before?
>
> James
[EMAIL PROTECTED] wrote:
> I'm playing with a sudoku GUI...just to learn more about python.
>
> I've made 81 'cells'...actually small canvases
>
> Part of my scheme to write the cells (all 81 of them in the gui) to a file
> (using the the SAVE callback/button), then
> restore the gui cells from
[EMAIL PROTECTED] wrote:
> On Sat, 21 Jan 2006 14:23:49 -0800, James Stroud <[EMAIL PROTECTED]> wrote:
>
>
>>[EMAIL PROTECTED] wrote:
>>
>>>I'm playing with a sudoku GUI...just to learn more about python.
>>>
>>>I've made 81 'c
...how can i run
> that?
>
>
> thanks!
>
Here is a start. Put the following in your cgi-bin folder or equivalent.
Name it test.cgi
#!/usr/bin/python
print "Content-Type: text/plain\n\n"
print "Hello, World!\n"
Now just browse it. E.g.:
http://www.
Jack wrote:
> ...snip...
> If Python is not the best candidate for embedded systems because
> of the size, what (scripting) language would you recommend?
>
TCL is fairly popular in the embedded space. Fairly small footprint.
The syntax is not to everyone's taste.
--
http://mail.python.org/mailma
ch easier.
--
James Oakley
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
would it be best
> for me to do this with a
> multi-diminsional array? For example: sort the file, read a rec into
> the array, if the next rec is the same then incr the count, otherwise
> add a new rec with a count of 1. Then write the array to a file?
>
Ah, a real question. Use a
John Machin wrote:
> James Stroud wrote:
>
>>walterbyrd wrote:
>>
>>>This is the first real python program I have ever worked on. What I
>>>want to do is:
>>>1) count identical records in a cvs file
>>>2) create a new file with quantities i
What exceptions (if any) can the python builtin compile() function
throw besides SyntaxError?
--
http://mail.python.org/mailman/listinfo/python-list
Thank you,
James
Martin v. Löwis wrote:
> James Thiele wrote:
> > What exceptions (if any) can the python builtin compile() function
> > throw besides SyntaxError?
>
> - TypeError, if the parameters are wrong/too many/too few
> - Any errors that a codec may raise,
Currently -u specifies that stdin, stdout and stderr are all
unbuffered. I propose a that -U make all files unbuffered. It could be
useful for programs that log to files.
Comments solicited.
--
http://mail.python.org/mailman/listinfo/python-list
-boot of Linux or maybe a VMWare install to
> program under Python?
>
I recommend a triple boot mac.
James
--
James Stroud
UCLA-DOE Institute for Genomics and Proteomics
Box 951570
Los Angeles, CA 90095
http://www.jamesstroud.com/
--
http://mail.python.org/mailman/listinfo/python-list
r')
than
"\\".join(['my', 'favorite', 'dir'])
because the latter will bonk on linux. The former is platform
independent. This hits at the same issue as using os.sep:
os.sep.join(['my', 'favorite', 'dir'])
But os.pat
Dave Opstad wrote:
> In article <[EMAIL PROTECTED]>,
> James Stroud <[EMAIL PROTECTED]> wrote:
>>I am trying to create a semi-standalone with the vendor python on OS X
>>10.4 (python 2.3.5). I tried to include some packages with both
>>--packages from the
t.
>
> What is particularly disappointing is the absence of a Windows IDE
I'm a complete windows novice (as in I've forced myself to forget my
experiences with it), but does windows not run vim?
--
James Stroud
UCLA-DOE Institute for Genomics and Proteomics
Box 951570
oc/python.html
James
--
James Stroud
UCLA-DOE Institute for Genomics and Proteomics
Box 951570
Los Angeles, CA 90095
http://www.jamesstroud.com/
--
http://mail.python.org/mailman/listinfo/python-list
= [get_pct(prompt) for prompt in prompts]
sum_pcts = sum(pcts)
if (sum_pcts > 100.0001) or (sum_pcts < 99.999):
raise ValueError, "Values didn't add to 100."
return pcts
def get_pct(pct_type):
pct = raw_input('Input percent of %s:' % pct_type)
retur
James Stroud wrote:
> sam wrote:
>
>> hi all,
>>
>> i'm starting to put together a program to simulate the performance of
>> an investment portfolio in a monte carlo manner doing x thousand
>> iterations and extracting data from the results.
>>
>
r:
print "You messed up, try again."
Now, all testing is done at the point where it is needed. There are no
running totals that could cause accounting errors, your final data
structure is an easy to use dict, unecessary tests have been eliminated,
loops have been de-nested visually and logically, and, most importantly,
the indentation level is kept manageable.
I think you will be able to see how this latter code evolved from yours.
I used to program just like you and it has taken me a few years to
develop these little rules for tightening my code.
James
--
James Stroud
UCLA-DOE Institute for Genomics and Proteomics
Box 951570
Los Angeles, CA 90095
http://www.jamesstroud.com/
--
http://mail.python.org/mailman/listinfo/python-list
James Stroud wrote:
> sam wrote:
>
>> this does what i want, though i don't like the inner while loop having
>> to be there
[snip]
> A little cleaner. Now, lets tighten it up a bit more, and put nested
> loops into functions. Im getting rid of keeping track of th
Steve Holden wrote:
> Giovanni Bajo wrote:
> [...]
>>
>> I understand your concerns, but I have to remember you that most bug
>> reports
>> submitted by users go totally ignored for several years, or, better,
>> forever. I
>> do not have a correct statistic for this, but I'm confident that at
>>
>
> --
> Claus Tondering
>
Maybe think about using the Toplevel.withdraw() method. This way you
don't have to re-instantiate your window every time. This is the
technique used by the PMW library. Use deiconify() to get it back.
James
--
James Stroud
UCLA-DOE Institute for Genomics and Proteomics
Box 951570
Los Angeles, CA 90095
http://www.jamesstroud.com/
--
http://mail.python.org/mailman/listinfo/python-list
would then like to set the camera and have the scene depicted as a
line drawing (not ray-traced solid body, etc).
Does anyone know of a library to do this?
James
James Stroud
UCLA-DOE Institute for Genomics and Proteomics
Box 951570
Los Angeles, CA 90095
http://www.jamesstroud.com/
--
James Stroud wrote:
> Hello All,
>
> I'm looking for a program to do line-drawings in 3d, with output to
> postscript or svg or pdf, etc. I would like to describe a scene with
> certain 1-3d elements oriented in 3d space with dashed or colored lines
> and filled or t
in xrange(50) if not i%13]
for i,item in alist:
if i in special:
do_something_special_with(item)
else:
do_other_stuff_with(item)
James
James
--
http://mail.python.org/mailman/listinfo/python-list
James Stroud wrote:
> Steven D'Aprano wrote:
>> If I want to iterate over part of the list, the normal Python idiom is to
>> do something like this:
>>
>> alist = range(50)
>> # first item is special
>> x = alist[0]
>> # iterate over the rest of
find files with the .pyc extension and delete those before every commit,
or is there a more elegant way? It seems like a lot of wasted bandwidth
an memory on the server side to constantly be dealing with these files
that contain no real information.
James
--
http://mail.python.org/mailman/lis
Everyone wrote:
[something helpful]
Thank you to everyone for your responses.
James
--
http://mail.python.org/mailman/listinfo/python-list
--
By all means, please start here:
http://www.python.org/doc/essays/styleguide.html
James
--
http://mail.python.org/mailman/listinfo/python-list
e extra info here.'
py>
py> options, args = parser.parse_args()
py>
py> parser.print_help()
Usage: dosomething [options] path
Options:
-h, --help show this help message and exit
-a, --all don't skip hidden or binary files
Some extra info here.
James
--
James Stroud
UCLA-DOE Institute for Genomics and Proteomics
Box 951570
Los Angeles, CA 90095
http://www.jamesstroud.com/
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> Hi all --
>
> Compared to the Python I know and love, Ruby isn't quite the same.
> However, it has at least one terrific feature: "blocks". Whereas in
> Python a
> "block" is just several lines of locally-scoped-together code, in Ruby
> a
> "block" defines a closure (an
b.bob0
128
py> b.bob1
128
py> b.bob1 = 258
py> b.bob1
2
py> b.bob3
128
py> dir(b)
['__class__',
'__delattr__',
'__dict__',
'__doc__',
'__getattribute__',
'__hash__',
'__init__',
'__module__'
.
That they wouldn't be seems an implementation bug and perhaps that bug
should be fixed rather than promoting the avoidance of (2) because it
does not create classes that behave as number (1).
James
--
James Stroud
UCLA-DOE Institute for Genomics and Proteomics
Box 951570
Los Angeles, CA
ide symmetry for reversing any sequence (without requiring
an iterator).
(1,2,3).reversed()
"123".reversed()
[1,2,3].reversed()
--
James Stroud
UCLA-DOE Institute for Genomics and Proteomics
Box 951570
Los Angeles, CA 90095
http://www.jamesstroud.com/
--
http://mail.python.org/mailman/listinfo/python-list
Paul Boddie wrote:
> James Stroud wrote:
>>(1,2,3).reversed()
>>
>>"123".reversed()
>>
>>[1,2,3].reversed()
>
> I guess Python 2.5 has the reversed method of which you speak.
Not that I could find (as methods of any built in sequence type). 2.5
Fredrik Lundh wrote:
> James Stroud wrote:
>
> > without requiring an iterator
>
> can we perhaps invent some more arbitrary constraints while we're at it?
>
>
>
Why does it seem to me that you are confusing convienience with
constraint, or are the two equi
Fredrik Lundh wrote:
> James Stroud wrote:
>
> > without requiring an iterator
>
> can we perhaps invent some more arbitrary constraints while we're at it?
>
>
>
I guess while I'm at it, this thread wouldn't have so much steam were
these idioms see
t; paradigm to go with the new language I'm trying to learn? I had hoped to
> reduce my learning curve, but I'm very concerned that I simply can't do
> what I want to do with Tkinter. What do other Tkinter developers think?
Its used in pymol. Also, look at my modest program a
Neil Cerutti wrote:
> On 2006-10-19, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
>
>>James Stroud wrote:
>>
>>
>>>without requiring an iterator
>>
>>can we perhaps invent some more arbitrary constraints while
>>we're at it?
>
>
s is just a cheap attempt at
> getting free survey data.
>
> - alex23
>
They would get more data if they lowered their expectations for the
programmer position.
James
--
James Stroud
UCLA-DOE Institute for Genomics and Proteomics
Box 951570
Los Angeles, CA 90095
http://www.jamesstroud.com/
--
http://mail.python.org/mailman/listinfo/python-list
te_number = (random.randint(1, total_quotes[0]),)
# Select a quote where the ID matches that number
q = "SELECT Author, Quote FROM PythonQuoteQuery WHERE ID=?"
c.execute (q, quote_number)
quote = c.fetchone()
# NOTE THE RETURN VALUE:
return quote
def print_quote(quote): # <== NOTE THE PARAMETER
print quote # <== WHATEVER YOU WANT TO DO
if __name__ == '__main__':
if len(sys.argv) == 1:
c = connect()# <== NO COLLISION: NAMESPACES
quote = random_quote(c) # <== DITTO
print_quote(quote) # THERE YOU HAVE IT
James
--
http://mail.python.org/mailman/listinfo/python-list
Fulvio wrote:
> ***
> Your mail has been scanned by InterScan MSS.
> ***
>
>
> On Friday 20 October 2006 14:34, James Stroud wrote:
>> You really don't need classes for this
>
> I'm in that matter too. Does
oneously (for me) gets:
> {'a': 0, 'c': 2, 'd': 3}
>
> Thanks for your help.
>
I think you have the right idea if I understand what you want:
c = dict(((k,v) for (v,k) in enumerate(x for x in a if b.has_key(x
--
James Stroud
UCLA-DOE Institute for Genomics and Proteomics
Box 951570
Los Angeles, CA 90095
http://www.jamesstroud.com/
--
http://mail.python.org/mailman/listinfo/python-list
1001 - 1100 of 3434 matches
Mail list logo