45 Discussion / Question Topics
Remove Filter Hello people. I'm looking for FP examples that are very simple (very few lines, one-liners are even better) and that totally look like sorcery to a traditional imperative programmer. Can you help me with that? I want to show some old school programmers who are friends of mine but keep … | |
Hello everyone. I am trying to make a simple to-do list program using PHP and the MVC pattern. I have managed to make the login page, the model and the controller for managing logins. It is working properly because it can discern if the user exists or not. After validating … | |
Hello everyone. I am modeling a simple dictionary application using the presentation-business logic-data layer pattern. I already have the design but am not sure it is correct: My presentatioon layer is a simple GUI where users insert their queries. They have a form for entering new words and their definitiom … | |
Hello everyone. I am currently making some database connection modules in Python inb order to learn Python's approach to OOP and also to lear how to connect to databases via Python. I successfully made a package with modules for postgres, mysql, sqlite3, and MongoDB. The classes simply connect, disconnect and … | |
I have this: dic = {'ál':1, 'él':2} string = "ÉL" number=dic[string.lower()] and it's giving me a KeyError. I realize then that 'ÉL'.lower() is giving me 'Él', i.e. it is not affecting the É at all because some weird Python 2.x encoding issue. Can somebody help me please? I can't tell … | |
Hello. I am currently studying database design at my local university. They use Microsoft products there (Microsoft SQL Server 2008/2012), but we can't use them at home because of the licensing. I have two questions: 1 - Is there anything in the world of Open Source that I can use … | |
Hello everybody. I have a question related to database design: I am trying to make a database for my translation mini-company. I have two entities: translators and proofreaders. The problem is that some of our translators double as proofreaders, that is, they can work in both areas. The question is, … | |
Hy, I have a beginner question: when using PyDev should all my programs be inside a package or not? | |
Hello everybody. Lately, I'm having a problem with PyDev which is driving me crazy: It is failing to connect to the Python console, therefore, many built-ins appear as errors (None, __name__, the os modules, etc.). I have tried downgrading PyDev, I have tried disabling IPv6, I have tried disabling my … | |
Hello people. I need an explanation about inheritance I got a little confused in class: This is the modelling problem: There are two objects: doctors and patients. They are expected to have only the following attributes: Doctors have: name, age, id, and salary Patients have: name, age, id, and disease … | |
Hello I am a little confused. I had always thought that a class can have objects from other clases as attributes. My teacher recently told me that this is not true... so I am confused now: if one of the attributes of my class is a String, would that be … | |
Hello. I am working on a personal project. It's basically a program for changing specific tags from certain HTML files. So far, everything works. The GUI and the logic a work but I know the main function is wrong because it looks like this: def tag_remove(HTML_string): clean_HTML = a_string.replace('<b>', '').replace('<i>', … | |
Hello, I need your help with something (again): I need to control two text widgets with one scrollbar and, thanks to this website, I found some code to do it using listboxes (here: [url]http://www.daniweb.com/forums/post940371.html#post940371[/url]). I modified it, and it now works with text widgets and pyton 2.x. The problem is: … | |
Hello everybody. I want to make sure about something: If I install ActivePython 3.2 as root on Linux, will it delete the distro's default Python (2.6)? I also installed Python 3.1 a long time ago, so I have Distro's Python 2.6, the official Python 3.1 and want to add this … | |
Hello again. Here are the details: * My litle scripts work perfectly in my virtual Windows XP (I'm using virtualbox if that matters) as long as they are non-compiled .py or .pyw files * After compiling them, I double click on them and a DOS window comes out, then dissapears … | |
Hello. I am trying to create a module containing many little functions useful for linguistics. So far everything works right, but I have a question: is it a problem if a function within a module calls another function within the same module? I mean, I have a function that performs … | |
Hi, this is, let's say, the second part of this thread: [url]http://www.daniweb.com/forums/thread291657.html[/url] I have managed to control two widgets with one scrollbar, but now I have realized that, althought the widgets can be controlled individually via the mouse wheel or the keyboard, I sometimes need individual controls for each widget. … | |
Hello. I need your help with PHP. I recently began studying it, and I am stuck at the "make a contact form" exercice. I am trying to understand the concepts behind it. I think I get everything, but still my Form won't work. I event went as far as to … | |
Hello Everybody. I'm not sure if I should post this here or in the Linux forum. Here goes: 1 - I have a local Linux server (Mandriva 2010) with a WordPress blog in it. It's for testing. 2 - I have other 2 computers at home (both have Linux and … | |
Hello. I recently started studying Java and OOP. I am currently creating a class that writes text to a file in a particular format. I have 'finished' it, and it works, but I am unsure as to the quality of the implementation. This is how it works: * First of … | |
Hello I need your help with a simple Excel issue: This is what I have COLUMN 1 COLUMN 2 COLUMN 3 125 YES 304 NO 1549 YES Here is what I need: If the string in COLUMN 2 is 'YES', copy the value in COLUMN 1 to COLUMN 3. What … | |
Hello, This is a really simple question but I just don't see the error here: [CODE]def foo(): x = input('write something: ') if x == 1 or x == 2: print('OK') else: print('NO') print(x)[/CODE] Why does it keep printing NO? Also, I have a more complicated one: def foo(x, y): … | |
Hello everybody I have a question: is it possible to compile ruby files into bytecode. Does ruby have something like .pyc files? I found some discussions online about generating .exe's from ruby files, but what I want to know if it is possible to compile .rb files just like you … | |
Hello. I don't know if somebody has asked this before, but is there any python equivalent to the Java .jar files? I have read about py2exe, freeze, and module distribution, but it's not what I'm looking for. I need a file that can contain everything in my program (and modules … | |
Hello I'm trying to make a verb conjugator for Spanish. The problem is that I need to get the last two characters in the verb to be able to determine the verb group to which it belongs. In Spanish, conjugation depends on the verb ending, among other factors. Verbs end … | |
Hello, Now I'm making a program for creating language glossaries, but the problem is that windows uses ANSI for encoding text files, and the program that will read these files (which is not mine) only displays words in utf-8 encoding. Since my program is multiplatform, it can also work under … | |
Hi, I need your help with a php issue here: I have a flash form where the user enters some strings. Action Script is supposed to get these strings and place them into variables, then send the to php. Now php gets these variables and places them inside other variables … | |
Hello people, I am currently working on a program for comparing texts. Everything is working fine thanks to your help. However, I would like to have my program resize everything when the player resizes the main Window. I have managed to do so, but something feels amiss... Can you help … | |
Hi, a simple question: how do I enable deleting inside a python program? I have a python program that asks for user input, users write some words and then press enter. The problem is they can't use backspace or supr to delete anything, instead, the program prints ^? each time … | |
Hi, I've been working a lot with text widgets lately, and I have posted several questions here. Again, thanks for all your help. This time I'd like to post something I found out, so you can help me improve it. My program consists of two textboxes. The texts inserted in … | |
Hi everybody, I am experiencing a very weird situation here: I have a program that uses tkinter and python 3, but its search function isn't working under Windows. [CODE=python] from tkinter import * import tkinter.ttk def sort(): pass def find(): start = 1.0 while 1: find = text_to_be_found.get() pos = … | |
Hi, I have a Text widget and a button that is supposed to sort the Text's contents alphabetically. This time I won't ask you how to do it, I'll rather ask you to correct me. This is how I solved the problem: [code]unsortedT = text1.get(1.0, END).replace("\n", "\n*").split("*") sortedT = sorted(unsortedT) … | |
Hi, I have a different question today: how do I call the python interpreter AND tell it to open a python program from inside another program UNDER WINDOWS? My program is running fine, and it even has a text mode without any graphical interface. Under Linux, you click on the … | |
Hi, I'm trying to make a frontend for the compile module in python. Everything works just right, except when the file has mistakes in the code that lead to a syntax error. It does raise the invalid syntax error in the terminal, but instead of executing the block inside the … | |
Hi I'm using python 3.1 and Windows. My program writes xml code to a text file, the problem is that windows needs to know that this file's encoding is utf-8. Right now it does write the proper code, but other programs (firefox, for instance) fail to read it because it … | |
Hello, I am making a file comparing program, and I want it to display line numbers permanently, like any normal text editor does. Is it possible to do this with tkinter? thanks | |
Hi people, the title says it all: The user manual of my program is an HTML document, and I want the OS's default browser to open it directly once the user clics on help. The function that the help menu entry invokes is this: [CODE=python]os.popen("/usr/local/firefox/firefox ./html/index.html")[/CODE] Now this only works … | |
Hello, I've been looking for this here but haven't been able to find an answer that fits my case: I have a tkinter GUI consisting in a button and a Text (a textbox). You write the whole text in the textbox, then press the button and it uses the get() … | |
The question is simple: I have two scrolled text widgets (I'm using tkinter and python 3.x), and I want to synchronize them, that is I want both scrollbars to move at the same time when the user moves the mouse wheel. Both widgets are suppossed to contain the same text, … | |
Hi, I have a very simple question: first of all, my code: [CODE=python] import os def test(): x = "Linux" y = "Windows" if os.name == "posix": print(x) if os.name == "nt": print(y) else: print("there is a problem") [/CODE] Run that code on Linux (don't know about windows) and it'll … | |
Hi, I have a minor quesion today: can somebody tell me how to change basic style options for buttons using ttk. I'd like my buttons and entry fields to have rounded corners. I know this is possible but documentation on ttk (for python) seems to be inexistent on the Web. … | |
Hi, I have another question: ¿is there a method that allows me to capitalize the first letter of EVERY WORD in a given string? I know that something like: [CODE=python]a = "hello world" print(a.capitalize())[/CODE] would print "Hello world" but I need it to print Hello World. It's for a program … | |
Hi people! I need your help with a find function for a glossary program that I'm writing for my own use. I'm using python 3.x and have already made a find function, but I don't like how it came out. Let me explain with an example: First, let me show … | |
Hi everybody, I'm trying to install python 3 from source in my new Mandriva 2010. I have read a lot of posts in this website, but none of the instructions has worked for me. The code compiles and all, but it doesn't install tkinter. I know that tcl/tk are installed … | |
Hello every body. I've been lurking these forums for quite a long time, but I finally decided to join as I see it's pretty well organized and useful. I'm a language professional curently considering either a career switch or a 'career fusion' (i.e complementing my exiting career with another one). … |
The End.