FAQ

Search Discussions

127 discussions - 765 posts

  • Please see the code and it's output here: <http://www.rcblue.com/Python/buggy_For_Web.py I'm attempting to eliminate the elements (strings) of lstA that are not well-formed in that they contain at ...
    Dick MooresDick Moores
    Oct 12, 2007 at 5:53 am
    Oct 15, 2007 at 9:17 pm
  • Please give me constructive criticism of <http://www.rcblue.com/Python/chessTimerForWebV6.py Thanks, Dick
    Dick MooresDick Moores
    Oct 25, 2007 at 4:33 pm
    Oct 31, 2007 at 6:40 pm
  • Dear list, I have encountered a problem with encoding of user input and variables. I want to read in user defined coordinates as a string like: 121? 55' 5.55'' Furthermore I would like to extract the ...
    Tim MichelsenTim Michelsen
    Oct 16, 2007 at 11:45 am
    Oct 19, 2007 at 3:46 pm
  • Hi, I have a snippet of code in a Python script I'm whipping up that's causing a not-so-pretty output. Here's the code: subprocess.call( "yes '' | make oldconfig" , shell=True ) When I run this code, ...
    JamesJames
    Oct 20, 2007 at 2:14 am
    Oct 23, 2007 at 5:46 am
  • I have a file sitelocations: STN_id[1]ªA STNlat[1]X.800000 STNlon[1].400000 STNelv[1] STN_id[2]»B STNlat[2]B.450000 STNlon[2]%.583333 STNelv[2])25 which in shell scripts I can simple 'source'. In ...
    JohnJohn
    Oct 27, 2007 at 12:49 pm
    Nov 4, 2007 at 1:25 pm
  • I wish to upgrade Python from the [Vers.] 2.3.4 that came packaged with my Mandrake 10.1 Linux OS to the current 2.5.1. The 'hash/bang' line of my python scripts is "#!/usr/bin/python". There are two ...
    LandSurveyorLandSurveyor
    Oct 13, 2007 at 6:58 pm
    Oct 20, 2007 at 11:08 pm
  • Dear all- I am writing a function as follows. def getdata(varlist): .... eventually I have a variable called "data", which have exactly the same number of columns as the name of variables in varlist. ...
    Happy DeerHappy Deer
    Oct 7, 2007 at 5:42 am
    Oct 7, 2007 at 9:57 pm
  • Hello all, Let's say I have the following dictionary: {1:(a,b,c), 2:(a,c), 3:(b,c), 4:(a,d)} I also have another dictionary for new value association: {a:1, b:2, c:3} How should I approach if I want ...
    GTXY20GTXY20
    Oct 2, 2007 at 5:56 am
    Oct 2, 2007 at 7:47 pm
  • I have a program which queries an online database (Medline) for XML data. It caches all data using shelve to avoid hitting the database too many times. For some reason, I keep getting a RuntimeError: ...
    Orest KozyarOrest Kozyar
    Oct 30, 2007 at 4:53 pm
    Nov 1, 2007 at 2:37 am
  • I want to get a variable name dependent on another variable. I have tried, 'fs' + str(int(round(unblockedFS))) for fs13 and I get an invalid literal. If I code in the fs13, everything works. Is it ...
    Bryan FodnessBryan Fodness
    Oct 22, 2007 at 2:56 am
    Oct 25, 2007 at 11:34 pm
  • Hi all, I have just started learning to program and am working through the Beginning Python from Wrox. I am working through one of the examples in the books on dictionaries. Here is the example. ... ...
    Ramkumar KashyapRamkumar Kashyap
    Oct 15, 2007 at 3:01 pm
    Oct 18, 2007 at 8:49 pm
  • Hi, I'd like to write a script that limits internet access to certain hours of the day. This seems like it should be simple but I'm not very experienced with any programming that involves networking. ...
    Kirk Vander MeulenKirk Vander Meulen
    Oct 10, 2007 at 9:49 pm
    Oct 11, 2007 at 9:21 pm
  • I can't figure out how to test a variable n for its type. An example that is the wrong syntax, but shows what I want to do: if type(n) == 'int' or type(n) == 'long': do something elif type(n) == ...
    Dick MooresDick Moores
    Oct 27, 2007 at 11:28 am
    Nov 1, 2007 at 6:23 am
  • Please give me constructive criticism of <http://www.rcblue.com/Python/stopWatchForWeb14-a.py (secsToHMS() was perfected with much Tutor help in this thread: ...
    Dick MooresDick Moores
    Oct 24, 2007 at 8:23 am
    Oct 25, 2007 at 10:51 am
  • I have a data file that I would like to extract data from: FS 1 2 3 4 5 1.5 1.000 1.000 1.000 1.000 1.000 2.0 0.985 0.994 0.997 0.996 0.996 2.5 0.967 0.976 0.981 0.981 0.982 3.0 0.949 0.958 0.965 ...
    Bryan FodnessBryan Fodness
    Oct 19, 2007 at 3:20 pm
    Oct 21, 2007 at 8:13 pm
  • def secsToHMS(seconds): """ Convert seconds to hours:minutes:seconds, with seconds rounded to nearest hundredths of a second, and print """ hours, minutes = 0, 0 if seconds = 60 and seconds < 3600: ...
    Dick MooresDick Moores
    Oct 9, 2007 at 1:01 am
    Oct 9, 2007 at 2:17 pm
  • Hello, I am trying to run a timing script but I need the python program to stop and wait for the executable to finish. Does anyone have any examples of doing this? Thanks Python Newbie
    Eric WalkerEric Walker
    Oct 27, 2007 at 4:55 pm
    Oct 29, 2007 at 11:33 am
  • Hello, first post here :-) I have the following task: 1) read in a file line by line 2) parse each line with a regular expression, and substitute certain patterns 3) end result: the old file with the ...
    Peter MexbacherPeter Mexbacher
    Oct 16, 2007 at 4:21 pm
    Oct 18, 2007 at 1:11 pm
  • Hello all, I have a script which takes data from a file or MySQL DB, looks up some stuff, then can print results to console or file. I would also like it to be able to update a MySQL database with ...
    Wormwood_3Wormwood_3
    Oct 8, 2007 at 1:07 am
    Oct 10, 2007 at 7:48 pm
  • Win XP, Python 2.5.1 ======================== #!/usr/bin/env python #coding=utf-8 n = 10000000000 # 10 billion print "type of 10 billion is", type(n) n = 1000000000 # 1 billion print "type of 1 ...
    Dick MooresDick Moores
    Oct 27, 2007 at 3:06 pm
    Oct 28, 2007 at 10:49 am
  • I am working on building a SOAP client. Unfortunately, one of the methods the SOAP server provides is named "import." The SOAP server is written in PHP. So, my problem is that Python really doesn't ...
    Alex EzellAlex Ezell
    Oct 24, 2007 at 4:39 pm
    Oct 24, 2007 at 10:19 pm
  • Hello all, I am an absolute beginner for python.....currently i am working under mainframe technology....but getting kinda bored from it and want to learn a good scripting language...so chose ...
    Abhishek NegiAbhishek Negi
    Oct 17, 2007 at 1:38 pm
    Oct 19, 2007 at 8:03 am
  • I think I could learn a lot about the use of Python with the web by writing a script that would look at <http://starship.python.net/crew/index.html and find all the links to more that just the ...
    Dick MooresDick Moores
    Oct 10, 2007 at 8:49 pm
    Oct 11, 2007 at 11:48 am
  • Hi, I have a very simple question that I cannot find the answer to ... if I knew the correct question to ask it would be simple. I am trying to find the name of the file I am currently running ...
    Suzanne PeelSuzanne Peel
    Oct 2, 2007 at 1:31 am
    Oct 2, 2007 at 6:43 pm
  • Hello all, I am trying to think of a way to make this happen, but it may not be at all possible:-) I would like to use Python to generate pages on demand for my website. By this I mean, when someone ...
    Wormwood_3Wormwood_3
    Oct 1, 2007 at 3:20 am
    Oct 1, 2007 at 8:09 pm
  • hello everyone, Is there a method in Python which does what setInterval('someFunction()',5000) does in Javascript. Basically, I want to call functionOne() every x minutes, and wondering whats the ...
    KamalKamal
    Oct 4, 2007 at 5:35 am
    Oct 16, 2007 at 4:25 pm
  • Hello I am working with python interactively using IDLE. Since starting, I defined some variables: s='string' a=1 b=[1,2] c=1.02 and so on. Now, I want to know which variables are in my workspace. ...
    Eli BroshEli Brosh
    Oct 13, 2007 at 9:04 am
    Oct 15, 2007 at 8:09 am
  • Hello tutors, I am adding logging to a program I am writing. I have some messages I want to log that are rather long. The problem I am running into is that when the line is more than the 80 character ...
    Wormwood_3Wormwood_3
    Oct 7, 2007 at 6:54 pm
    Oct 8, 2007 at 2:58 pm
  • Hello, Any way to display the count of the values in a dictionary where the values are stored as a list? here is my dictionary: {'1': ['a', 'b', 'c'], '3': ['a', 'b', 'c'], '2': ['a', 'b', 'c'], '4': ...
    GTXY20GTXY20
    Oct 1, 2007 at 5:35 am
    Oct 1, 2007 at 11:25 pm
  • An embedded and charset-unspecified text was scrubbed... Name: not available Url: http://mail.python.org/pipermail/tutor/attachments/20071015/8f7fcdb2/attachment.txt
    Ddm2Ddm2
    Oct 15, 2007 at 5:17 pm
    Oct 16, 2007 at 11:52 am
  • I seem to be having an issue with __getattr__() being called even if the proporite already exists... I thought that this was not supposed to happen. Is there a typo somewhere, or I do i misunderstand ...
    Allen FowlerAllen Fowler
    Oct 16, 2007 at 12:33 am
    Oct 16, 2007 at 4:01 am
  • Hello! How can I upload a file from python? If it is a form to fill with values it's simple: urlopen("http://site.com/action?key1=value1;key2=value2") and I get the form filled. What about uploading ...
    PaulinoPaulino
    Oct 14, 2007 at 12:42 am
    Oct 15, 2007 at 11:40 pm
  • Hello, I am writing a little program to test a theory and as part of teaching myself Python. I've only been at this about a week now. I have a program that "should" work but doesn't. It generates a ...
    Jim HutchinsonJim Hutchinson
    Oct 4, 2007 at 11:07 pm
    Oct 7, 2007 at 1:52 am
  • Does anyone have an idea why I can't do this? for k in range(nr): contribution=N.zeros(shape(H['area'])) contribution=[contribution+grid[:,:,z:,k,0]/A for z in range(len(H['outheight']))] ...
    JohnJohn
    Oct 29, 2007 at 3:22 pm
    Oct 30, 2007 at 12:36 am
  • Hello gurus, I have a question, a function like below, it is implemented by me, :) def funcA(tarray): a = [2,3,4] if len(tarray) =3: return a[0],a[1], a[2] elif len(tarray) == 2: return a[0],a[1], ...
    Yinghe ChenYinghe Chen
    Oct 23, 2007 at 8:21 am
    Oct 26, 2007 at 10:32 am
  • Hello, I have an 'Exam' module which selects new random set of questions and displays it, well this is the idea n;). Here is what I have so far: 8:'8q', 9:'9q', 0:'0q'} ... q_keys = ...
    Norman KhineNorman Khine
    Oct 6, 2007 at 7:04 am
    Oct 7, 2007 at 7:25 am
  • Hi All, lets say I am in Dir A (out of my control because I have submitted a job to a queuing system) and I have a python script which is running in this directory - the one I submitted to the queue ...
    Andre Walker-LoudAndre Walker-Loud
    Oct 4, 2007 at 7:15 pm
    Oct 5, 2007 at 8:36 am
  • Dear Tutors, I would like to make a new class instance, where the intance attributes coming from the kwargs hash. class ADUser: def __init__(self, **kwargs): for key in kwargs.keys(): self.key = ...
    János JuhászJános Juhász
    Oct 1, 2007 at 2:51 pm
    Oct 1, 2007 at 6:18 pm
  • Hello! Anyone know of any example/cookbook code for implementing inverted indexes? Cheers Dinesh An HTML attachment was scrubbed... URL: ...
    Dinesh B VadhiaDinesh B Vadhia
    Oct 31, 2007 at 12:41 pm
    Nov 3, 2007 at 11:48 am
  • An embedded and charset-unspecified text was scrubbed... Name: not available Url: http://mail.python.org/pipermail/tutor/attachments/20071022/bfc4f12c/attachment.txt
    Ddm2Ddm2
    Oct 22, 2007 at 5:37 pm
    Oct 22, 2007 at 11:30 pm
  • Hi all, I'm new to the list and relatively new to python, and very new to the use and creation of packages. Let's say I have these files in one directory: PrintBase.py PrintHello.py PrintBye.py ...
    Andrew WuAndrew Wu
    Oct 12, 2007 at 7:48 pm
    Oct 17, 2007 at 8:57 pm
  • Hello all, I have a tree of code on a machine which has been tweaked and fiddled with over several months, and which passes tests. I have the same codebase in a new virtual machine. A shell hack[0] ...
    Stephen Nelson-SmithStephen Nelson-Smith
    Oct 7, 2007 at 10:50 pm
    Oct 10, 2007 at 9:18 am
  • <http://www.redcanary.ca/view/top-programming Dick Moores
    Dick MooresDick Moores
    Oct 7, 2007 at 6:05 am
    Oct 8, 2007 at 10:03 am
  • How can I get ASCII for alphabet and number, such as 'a' and '1'. I can get ASCII for character naturally in C but I don't how to in Python.
    林培恒林培恒
    Oct 6, 2007 at 11:42 am
    Oct 6, 2007 at 9:14 pm
  • Does anyone know which is the more efficient way of finding a square root in Python: sqrt(x) or x ** 0.5 ??? Thanks, Elaine Building a website is a piece of cake. Yahoo! Small Business gives you all ...
    ElaineElaine
    Oct 5, 2007 at 8:00 pm
    Oct 5, 2007 at 11:24 pm
  • I have the following code, it keeps giving me a value of 1 for e. for line in file('21Ex6MV_oaf.dat'): oa, openoa, w15, w30, w45, w60 = line.split() if (float(oa) == round(offaxis)) and (eff_depth < ...
    Bryan FodnessBryan Fodness
    Oct 25, 2007 at 2:15 am
    Oct 26, 2007 at 7:35 am
  • Hi there. I have a small system in production with wxPython and PostgreSQL running on a machine with Centos 5. At first everytihing was running ok but now a weird bug was discovered: they can't ...
    Ismael Farfán EstradaIsmael Farfán Estrada
    Oct 22, 2007 at 4:29 pm
    Oct 22, 2007 at 5:58 pm
  • An embedded and charset-unspecified text was scrubbed... Name: not available Url: http://mail.python.org/pipermail/tutor/attachments/20071017/910fb162/attachment.txt
    Ddm2Ddm2
    Oct 17, 2007 at 6:32 pm
    Oct 22, 2007 at 7:22 am
  • I have a data file 'data1.dat', *a* *b* *c* *d* 1 0.1 0.11 0.111 2 0.2 0.22 0.222 3 0.3 0.33 0.333 9 0.9 0.99 0.999 and I want to be able to access the values of *b*, *c*, or *d* depending on a value ...
    Bryan FodnessBryan Fodness
    Oct 18, 2007 at 2:48 am
    Oct 18, 2007 at 10:11 pm
  • Hello Python Tutor! I have been using Python for years now, in all kinds of environments, but I don't really understand the restrictions on slicing. As described in ...
    GreggGregg
    Oct 12, 2007 at 2:14 pm
    Oct 13, 2007 at 8:55 pm
Group Navigation
period‹ prev | Oct 2007 | next ›
Group Overview
grouptutor @
categoriespython
discussions127
posts765
users133
websitepython.org

133 users for October 2007

Kent Johnson: 132 posts ALAN GAULD: 114 posts Dick Moores: 52 posts Eric Brunson: 37 posts Ricardo Aráoz: 20 posts John: 16 posts Bhaaluu: 15 posts Aditya Lal: 13 posts Bryan Fodness: 13 posts Michael Langford: 12 posts Wormwood_3: 12 posts GTXY20: 11 posts John Fouhy: 11 posts Tim Golden: 11 posts Ian Witham: 10 posts Jon vspython: 10 posts Timmie: 10 posts Martin Walsh: 9 posts Bob Gailer: 8 posts Luke Paireepinart: 8 posts
show more
Archives