14,946 Topics

Member Avatar for
Member Avatar for javed.iqbal.3979

Hi everynone and Good Afternoon I am looking to implement a Program using Python for USB interfacing. How should i go for it.Any idea?

Member Avatar for chriswelborn
0
308
Member Avatar for abaddon2031

I have just figured out how to search for the element that im looking for in a xml file but now when I run it the code loops through i know 3 times maybe even more. I want to know what im missing that would cause it to loop like …

Member Avatar for chriswelborn
0
256
Member Avatar for racigan

Can any one help me in, creating the Python code for the below XML.Please copy it in to notepad <?xml version="1.0" encoding="UTF-8"?> -<TemplateBlock SchemaVersion="(3, 6, 0, 313)" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">-<Block ConstructorType="dstt_framework.DSTT_TestStep" IsCallerBlock="False" CollapsedState="False" EnableMode="True" Guid="u'{79DDB3BE-30F2-4CC4-AE65-C47A39390F34}'" ModifyTime="1409059399.51" CreationDate="1409059390.1270001" ResultLevel="1" ProtoType="''" DevelopmentNode="u''" LibraryDescription="u'To add a functional unit to the test sequence.'" Author="u't8187sa'" _CustomAttributes="{}" Description="u''" …

Member Avatar for Hiroshe
0
352
Member Avatar for VKG147

So I was learning python from "Learn python the hard way" in python3 (my preferance) (I also tried everything in the 2nd python) and when I came across "Parameters, Unpacking, Variables" I was stuck for good. When I type in exactly the same thing as he does: from sys import …

Member Avatar for Schol-R-LEA
0
735
Member Avatar for ramsha.shahid.3139

Hi all, I am working on simplest web browser import socket mysock=socket.socket(socket.AF_INET,socket.SOCK_STREAM) mysock.connect(('www.py4info.com',80)) mysock.send('GET http://www.py4inf.com/code/romeo.txt HTTP/1.0\n\n') while True: data=mysock.recv(512) print data mysock.close() It's returning error 408:Request timeout at one time and at other runs smoothly but with incomplete output as: HTTP/1.1 200 OK Date: Sun, 14 Mar 2010 23:52:41 GMT …

Member Avatar for chriswelborn
0
374
Member Avatar for Mafiasays

