I have a situation in which the same code gives an error in idle but works
in qtconsole
regards,
*in idle*
v = np.zeros(len(x))
for i in range(len(x)):
if x[i] < 1.0:
v[i] = 0
else:
v[i] = V
print v
RESTART: C:\Users\SHARMA\Documents\Python Scripts\sqwell.py
==
Hello friends.
thise is my code
i want to compare to image, and i need to get result percentage formate dis
is very urgent. any one tell me how can i compare
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://ma
please any one give me the code for
username (entryfld)-
pwrd (entryfld)
login(button),changepwrd(button)
virtualkeyboard-user has to be use dis keyboard
once click on login button regester page open
register page content 1.emply name(entryfld)
2.emply id(
Yes we can vectorize.
regards,
Sarma.
On Fri, Oct 13, 2017 at 9:43 PM, Peter Otten <__pete...@web.de> wrote:
> D.V.N.Sarma డి.వి.ఎన్.శర్మ wrote:
> > f = np.zeros(40)
> > v = np.arange(0,4,0.1)
> > for i in np.arange(0, 40):
> > f[i] = v[i]**2*(np.exp(-v[i]**2))
>
> Note that you can write th
Except for some constants the essential behaviour of Maxweell-Boltzmann
distribution is determined by
v**2 * exp(-v**2)
The following code will gove you
a plot of the shape of the curve.
from matplotlib import pyplot as plt
import numpy as np
f = np.zeros(40)
v = np.arange(0,4,0.1)
for i in np.ara
First fill the first row and first column of the matrix with seperate loops.
Then the rest of the elements of the matrix can be filled with nested loops.
regards,
Sarma.
On Tue, Sep 19, 2017 at 1:18 PM, Clara Chua wrote:
> Hi Python tutor, I require help for a script that asks user for number of
In python we have a set of imread and imshow in skimage. In matplotlib.image
we again have imreadand imshow functions. In scipy.misc we again have
another set imread and imshow. Are there anyfunctional differences between
these multiple sets to justify their presence? …
regards,
Sarma.
___
This is an aliasing problem. Change the code to
super = []
sub = [""]*3
other = ["a","b","c","d"]
sub[0] = "hi"
sub[1] = "hello"
for item in other:
l = sub[:]
l[2] = item
super.append(l)
for item in super:
print item
regards,
Sarma.
On Tue, Apr 18, 2017 at 2:16 AM, Mats Wichmann
Change your code to
def front_x(words):
# +++your code here+++
ls=[]
ls1=[]
for str in words:
if str[0]=='x':
ls.append(str)
else:
ls1.append(str);
print ls
print ls1
ls = sorted(ls)
ls1 = sorted(ls1)
ls.extend(ls1)
return ls
regards,
Sarma.
O
A lot of confusion is caused by the print function converting an integer or
float
to a string before printing to console. thus both '1234 and '1234' are
shown as
1234 on the console. Similarly '15.4' and 15.4 are displayed as 15.4. There
is no way
to tell which is a string, which is an int and whic
Small correction.
file_path = "C:/Users/Rafael/PythonCode/PiDigits.txt"
with open(file_path) as a:
b = a.read()
get_year = input("What year were you born? ")
count = 0
b= '3'+b[2:]
n = len(b)
for i in range(n-3):
if b[i:i+4] == get_year:
count += 1
I will go for this modification of the original code.
file_path = "C:/Users/Rafael/PythonCode/PiDigits.txt"
with open(file_path) as a:
b = a.read()
get_year = input("What year were you born? ")
count = 0
b= '3'+b[2:]
n = len(b)
for i in range(n-4):
if b[i:i
Sorry. That was stupid of me. The loop does nothing.
regards,
Sarma.
On Mon, Apr 3, 2017 at 8:44 PM, Alan Gauld via Tutor
wrote:
> On 03/04/17 16:07, D.V.N.Sarma డి.వి.ఎన్.శర్మ wrote:
> > Modifying the code as shown below may work.
>
> I doubt it.
>
> > with open(file_path) as a:
> > b
Modifying the code as shown below may work.
file_path = "C:/Users/Rafael/PythonCode/PiDigits.txt"
with open(file_path) as a:
b = a.read()
get_year = input("What year were you born? ")
count = 0
for year in b:
if get_year in b:
count += 1
print("Your birth date occurs %s times in
Much simpler is
4*4*4*4*4*4*4*4*4
regards,
Sarma.
On Sat, Mar 4, 2017 at 2:20 PM, Peter Otten <__pete...@web.de> wrote:
> Tasha Burman wrote:
>
> > Hello python tutors,
> > I am having difficulty with a power function; what is another way I can
> do
> > 4**9 without using **? Thanks,
>
> Hello
Then Isaac's function does that(but you have to leave a space after
last number in the string).
def foo(x):
a, b = 0, ""
for i in x:
if i != " ":
b += i
else:
print ("this is b", b)
a += int(b)
print ("this is a",a)
Sorry, I did not read the conditions that split and for should not be used.
regards,
Sarma.
On Wed, Oct 12, 2016 at 10:20 PM, D.V.N.Sarma డి.వి.ఎన్.శర్మ
wrote:
> def string_sum(s):
> total = 0
> items = s.split(" ")
> for item in items:
>total += int(item)
> p
def string_sum(s):
total = 0
items = s.split(" ")
for item in items:
total += int(item)
print(total)
You can call the function as
string_sum("10 4 5 ")
Output will be 19.
regards,
Sarma.
On Wed, Oct 12, 2016 at 3:22 PM, hell gates wrote:
>You can write y
An easier solution is simply to type 'print' in place of 'test' in the
program. It will work.
regards,
Sarma.
On Mon, Oct 10, 2016 at 2:09 AM, wrote:
> Everytime I run this it says test is not defined . I don’t understand. Can
> someone please help correct?
>
> #Question 10
>
> def reverse(mys
Can somebody tell me why my IDLE hangs when asked setrecursionlimit.
>>> x=GetSet(40)
>>> x.var
40
>>> x.__dict__
{'var': 40}
>>> del x.var
>>> x.__dict__
{}
>>> import sys
>>> sys.setrecursionlimit(7)
regards,
Sarma.
___
Tutor maillist - Tutor@pyth
The following code should do.
for a in range(1,10):
for b in range(1,5):
for c in range(1,5):
for mc in range(50, 55):
if mc ==(6*a)+(9*b)+(20*c):
print "mc= ",mc,"a= ",a,"b= ",b,"c=",c
regards,
Sarma.
On Mon, Aug 29, 2016 at 3:34 PM, A
Hello:
I need some help with python installation, please.
I have downloaded python 3.5.2, and installed it without issues on windows
7.
Now I cannot get Third-party modules to install. I want to use openpyxl.
I get the following errors:
ay 2, 2016 5:27 PM, "Jason N. via Tutor" wrote:
>
> Hello,
> Wanted to ask if its possible to have a dictionary that can be looked up by
> either values?
> For example,
> mydic = {"A: "Apple", "B": "Banana"}When user inputs "A
Hello,
Wanted to ask if its possible to have a dictionary that can be looked up by
either values?
For example,
mydic = {"A: "Apple", "B": "Banana"}When user inputs "A" I want "Apple" to
come. But if the user enter "Apple" I want "A" to respond.
Please let me know the best way to handle this type
Hello,
I figured out the issue. It was a silly mistake - i was not running the correct
code; instead was running code from another program which was active on a
second tab. Thank you.
On Sunday, May 1, 2016 4:15 PM, Jason N. via Tutor wrote:
Thank you all for your responses.
I am
://unsee.cc/sonezima/ Thank you.
On Saturday, April 30, 2016 11:12 PM, Steven D'Aprano
wrote:
On Sat, Apr 30, 2016 at 06:51:17PM +, Jason N. via Tutor wrote:
> Hello,
> I found this simple script online but when I execute it I get the
> following error: "TypeError: &
Hello,
I found this simple script online but when I execute it I get the following
error: "TypeError: 'list' object is not callable"
Here is the code sample:import subprocess
ls_output= subprocess.check_output(['dir'])
I searched online and found a another similar code sample
(http://www.opentec
This is working fine. What is the problem?
def manipulate_data(kind, data):
if kind == 'list':
return list(data)[::-1]
elif kind == 'set':
#data=set({"a", "b", "c", "d", "e", "ANDELA", "TIA", "AFRICA"})
return set(data)
elif kind == 'dictionary':
return
-- Forwarded message --
From: D.V.N.Sarma డి.వి.ఎన్.శర్మ
Date: Wed, Mar 16, 2016 at 3:39 PM
Subject: Re: [Tutor] Citing Python
To: Steven D'Aprano
"Python 2.7.11 |Anaconda 2.5.0 (64-bit)| (default, Jan 29 2016,
14:26:21) [MSC v.1500 64 bit (AMD64)] on win32
Type "copyright", "cr
change the line
if answera == ["Oslo" or "oslo"]:
to
if answera == "Oslo" or answera == "oslo":
and see if it works.
regards,
Sarma.
On Thu, Aug 28, 2014 at 12:27 AM, Alan Gauld
wrote:
> On 27/08/14 14:40, Jake wrote:
>
>> To whom it may concern,
>> My name is Jake and I have recently sta
I tested it on IDLE. It works.
regards,
Sarma.
On Thu, Aug 14, 2014 at 7:37 PM, Chris “Kwpolska” Warrick <
kwpol...@gmail.com> wrote:
>
> On 14 Aug 2014 15:58 "Sunil Tech" wrote:
> >
> > Hi,
> >
> > I have string like
> > stmt = 'Patient name: Upadhyay Shyam style="font-family: times new roman
Hi,
While compiling python2.5.6 by passing 64 bit arguments on aix5.3, make is
failing .
Command used to build:
./configure --with-gcc="xlc_r -q64" --with-cxx="xlC_r -q64" --disable-ipv6
AR="ar -X64" --prefix=/usr/prasad/python --disable-shared
--with-libs='/usr/prasad/ncurses/lib/libncurses.
I have been searching for mergesort implimentations in python and came
across
this.
def merge(a, b):
if len(a)*len(b) == 0:
return a+b
v = (a[0] < b[0] and a or b).pop(0)
return [v] + merge(a, b)
def mergesort(lst):
if len(lst) < 2:
return lst
m = len(lst)/2
return merge(mergesort(lst[:m]), mer
Remove also 'continue' statement under the 'if denary2 not in
range(0,256)' clause.
On Sun, Feb 10, 2013 at 7:06 AM, D.V.N.Sarma డి.వి.ఎన్.శర్మ <
dvnsa...@gmail.com> wrote:
> I have altered the program to run on Python 2.7.3
> Perhaps it will run on Python 3 with small/or no alterations.
>
> def
I have altered the program to run on Python 2.7.3
Perhaps it will run on Python 3 with small/or no alterations.
def show_menu():
print("===")
print("1-binary to denary")
print("2-denary to binary")
print("3-exit")
print("===")
while True:
show_men
Hi All,
First of the big thanks and congrats for managing such a brilliant online
community. I am new to Python and have started getting the taste of python
on my day to day work.
I have a requirement and i am trying to solve it using python.
I am from QA. Here is what i do daily and wanted to d
winsound.Beep() takes only integral values for frequency.
Therefore you cannot use it if you want either just intonation or
equal temperment scales exactly.
--
regards,
Sarma.
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription
quot;"create a polyphonic waveform
>
> freqs: sequence of frequencies (Hz)
> amps: sequence of amplitudes
> f0: fundamental frequency (Hz)
> fs: samples/second
>
> output is normalized to the range [-1,1].
> ""&
Error: "name data undefined"
On Fri, Sep 14, 2012 at 12:33 AM, eryksun wrote:
> On Thu, Sep 13, 2012 at 11:48 AM, D.V.N.Sarma డి.వి.ఎన్.శర్మ
> wrote:
> >
> > As far as programming volume is concerned winsound.Beep has only
> frequency
> > and duration. pyaudio module appears to have provision
As far as programming volume is concerned winsound.Beep has only frequency
and duration.
pyaudio module appears to have provision for volume control. Please refer
to eryksun's post.
--
regards,
Sarma.
On Thu, Sep 13, 2012 at 8:42 PM, Mark Lawrence wrote:
> On 13/09/2012 13:29, D.V.N.Sarma డి.వి
I want to thank all of you who have come forward to help me.
--
regards,
Sarma.
On Thu, Sep 13, 2012 at 10:46 AM, D.V.N.Sarma డి.వి.ఎన్.శర్మ <
dvnsa...@gmail.com> wrote:
> Yes. As far as I can see it does not contain any thing which
> concerns the volume of sound.
>
>
> --
> regards,
> Sarma.
Yes. As far as I can see it does not contain any thing which
concerns the volume of sound.
--
regards,
Sarma.
On Thu, Sep 13, 2012 at 5:42 AM, Mark Lawrence wrote:
> On 13/09/2012 00:57, D.V.N.Sarma డి.వి.ఎన్.శర్మ wrote:
>
>> The Beep attribute of winsound module is useful. But the volume is f
One can ofcourse increase the volume by adjusting master volume.
But one needs ability to program volume level in order to produce
sounds of different volume levels in a piece of music.
--
regards,
Sarma.
On Thu, Sep 13, 2012 at 5:27 AM, D.V.N.Sarma డి.వి.ఎన్.శర్మ <
dvnsa...@gmail.com> wrote:
>
The Beep attribute of winsound module is useful. But the volume is feeble.
Is there anyway to control the loudness.
--
regards,
Sarma.
On Thu, Sep 13, 2012 at 4:45 AM, Alan Gauld wrote:
> On 12/09/12 14:53, D.V.N.Sarma డి.వి.ఎన్.శర్మ wrote:
>
>> My OS is Windows XP. I have Python 2.7.3(32 bit).
My OS is Windows XP. I have Python 2.7.3(32 bit). My question is
are there any commands in Python which directly allow me to produce a pure
note
of a given frequency, given volume and given duration. Further can we access
the different sound channels(sound card) available through Python.
--
regar
How to produce a musical note of given frequency,volume and duration in
Python.
--
regards,
Sarma.
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
On Fri, Jun 19, 2009 at 12:56 AM, bob gailer wrote:
>
> Luis N wrote:
>>
>> I get an error "TypeError: 'rounding' is an invalid keyword argument
>> for this function" on my list subclass.
>>
>> How might I subclass list without this er
I get an error "TypeError: 'rounding' is an invalid keyword argument
for this function" on my list subclass.
How might I subclass list without this error?
This is the code:
class SeriesList(list):
def __new__(cls, *args, **kwargs):
series_list = list.__new__(cls, *args)
serie
On Dec 16, 2007 10:17 PM, jon vs. python <[EMAIL PROTECTED]> wrote:
> Hi everyone,
> I have a file with this content:
>
> "1
> 1
> 1
> 1
> 1
> 1
> 1
> 2
> 1
> 1"
>
> I wanted a little script that would print the line containing "2" and every
> line containing "1" after it. I've tried this:
>
> >>>
On Dec 14, 2007 12:08 PM, Kent Johnson <[EMAIL PROTECTED]> wrote:
> Luis N wrote:
> > Is there a way to introspect a function or class' required arguments,
> > particularly keyword arguments?
>
> See inspect.getargspec() and formatargspec().
> Look at the sour
Is there a way to introspect a function or class' required arguments,
particularly keyword arguments?
I can easily use a dictionary since it is my own function that I wish
to introspect. I haven't tested the below code yet, but e.g.
obj = getattr(self, 'obj')()
preprocessors = {'Card':[{'obj_attr
On Dec 13, 2007 3:38 PM, earlylight publishing
<[EMAIL PROTECTED]> wrote:
> Do people really write whole applications just using the shell?
>
The shell isn't intended for writing whole applications. However, it's
invaluable for testing. For writing whole applications I'd recommend
The One True Edit
I can't recall what your initial project was. I think it was a text
adventure. I imagine that you have bigger ideas regarding timers then
your current code suggests. Maybe you should investigate a time aware
long-running process. Twisted Python is such a beast.
While I can't recommend it's use as
I have installed pida succesfully using the command
python setup.py install
Installation was successful i.e. no errors but when i launch pida, it says
some module is missing. wat could be the problem??? i am posting the result
of installation and of launching the program.
maggi:~/Desktop/PIDA-0.5
On Dec 6, 2007 2:31 AM, Mahesh N <[EMAIL PROTECTED]> wrote:
> I dun understand the mistake. My aim is to accept an integer number. The
> python lookup in IDLE asks for a string object but the interpreter returns
> with the following error message. Some one pls explain.
> Th
On Dec 6, 2007 2:37 AM, Eric Brunson <[EMAIL PROTECTED]> wrote:
> Mahesh N wrote:
> > I dun understand the mistake. My aim is to accept an integer number.
> > The python lookup in IDLE asks for a string object but the interpreter
> > returns with the following error me
(). But how does input() function work?
>>> prompt="temme a number\n"
>>> speed =input(prompt)
Traceback (most recent call last):
File "", line 1, in
speed =input(prompt)
TypeError: 'str' object is not callable
>>> speed =input("
I'd like the below to be a single line if possible.
hours = metrics.totaltime/360
minutes = (metrics.totaltime - 360*hours)/6
seconds = (metrics.totaltime - 360*hours - 6*minutes)/1000
Would it be possible to simplify this with a generator expression e.g.
total_time = tuple((
> I was playing with some simple HTTP CGI server code
> and discovered what I think may be a bug in
> CGIHTTPServer.CGIHTTPRequestHandler. A "GET" request
> without a leading '/' from a telnet session displays
> the CGI script rather than the script's output. If >
the
> request includes the leading
(myip, 8000), CGIHTTPRequestHandler)
serv.serve_forever()
print 'Content-type: text/html\n'
print 'Hello'
print 'Hello'
Telnet without a leading '/' in the request displays
the script:
telnet localhost 8000
GET cgi-bin/hello.py
print 'Content-type: te
hi,
i am sort of newbie to python. I am trying to do a super Market
simulation with OOP in python. I have problems with using a class
instance as global...
def generate (... ,,...)
" in this function i define the global variables "
global stock,stockManager, manager etc.
class Manager
...
.
hi,
i am sort of newbie to python. I am trying to do a super Market
simulation with OOP in python. I have problems with using a class
instance as global...
def generate (... ,,...)
" in this function i define the global variables "
global stock,stockManager, manager etc.
class Manager
...
.
Hi, You can try this: import httplib, urllib params = urllib.urlencode({'ID':'1','Name':'name', 'Eid':'we[at]you.com'}) #Assumed URL: test.com/cgi-bin/myform h = httplib.HTTP("test.com")h.putrequest("POST", "/cgi-bin/myform")h.putheader("Content-length", "%d" % len(params))h.putheader('A
You might want to search for how it fits together with twisted's reactor
http://www.google.com/search?q=twisted+glade+reactor
Luis.
On 10/15/05, Adam <[EMAIL PROTECTED]> wrote:
> I'm making a Twisted app that needs a client side GUI and GTK seems like the
> best way to go about this. Can anybody
> Luis,
>
> I was actually asking how usable Boa-Constructor is right now for project
> purposes, since I had "heard" it was kind of unstable and crashes a lot. Is
> that your experience with Boa-Constructor? Or was the information I found
> misleading?
>
> Thanks,
> Terry
I found Boa-co
On 9/11/05, Damien Gouteux <[EMAIL PROTECTED]> wrote:
> Hi all.
> I try to run Venom, a Python binding for the Irrlicht engine. But I need
> python23.dll.
Download a game from pygame.org
Luis.
___
Tutor maillist - Tutor@python.org
http://mail.python
On 9/12/05, Terry Kemmerer <[EMAIL PROTECTED]> wrote:
> Hey Guys,
>
> I am trying to pick an IDE, and it seems to me that Boa-Constructor has
> great potential.
Did you check Boa out of CVS? It tends not to have an intermittent
schedule of releases.
Luis
On 9/1/05, Luis N <[EMAIL PROTECTED]> wrote:
> Hi,
>
> After fighting with installing pysqlite2
Apologizes, I started over. It went much better the second time.
bash-2.05
Hi,
After fighting with installing pysqlite2, (although you require the
.tar.gz for a *Nix build, the header file required, sqlite3.h, was
actually in the source .zip supplied for windows users sans a unix
build environment)
Anyway, I have pysqlite2, but:
Python 2.3.4 (#1, Aug 23 2004, 13:59:34)
On 8/24/05, Daniel Watkins <[EMAIL PROTECTED]> wrote:
> I'm currently trying to write a script that will get all the files
> necessary for a webpage to display correctly, followed by all the
> intra-site pages and such forth, in order to try and retrieve one of the
> many sites I have got jumbled u
On 8/23/05, Scott Oertel <[EMAIL PROTECTED]> wrote:
> I have extracted a list of names, i.e.
>
> "Joe Smith"
> "Joe Smith"
> "Jack Smith"
> "Sam Love"
> "Joe Smith"
>
> I need to be able to count the occurances of these names and I really
> don't have any idea where to begin.
>
> Any ideas? exc
On 8/23/05, Shitiz Bansal <[EMAIL PROTECTED]> wrote:
> Hi,
> Suppose i have a string '347 liverpool street'.
> I want to remove all the numbers coming at the starting of the string.
> I can think of a few ways but whats the cleanest way to do it?
>
> Shitiz
>
I believe this question to be
On 8/15/05, ZIYAD A. M. AL-BATLY <[EMAIL PROTECTED]> wrote:
> On Mon, 2005-08-15 at 11:52 -0400, Michael Murphy wrote:
> > Hi all
> >
> > I'm having problems with installing LiveWire for python for Linux
> > (Linspire 5.0 to be exact) and I'm having trouble compiling setup.py.
> > Heres the results
On 8/15/05, Simon Gerber <[EMAIL PROTECTED]> wrote:
> You could probably do something like this... (Note: This example is
> for Linux - but you can adapt it fairly easily to Windows.)
>
>
> # E.g. Find every .inf file on a CD-ROM.
> path = '/cdrom'
> # 'E:\\' or whatever for Windows
> inf_lis
On 8/11/05, Jorge Louis De Castro <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I'm interested in writing with my own Python implementation of a Jabber IM
> server and client.
> Anyone knows where I could host my Python Jabber IM server for a reasonable
> monlthy fee? It doesn't need to be a top-not
On 8/15/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> I'd like to write some web gallery software from scratch for my girlfriend.
> I've looked at the > PIL (python imaging library) and I'm using it to
> generate thumbnails from given images.
> Something else i'd like to get done
On 8/13/05, David Holland <[EMAIL PROTECTED]> wrote:
> What is a good way of using xml and python ?
ElementTree? http://effbot.org/zone/element-index.htm
or, lxml http://codespeak.net/lxml/
Luis.
___
Tutor maillist - Tutor@python.org
http://mail.pyth
with python, you should use the cgi
module. You can examine the documentation for this module by pressing
F1 while within IDLE, and entering the module list.
Here's a simple example:
#!/usr/LOCAL/bin/python
print "Content-type: text/html\n\n"
import cgi
def main(form):
if f
On 8/5/05, Nathan Pinno <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
> Is there a quicker method than the following?
>
> import random
> numbers = [0,1,2,3,4,5,6,7,8,9,10,11,12]
> cards =
> ["Ace","Two","Three","Four","Five","Six","Seven","Eight","Nine","Ten","Jack","Queen","King"]
> hand = {
On 8/4/05, Brian Kelley <[EMAIL PROTECTED]> wrote:
> Yeah the spaces kill me as well sometimes, and then I think that the
> spaces are okay sometimes.
>
> The real issue is that a metakit column name can include any printable
> character except a comma ",".
>
> So, now you know :)
>
> Here is an
On 8/3/05, Jay Loden <[EMAIL PROTECTED]> wrote:
> I've been considering some web projects recently, but I have some concerns
> about selecting the tools I plan to use. I like Python, and I was immediately
> thinking of using Zope to build on.
>
> However, I am concerned about performance, resource
On 8/3/05, Shitiz Bansal <[EMAIL PROTECTED]> wrote:
> Hi,
> I need to program a web browser in python.I dont have any idea of how to
> start, what i do have is time and willingness to learn.Could anyone direct
> me to some suitable reference?
> Shitiz
>
How about Grail http://grail.sourceforge.
On 7/31/05, Jorge Louis de Castro <[EMAIL PROTECTED]> wrote:
Hi,Thanks for your reply. I have been googling this issue and found thisarticle:http://starship.python.net/crew/theller/moin.cgi/SingleFileExecutable
that seems to indicate what I want is possible and it is available.
Hi,
I looked at th
On 7/27/05, Luis N <[EMAIL PROTECTED]> wrote:
On 7/27/05, Nathan Pinno <[EMAIL PROTECTED]
> wrote:
Hi all,
How do I go about the following: I want to write a program that will print
two lists one after another, then show all the available possibilities for
matches e.g a0 an
On 7/27/05, Nathan Pinno <[EMAIL PROTECTED]> wrote:
Hi all,
How do I go about the following: I want to write a program that will print
two lists one after another, then show all the available possibilities for
matches e.g a0 and x0.
Here is what I have so far:
lista = [x0, x1, x2, x3
On 21 Jul 2005 20:39:36 +0100, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Hi,I have a list of tuples like this:[(1423, 2637),(6457, 8345),(9086, 10100),(12304, 15666)]
Each tuple references coordinates of a big long string and they are in the'right' order, i.e. earliest coordinate first within ea
On 7/21/05, dina lenning <[EMAIL PROTECTED]> wrote:
YES...heres my problem I am a university student..will be a teacher in 2 years hopefully..andhave taken a first year computing course that said it required NO PRIORknowledge, but i am having great difficulty. The students (71 of them)
are all co
On 7/19/05, Kent Johnson <[EMAIL PROTECTED]> wrote:
Luis N wrote:> I'd appreciate some comments on my use of globals and the map function.>> import metakit> import marshal>> db = metakit.storage('addy.mk
<http://addy.mk>',1)> dbs = db.getas(
I'd appreciate some comments on my use of globals and the map function.
The idea here is that (simple) Metakit database definitions can be
loaded dynamically from another Metakit database detifintion. (Yes this
would likely be easier with a SQL database, don't ask!) Nasty code
ahead:
import metak
27;ve skimmed through it a bit, and will give it a more thorough read shortly.
Thanks!
Luis N
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Hi,
I was wondering if someone knowledgeable of both Tcl and Python could
suggest whether it would be a good or a bad idea to write a Python/Tk
application, with the motive to rewrite the application in Tcl/Tk once
completed. My reason for considering this route is that I have never
written a sing
On 7/2/05, Kent Johnson <[EMAIL PROTECTED]> wrote:
Luis N wrote:> def listItems():> l= []> d = {}> for r in range(len(vw)):> for x in range(lt):> ed = desc[x]> exec("d['%s']=vw[%d].%s" % (ed,r,ed))
&g
m vw by 5. How can I have:
for each record in the database:
for each column in the record:
do stuff.
Without multiplying the result i.e len(vw) * lt
Thanks.
Luis N.
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
On 7/2/05, Luis N <[EMAIL PROTECTED]> wrote:
Umm, sorry, I meant:
d[desc[x]] = exec("""'vw[%s].desc[%s]'""" % (r,x ))
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
dded without changing the
code.
I thought that if:
def listItems():
l= []
d = {}
lt = len(desc)
for r in range(len(vw)):
for x in range(len(lt)):
d[desc[x]] = exec("""'vw'+[r]+'.'+desc[x]""")
l.append(d)
Hi,
>>> l
[{'last': 'Bar', 'first': 'Foo'}, {'last': 'Bar', 'first': 'Foo'},
{'last': 'Bar', 'first': 'Foo'}, {'last': 'Bar', 'first': 'Foo'}]
This is how I imagine it:
for i in l:
for j in l[i]:
for k in l[i][j]:
print k.get('first')
print k.get('last')
Is
I grabbed this from the docs:
Gnuplot.py uses Python distutils and can be installed by untarring the
package, changing into the top-level directory, and typing "python
setup.py install". The Gnuplot.py package is pure Python--no
compilation is necessary.
On Mar 30, 2005 11:13 PM, jrlen balane <[
Hi,
I've been exploring xmlrpc implementations, and am somewhat confused
as to what I should use. I've spent the most time poking at Twisted,
which took me a while to figure out the basics of, and have spent a
moment or two exploring py-xmlrpc as well as SimpleXMLRPCServer in the
standard library.
This code runs, but it seems to me it should generate
a syntax error. Can someone explain what's going on?
x = [1,2,3,4]
z = 4
if z in x:
print 'found:', z
for i in x:
print 'in the loop with', i
else:
print 'not found:', z
>>>
found: 4
in the loop with 1
in the loop with 2
in the l
This code seems a little slow, is there anything in particular that
jumps out as being not quite right.
The idea is that a file is opened that contains path names to other
files, that are appended and outputed into a directory of choice.
I plan to move this off the filesystem into a database when
1 - 100 of 112 matches
Mail list logo