- Upvotes Received
- 2
- Posts with Upvotes
- 2
- Upvoting Members
- 2
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
Re:
Hey, im having a problem retrieving information about some files due to the fact either the file name or the extension is too long. For example i want to retrieve the size of a file only i call [CODE=Python]os.path.getsize("somelongfilename.txt")[/CODE] Note that it may not be a .txt extension, but it … |
|
Re:
Hi, I got this code snippet with the following usage: [CODE] def main(): # sample usage manager = LoadManager() manager.msg = ('www.example.com', '/') manager.start(threads=5, interval=2, rampup=2) if __name__ == '__main__': main()[/CODE] Works fine,but i would like to supply the following arguments through command line: msg threads interval rampup Plz could … |
|
Re:
A classic of early text-based interfaces... Any way to do it in Python? I tried getch(), but it doesn't really work (for instance, if you hit Enter to confirm a menu selection, and then it goes to a "press any key" thing with getch(), getch() will pick up the Enter … |
|
Re:
[code] using System; using System.Collections.Generic; using System.Text; namespace Factorial { class Program { static void Main(string[] args) { int i, n, fac = 1; string s; Console.Write("Please enter any number to find it's factorial(0 to 19):\n"); s = Console.ReadLine(); n = Int32.Parse(s); for (i = 1; i <= n; i++) … |
|
Re:
Hi there, I am new to python. Can somebody tell me how can I count a given word from a file. I found lots of solution for counting all the words in a file, but not for some particular ones. Thanks in advance |
|
I thought I knew how packets worked, but I'm just not understanding how to capture and read them... I am playing this online game which is connected to a server (some server off of battle.net). I want to know how to search my way through the packets and filter them. … |
|
Re:
Just bouncing a red ball within the frame of a window, the twist here is that the image is stored within the code as a base64 encoded string of the gif image. This way you only have to distribute one file. The Python code is heavily commented, so you can … |
|
Re:
Im confused and I need to know how to read from a tkinter textbox in order to create a text editor. Also would it be possible to have certain words colorized as you type in words? I would like to make this into a code editor possibly. Any help would … |
|
Re:
hi i want to extract lines from a binary image. i need source code in C# |
|
Re:
hi every body...........i have a problem.i have a web page in which i m uploading an video file by using fileupload control.......before uploading that video file i m checking the size of that video file by the variable FileBytes.then i m checking it with the drive free space .......but this … |
|
Re:
I started programming in Python as a hobby a few weeks ago, and I have run into a little problem. I am currently making a script to give me a sort of Vocabulary Test. It is kind of hard to explain so I will just show you the code. [code=python] … |
|
Re:
I have searched the forums and could not find a direct answer to my question, it's probably too simple and i'm over looking something. It's my first day with Python, I'm in the process of developing a program that converts a given float integer into a variety of different things. … |
|
Re:
I need some help when it comes to adding functions in C#... In VB.net you can simply add a new function that deals with a specific action of a form object by clicking on the following drop down menu... [url]http://img151.imageshack.us/img151/492/vbtq8.png[/url] When I go to the menu in C# all i … |
|
Re:
I am making my own file manager for linux, hopefully it will be cross platform, and I am trying to identify different file types, in particular folders. I have already searched google but I could only find a way of identifying text files. Does anyone have any advice on identifying … |
|
Re:
Hi I just want to count files of particular type (like *.txt) in a folder. I searched net and found this for all files count : file_count = len(os.walk(valid_path).next()[2]) But I need perticuler type like *.txt . (means how many .txt files in folder) How to do this ? Thanks … |
|
Re:
Hi, Im trying to develop a game with Gamemaker 7, problem is I dont know a bit of programing, and I dont know were to get things like sprites, backrounds, etc, is there any way I can rip sprites from a website? I would like to make an turn-based RPG … |
|
I just need some code that will return a string of the name of the current activated window title/name. I've spent almost hours looking for a simple example though... ================================================================ I've seen other people say to hook windows messages and listen for wm_activate, and others... I already have when to … |
|
I am using this function to download files: [code=python]def download(url): urllib.urlretrieve(url, url.split("/")[-1])[/code] I am downloading files from a site, but I don't know the EXACT filename... All I know is the id for them... Example: download("http://site.com/files/489411/") When i am to do that, it automatically resolves the appropriate filename and it … |
|
Re:
How can I get every Token (word) and PreviousToken(Previous word) From text file For example if the text file content is "Every man has a price. Every woman has a price." First Token(word) is "Every" PreviousToken(Previous word) is none(no previos) Second Token(word) is "man" PreviousToken(Previous word) is "Every" Third Token(word) … |
|
Re:
HI all, whenever we open any python/wxpython program there is one more window other than our application is running which is command line window that black window for showing any error or any output through print statement.So i want to remove that window from my wxpython's application,how to do this?please … |
|
Re:
Hi i got this site -> knowitall.co.nr and i wanna know of some program that cud transfer money to paypal. i dont want it to be sent home like the normal google adsense! If u have any info id appreciate it. and if there are any other ways oof earning … |
|
Re:
Hi Everyone, I am trying to install Tossim (simulator for Tiny OS ) on my Mac. I have a Macbook which runs 10.4.11 . I am stuck because I am unable to find the file libpython.2.4.so . Can someone please tell me the directory that this file gets stored in … |
|
Nvm :/ Please excuse my blindness. Where's the delete topic button at? :( Please excuse it again. ~Shadow14l |
|
Re:
Hi. I am totally new to python. I have a problem that I have been trying to solve without any form of solution. I have a group of files in Directory A that are named like: Text__###__TEXT___###.tif These are dummy files. The real files are in Directory B and are … |
|
I just want a console to run. When I use this function, I don't ever want the automatic tk window to appear. How would I use this function without any gui? *Also on a side note, what is the python code tag? (python)is it this :P?(/python) |
|
Re:
i am completely stumped at how to create this program. can anyone help out? here are the guidelines. Introduction Perhaps in no other sport does statistics play as major a role as in the game of Baseball. In fact, certain numbers, such as 56 (length of Joe DiMaggio's hitting streak), … |
|
Re:
Hey guys, is it possible to simulate a mouse click using x and y co-ordinates. And also could you have user input of a certain co-ordinate and it would click that specified co-ordinate? thanks. |
|
Re:
Hi I was making a program that tried to open firefox like this: [code] exec file('C:\\Program Files\\Mozilla Firefox\\firefox.exe') [/code] but i get an error [icode] exec file('C:\\Program Files\\Mozilla Firefox\\firefox.exe') File "C:\Program Files\Mozilla Firefox\firefox.exe", line 1 SyntaxError: Non-ASCII character '\x90' in file C:\Program Files\Mozilla Firefox\firefox.exe on line 1, but no encoding … |
|
Whenever I open a page with urllib or urllib2 (file = urllib.urlopen(urllinkhere)) and when I print it, I get this: [IMG]http://i121.photobucket.com/albums/o229/Shadow14l/boxes1.gif[/IMG] See all the square boxes? Unknown characters or something... Well they are and represent the returns (new lines). If I saved this to a text file, all the boxes … |