15,175 Topics

Member Avatar for
Member Avatar for 3e0jUn

Is there any way to host several txt files on a computer without having to dive deep into socket programming? I have a few requirements, though: * People could connect when the app is running * No inteference of Windows * Instructions on how to create a client side software …

Member Avatar for 3e0jUn
0
123
Member Avatar for dilbert_here00

Hi, I was trying to access some functions from a dll using python ctypes, but not sure how to pass pointers to get it to work. Here is an example of what i am trying to call: GetAvailableDevices ( SdkHandle session, DeviceDetail * pDev_list, uint32_t * dev_list_size ) Parameters: [in] …

Member Avatar for dilbert_here00
0
3K
Member Avatar for yordan.todorov.35

Hi there, i need to use this function but it is write in Python and if is possible i dont want to start learning Python just for one function so i wanted to ask if someoen can direct me to Pythong to C# convertor or help me convert this function. …

Member Avatar for chris.stout
0
1K
Member Avatar for jtaylor408

I want to be able to have a set of panels of vertical panels that remain the same size, but I want to have a vertical scroll bar that will allow me to scroll in the window. Right now I'm using a wx.ScrolledPanel and adding panels to that and putting …

0
172
Member Avatar for Ene Uran

Does anybody have experience with Python on the iPad? Is it easy to get and use Python?

Member Avatar for chriswelborn
1
143
Member Avatar for HTMLperson5

Hi, all. I am having a problem using the `getpass()` function, there are no problems with the `raw_input()`, though. I'm trying to check the user input is valid (meaning that the Username is nav and the password is 39429432) Really, I DON'T want to use `raw_input()` for the password field. …

Member Avatar for Gribouillis
0
3K
Member Avatar for javanub123

Hey Guys, i just started learning python and havent really done much programming so im pretty new im following a book and I have to read some data from a text file the code thats giving me trouble is os.chdir('Users\spreston\Desktop\HeadFirst\Chapter 3') the error says that the path does not exist, …

Member Avatar for Gribouillis
0
142
Member Avatar for whypython

Suppose I have this textfile A: League 1: a = 123456, b = england a = 234564, b = brazil a = 939311, b = germany ... League 2: a= 213213, b = italy ... ... League 500: a = 74778, b = denmark ... ----------------------------------------------------- Now, I have another …

Member Avatar for Gribouillis
0
253
Member Avatar for manticmadman

I am trying to check for a palindrome. I keep getting errors when reaching the first if statement. I feel it is because i returns as a letter and not the position number in the string. What am I missing? def palindrome(str): s=(str) sum=len(s) l=int(sum/2) for i in s[0:l]: if …

Member Avatar for TrustyTony
0
193
Member Avatar for jgehlot09

I am trying to grab the string/object from the treeview. So when a user click on any item in the treeview, I can show it on the terminal. ANy help is appreciated.Here is the code. QtCore.QObject.connect(self.treeWidget, QtCore.SIGNAL("clicked(QModelIndex)"), self.treefunction) def treefunction(self, index): print index Output on clicking the item in treeview …

Member Avatar for jgehlot09
0
732
Member Avatar for chophouse

I'm getting an error/crash when trying to use Python on my virtual server running Win 2008 Server. Python installed without incident, and IDLE opens and the interactive widnow works fine. But when I try to open a new window and run it it crshes when trying to save. Example: I …

Member Avatar for chophouse
0
2K
Member Avatar for shean1488

Hi everybody. My question is. I made an html template that I will extend in every other html pages. And this template have some variables. So my question is how to assign a function to this base template. Let me be more clear and give you an example: base.html ... …

Member Avatar for ScottieF
0
266
Member Avatar for peterparker

I am learning Python through LPTHW. There is an exercise where we need to create test scenarios. The following is the code for whom Test Case have to be made: ############################# # Sentence Parser # ############################# class ParserError(Exception): pass class Sentence(Object): def __init__(self, subject, verb, object): # remember, we take …

Member Avatar for peterparker
0
262
Member Avatar for tony75

Hello Friends Creating library object. I have a library.txt that contain 20 books and every line in library,txt contain author ,title and loan , my questions is how to create class and object for library script with python. 1. search at title 2. search at author 3. Borrow a book …

Member Avatar for tony75
0
674
Member Avatar for ThePythonNoob

Hey guys im need some help with this binary calculator, you enter the amount of bits or n in and then it calculates the number? In order for you to understand my problem more I will explain why I am making this, I asked my dad how big 128 bit …

Member Avatar for ThePythonNoob
0
252
Member Avatar for hughesadam_87

Hi guys, I was working with the pandas package and was so impressed with how simple something was that I had to share. Have you ever worked with csv data (in excel for example) and wanted to import the data to python, take either a column average or row average, …

1
81
Member Avatar for avgprogramerjoe