Hello everyone. I was wondering if somebody could solve this problem for me. I have a bot that is required to refresh and grab back times here is the code for that task : def findNST(html): NST = re.findall(r'<td id="nst">(.*) am', html) if NST == []: NST = re.findall(r'<td id="nst">(.*) …

Member Avatar for Mafiasays
0
782
Member Avatar for Emmanuel_2

Below is a Python program I wrote to draw lines as many al there are mouse clicks. However, I wanted all the line segments to have the same attributes (eg: color, width etc), but that's not happening - only the last segment has my desired attributes. I am a beginner …

Member Avatar for vegaseat
0
282
Member Avatar for diliupgabadamudalige

Is there any way to encrypt/decrypt all image files and audio files with python storing them in a password protected file and then retrieving them again without slowing donw the decryption part?

Member Avatar for diliupgabadamudalige
0
198
Member Avatar for mcroni

#i use python 3xx from tkinter import * from tkinter import ttk # i couldnt install PIL on my computer so I used Pillow. Hope you dont run into any problems import datetime import pickle ## init the variables here since i dont use objects in your code name = …

Member Avatar for mcroni
0
687
Member Avatar for La

def askopenfilename(self): filename= tkFileDialog.askopenfilename(initialdir='C:/..',title='Select File' , filetypes=[('Bitmap Images', '*.bmp'),('Png Images', '*.png'),('Gif Images', '*.gif'),("Jpeg","*.jpg"),("All files", "*")]) self.image = Image.open(filename) self.photo = ImageTk.PhotoImage(self.image) self.label = Label(self.photo) def encode_files(self,image,data): #get the image file image = Image.open(self.photo) #get message from entry box data= self.data_entry self.encoded = LSBSteg.encode(image, data)

Member Avatar for sneekula
-1
229
Member Avatar for abaddon2031

SO i have a python code that collects xml data in a file then seraches the file for the scancode and once it finds that the scan code is there it starts scanning for the order number this is where im running into trouble at. What i want it to …

Member Avatar for sneekula
0
473
Member Avatar for vegaseat

The portable version of Python (versions 2.7 and 3.2 are available) can be run from your hard drive or a flash drive. In many ways this makes your live easier, since a lot of libraries are included already. Also, you can take your code to a friend on a flash …

Member Avatar for sneekula
2
3K
Member Avatar for AdampskiB

Hi there, creating new variable to add to a function, and when the user inputs a value, I get this: ValueError: need more than 2 values to unpack This is for sizeWindow variable by the way, I'll bold the parts I'm talking about. [CODE]from graphics import * def main(): doorColour, …

Member Avatar for Narenthirasamy
0
9K
Member Avatar for abaddon2031

I am workign with a xml file that contains the order information for a company. What i am tryign to do is see if the xml file have a scan code in it and if it does then to pull the order number so that it can be passed to …

Member Avatar for abaddon2031
0
296
Member Avatar for vegaseat

This short Python program calculates Euler's number e, the base of natural logarithms, to a precision of at least 100 digits in this case. To get the precision needed, the Python module decimal is used. The result is compared to a published result.

Member Avatar for vegaseat
3
2K
Member Avatar for rbyrd

I plan to write a program that allows the user to move shapes around on the canvas once they are drawn. A given shape will be drawn when an appropriate button is pressed. I'm using simple test programs to learn my way around. I've looked at a number of examples …

Member Avatar for vegaseat
0
255
Member Avatar for chophouse

I'm trying to design a lambda function that returns any line in a file that begins with any digit [0-9]. The point would be to return the whole line if it does, and skip any line if it doesn't. This is for log analysis where I want all the lines …

Member Avatar for Gribouillis
0
338
Member Avatar for chophouse

Does anyone on the forum have any experience with pyspark (Python API for Apache Spark)

0
124
Member Avatar for WinDSP
Member Avatar for QwertyFish
Member Avatar for chophouse

I've written this function to take a list and shift each member right by the number supplied as the offset. I want to preserve the supplied list and return the shifted list. My problem is that the function modifies the supplied input list itself as well as returning a new …

Member Avatar for chophouse
0
291
Member Avatar for masterofpuppets

Here's a simple tutorial on dictionaries in Python: Dictionaries: Dictionaries are similar to other compound types except that they can use any immutable type as an index. One way to create a dictionary is to start with the empty dictionary and add items. The empty dictionary is denoted {}: [CODE]end2sp …

Member Avatar for Alf1#
5
999
Member Avatar for apaulogy

Guys help me out with a .py code that will enable a user to upload data(images,mp3,AVI etc) Your will be appreciated. thank you

Member Avatar for Jack_9
0
161
Member Avatar for JustinCase58

**Hi I am new here, I am learning Python, but I am mess up on this script and it keep asking the same input question... please help thanks.. ps how do you do What you name in pygames??? Justin** #SET UP GAME import random # named veriables s="Strengh" hp="Hit points" …

Member Avatar for Jack_9
0
149
Member Avatar for frankie198

I only started learning Python a few days ago, so as a beginner, what IDE should I be using? Should I just start with IDLE, then move on to something else when I'm more advanced? I've been using Pycharm for the past few days, I didn't know if that's an …

Member Avatar for Jack_9
0
844
Member Avatar for Jack_9

Hi, i'm developing an app with python where I need to link it to MySQL? Can somebody tell me how I would do that? Anything would be gladly appreciated!

Member Avatar for Jack_9
0
148
Member Avatar for lionaneesh

**Introduction** Hi guyz today I am going to writing a tutorial on dictionaries in Python....As per as getting comments from my readers I'll try to make this tutorial short.... **Layout** 1.What are dictionaries? 2.Why dictionaries? 3.How to declare/make dictionaries in Python? 4.What all you can do with a dictionary? 5.Interesting …

Member Avatar for vegaseat
0
656
Member Avatar for dancks

I'm using beautifulsoup to grab text from HTML files. Buts its not perfect: For example it seems to keep css and javascript code that was added haphazardly. My overall goal is to make a list of words and their frequency to compare and contrast html files to categorize them. Dealing …

Member Avatar for Gribouillis
0
277
Member Avatar for Jack_9

Personally I think Python is better then ruby because it runs on the Django framwork and it can do more. But I wanted some debate from ruby devs so bring it on!!

Member Avatar for OrionBlastar
-2
526
Member Avatar for vegaseat

This simple code shows how to write text with a given font, font size and color using the module pygame ...

Member Avatar for lsallen
4
7K

The End.