This is a simple game of pong with made using pygame. You will need to make a picture of the pong for it to run properly. Simply make a cirlce in paint, 25x25. Joe

Member Avatar for astronautlevel
0
3K
Member Avatar for astronautlevel

Hi guys. I made a pong game with Python, and I was looking for some possible improvements. The code can be found [here](https://github.com/astronautlevel/Python-Repo/blob/master/Python/Pong%20game/Pong.py). Please look at it and reccomend some improvements. Thanks!

0
104
Member Avatar for sam.tubb.10

Hello, I am newish to wxPython and I am attmpting to make a text editor Everytime it attempts the open file code it gets this error: IOError: [Errno 22] invalid mode ('r') or filename: u'' WHY!!! here is the code... import wx import os wildcard = "Text file (*.txt)|*.txt;|"\ "All …

Member Avatar for TrustyTony
0
224
Member Avatar for ChristianOncken

from socket import * from time import time, ctime import thread import Queue import os class ThreadSafeConsole(Text): def __init__(self, master, **options): Text.__init__(self, master, **options) self.queue = Queue.Queue() self.update_me() def write(self, line): self.queue.put(line) def clear(self): self.queue.put(None) def update_me(self): try: while 1: line = self.queue.get_nowait() if line is None: self.delete(1.0, END) else: …

Member Avatar for ChristianOncken
0
1K
Member Avatar for david56connor

Hi there, I have a piece of code that I made to handle the joining of 'characters' in to a 'raid' on a game. The program refreshes a page to check if the 'raid' is available, if it is, it 'forms' the raid and 'joins' the characters. The joining process …

0
137
Member Avatar for smile1

I apologise in advance but I have resorted to posting all of my code as I'm really struggling on this! I have created a table which is initially empty then a user imports a text file and creates 'n' rows depending on the content. Each row has an option menu …

Member Avatar for TrustyTony
0
1K
Member Avatar for whypython

Suppose I have this textfile: **Generation #1:** trash_jsdbjsabnf trash_nsdjklfndsnf trash_jlsndfknsf ... trash_akjsdlkjasdasd **Game_List:** game = 111 game = 222 game = 333 **Generation #2:** trash_jsdbjsabnf trash_nsdjklfndsnf trash_jlsndfknsf ... trash_slajdlaskjdlas **Game_List:** game = 119 game = 262 game = 323 ... ... **Generation #500:** trash_jsdbjsabnf trash_nsdjklfndsnf trash_jlsndfknsf ... trash_jkansdklnalsda **Game_List:** game …

Member Avatar for TrustyTony
0
127
Member Avatar for etquart

Hi All, I'm currently working on finding a solution to strip/edit a texfile in order to pass it through to Oracle's SQLLOADER which in turn will import the data into a table. The textfile will need to be imported into a clob column inside the first table after which the …

Member Avatar for TrustyTony
0
140
Member Avatar for peterparker

A basic program which writes the user name who has logged in the windows machine: ###################### # User info # ###################### import os import datetime from time import strftime def foo(): usr_log = os.environ ['USERNAME'] sys_log = os.environ ['USERPROFILE'] current_time = strftime("%a, %d %b %Y %H:%M:%S") dt_str = str (datetime.date.today()) …

Member Avatar for peterparker
0
209
Member Avatar for vy_007

I'm trying to implement image processing s/w that requires me to implement an image enhancement module that performs various operations like Color, Contrast, Brightness, Sharpness manipulation on the same image. I've implemented a module but it works on the same (original) image and changes done are not reflected. Please help. …

Member Avatar for vy_007
0
925
Member Avatar for mattyd

Located in the upper, left-hand corner of the GUI window is a small "[COLOR=red][B][I]Tk [/I][/B][/COLOR]"; is it possible to get rid of this entirely? It is only a small detail, but a detail none-the-less that I wish to have control over in regards to the final product. I would also …

Member Avatar for ZZucker
0
5K
Member Avatar for vy_007

Below is en2.py code- # The Python Imaging Library # $Id$ # this demo script creates four windows containing an image and a slider. # drag the slider to modify the image. # from Tkinter import * from PIL import Image, ImageTk, ImageEnhance import sys # enhancer widget class Enhance(Frame): …

Member Avatar for TrustyTony
0
7K
Member Avatar for veledrom

Hi, I'm good at PHP and want to learn **Python 3**. Do you know any online pdf book for me to download so I can start? I'm asking to those who can say "this is good one". I found myself googling but I have no idea if they are good …

Member Avatar for Rashakil Fol
0
169
Member Avatar for veledrom

Hi, I was reading about Python and spotted "it has high signal-to-noise ratio" bit. In general, what does it really mean? I read some stuff about it but no particular explanation for programming. Tahnsk

Member Avatar for Rashakil Fol
0
163

The End.