- Upvotes Received
- 6
- Posts with Upvotes
- 6
- Upvoting Members
- 4
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
--It is the mark of an educated mind to be able to entertain a thought without accepting it.(Aristotle)--
- Interests
- [CODE][/CODE]
47 Posted Topics
Re: Hi, I think that before you go into threads you should maybe explain your idea in a few lines. For now, the error you receive is due to the fact that the slot you've connected to the download_file_button is not a method of the VideosToMp3 class, but of Download_in_File class. … | |
Re: Hi, What are you using as module for creating your windows? I am currently handling a lot of GUI elements, but I'm using PyQt. I'll explain how I do it. The app's mais window is a QMainWindow inherited class. All the windows popping from actions triggered by the user in … | |
Re: Hi, I think there was no answer because this is not very understandable. First of all, this isn't a program, there is no main, we don't really know what you want to do with this class, what would this 'same functionality ' be? Please explain further.... | |
Re: Hi, First of all, what are you using, TKinter, PyQt...?I use PyQt so I'm not sure what sort of text box it is you're using. I haven't tried it because I'm a bit in a hurry, but here goes: For 1. - just like A = 0x65 prints out as … | |
Re: If it is less complex than sockets, there's the Python version for [URL="http://en.wikipedia.org/wiki/Pcap"]PCap [/URL]( (packet capture API) such as PCapy, winpcapy, etc. By searching python and pcap you'll get them right away on Google and see which one is better and easier to use. I used to capture network adapter … | |
Hi everybody, New adventure question: if you know how macros act in C, is there such a behavior in C? Basically the most important feature I'm looking for is similar to this: [CODE] #define MY_C_MACRO(x) {if (x>0) x++; else return} [/CODE] Such a macro would cause the function where it … | |
hi everyone, I have a tiny problem with a simple implementation: - i have a main window with a table in my central widget - i want to add stuff in the table gradually, and I allow only the 1st cell (index 0) of each row to be selectable. - … | |
Re: Hi, Could you show us just a schematic of the code at least? BTW, it's "from A import x" (A is a module, not a file). I hope the print calls are inside some method of the class x, which you call x.method(), otherwise I don't see how they could … | |
Hi all, This is not a post about simply recvering user input with raw_input() and then using eval(), nor for input() use . I remember having used this once, but can't get a hold of the old code so I turn to you for fresh ideas. I am planning to … | |
Hello hello, This post is half related to Python because it is about its automatic documentation generation. I have been playing with Doxygen for a while in C, it was adapted to Python in a second evolution stage a while ago. However after reading a lot of small examples, and … | |
hello, Here's a simple question I want to clear up. We all know that we can use the name of an array as the pointer to that array, and that a pointer holds the address to the variable named. What I'm doing is this [CODE] //somwhere in the code uint8_t … | |
Re: Hi, I don't know if you've sorted it out yet but here goes for my teaching skills :). First of all think of an analogy: you brain in your everyday life. You handle several things at once, some are very obvious and some you don't even realise you're doing. The … | |
Re: I vote for python too, have used a lot for parsing and simple GUI dev... works like a charm and needs no getting used too, plus support is everywhere on the web... | |
Hello hello, First of all I was thinking that some of the experts around here could actually start an exhaustive discussion about peripheral driver development for newbies or unexperienced, such as yours truly. I find that theory is in many places, registers of classic peripherals are found also, but never … | |
Hi and sorry for posting this here, there's no good section for it so if the admin decides to take it out , I get it... My colleagues and I have started a new company and we're looking into getting a teleconference service, line , whatever it's called. We have … | |
Hi, Simple but driving me nuts. I am trying to create a table of pointers to already defined structures. But I can't find correct directions and I'm not used to this so HELP pliz! I managed to do it for functions, for some reason I can't find how to do … | |
Good morning coders !, I stumbled accross an initialization this morning and even though I get it , it's not 100%. I'll simplify it this way: I have an array declaration: [CODE]uint8_t MyArray[MAX_SIZE][/CODE] I have a linked list structure: [CODE]struct MyLL{ struct MyLL * next; struct MyLL * previous; uint16_t … | |
Re: do you want to add the "THE" string constant in front of your string read in USER ID field? or what exactly are you trying to do? | |
Hello, I' ve been having the following problem: - my OS is Centos - I have python 2.4 installed (and several packages in it too, like yum, ...) - I have installed python 2.6 - I have taken out all python2.4 executable references in usr/lib so that only python 2.6 … | |
Hello , I have had a little surprise and maybe because I haven't read the manual well enough or can't understand all the underlying details. Imagine a small class and another file's main using an instance of that class. If I try to modify (not define !) an INEXISTANT attribute … | |
Hi, Something new from me: I have an application which can act as server and client (launch them on separate PCs). I need the server stdout because it displays some data for evaluating their communication. I start the server through a [B]subprocess.Popen[/B] giving its stdout to [B]PIPE[/B] [CODE=Python] from subprocess … | |
Hi again, I am trying to do something really sillya nd it isn't working:( I have a main where I want to start two threads using the same handle function, but the second thread generates the following error: Unhandled exception in thread started by Error in sys.excepthook: Original exception was: … | |
Re: I think you need the math module: [url]http://docs.python.org/lib/module-math.html[/url] For adding things permanently, I'm not sure, but you can use the sys.path.append(FolerPath) at the beginning of your program for having direct recognition of a module in that folder... If you want your modules to be available in other programs, maybe edit … | |
Re: Maybe make a convention for sentence order: subject - verb - adverb, so that 'you' as an adverb is left as 'you', and not replaced by 'me ' from your dictionary...What do you think? | |
Hello, long time no see... I've been getting along fine with Python lately and I just need to ask you a question: Is it possible to just write to, NOT OVER , an Excel file, in a certain area, using a certain python module?. This way results from an application … | |
Hello again, I have the following situation: I have a script which allows the commands of several instruments. for some of them, their configuration is easy and simply launching the application with [B]os.system()[/B] or through [B]telnetlib [/B]allows me to do what I need. But I have stumbled across something which … | |
Re: Have a looksee here: [url]http://docs.python.org/lib/built-in-funcs.html[/url] The id() function and maybe more, didn't have much time to look for more... Maybe the int of the reference is enough, you can definitely turn that into a string and recover your int or whatever you want.... There might also be 'getattr': [url]http://diveintopython.org/power_of_introspection/getattr.html[/url] Let … | |
Hello, this type of structures are confusing. I hav been working with C for a while but this subtlety is yet unknown. I have come accross such a structure in a program where suposedly it will be used for FIFO management: [CODE=C] typedef struct FIFO_TAG{ struct FIFO_TAG *NextElement; }FIFO; [/CODE] … | |
Hello hello, I am writing to you because I am having trouble obtaining something: I know it should be doable, but can't seem to make an example. I need to be able to run scripts from another central script. And as i' ve been reading, apparently they mustn't be imported … | |
Hello, Here I go again. I have the simplest of ideas...yet cannot seem to find a solution to implement it: [CODE=Python] from socket import * import time BUFSIZE = 256 IP = 'localhost' PORT = 25000 ADDR =(IP, PORT) tcpCliSock = socket(AF_INET, SOCK_STREAM) tcpCliSock.connect(ADDR) tcpCliSock.send('I want a response from you … | |
Re: A socket is one end of a communication channel (between server and client for example). The requests going through the socket may be of many types depending on the protocol that you implement(TCP/IP, HTTP...) If you have the simplest possible example of a server and a client program each having … | |
Re: Normally you can install python2.5 on your machine, this should take care of all your crashes and DLLs...I think... The install packages are : [url]http://www.python.org/download/releases/2.5/[/url] | |
Re: Normally you give an IP and a Port. When you tuple them together, that is an ADDRESS for the bind() method and also for the rest of the methods like connect that you gave in your post. That is valid for C too and I am sure for other programming … | |
Re: Maybe try the [B]exec*[/B] family functions: [url]http://www.python.org/doc/current/lib/os-process.html[/url] Also, the [B]subprocess[/B] module is said to handle such things better, to give you the result of your command,etc... My suggestion: create a batch file and enter your [B]'Test.exe [I]hex_string[/I]'[/B] and pause, and run the script from python, in case you can't work … | |
Re: You can use the raw_input built-in function in your script: [QUOTE] #My script import os #blablabla #... user_path = raw_input('> ') list_of_contents = os.listdir(user_path)#the list of all files and folders in the entered path #Do something with the files in the list obtained here... [/QUOTE] to get a path entered … | |
Hello, I've been swimming with Python for a while, but there are remote field of it which I don't find easy. For example I have made an API from some XML files, and there will be many versions of it. The API is actually several modules either with functions or … | |
Re: You can use the [B]string[/B] module and the [B][I]find()[/I][/B] function (read all about it in the python reference ): [url]http://docs.python.org/lib/node42.html[/url] [B]line.find('text_I_want_to_find') [/B] will normally give you the index of the found pattern, or else -1....I mostly use it to test the existence when parsing with "if line.find('blabla') !=-1:" then I … | |
Re: Hi, I'm not going to install this module but I have a hunch: what if you do: [QUOTE] worddoc.Content.Text = "Hello" worddoc.Content.Text +=" I am a text!" [/QUOTE] instead of your lines. Maybe the Text attribute is only evaluated at the end of the rest of manipulations, before closing the … | |
Re: 2000 processes? You know you need only 100k or you know you will only dispose of that much? For the total of the 2000 processes? Or for each? | |
Re: Make sure that the package name is OpenGL for PyOpenGL and probably import this way: [B]from OpenGL.GL import GL[/B] I don't knowwhere the code in the .chm would have been executed, but I haven't run across any simple 'import gl'... | |
Re: You need a basic client and server ...YOu can get short code anywhere... Here is a great article which explains all the basics and also gives you the shortest possible code for both a client and a server, even a server which can accept several clients using threads... Run server … | |
Re: Isn't this what you want?From: [url]http://docs.python.org/lib/module-array.html[/url] [B]array( typecode[, initializer])[/B] [I] Return a new array whose items are restricted by typecode, and initialized from the optional initializer value, which must be a list, string, or iterable over elements of the appropriate type. Changed in version 2.4: Formerly, only lists or strings … | |
Re: Just as an idea, I knew that UNIX'sCR=0D 0A, and Windows 0A 0A...I have SPE Editor which makes 0A 0A Carriage Returns in python files for example, and PyScripter which makes 0D 0A....But x1A is quite special.. | |
Re: Try and see this... I've been trying similar things after I read it and I had some trouble solving my bugs too... I needed the name of a class in a module in a package to be imported ...I still didn't get there but maybe your case is easier [url]http://technogeek.org/2007/05/29/dynamic-module-loading-in-python-2/[/url] | |
Re: I think we'd all like to know what exactly the problem is: shortening the code? making it more "profesisonal-like", make functions, ....? I think you must do the sum of say, all numbers from 1 to x , multiplied by 3, (sum<1000) and same by 5... Honestly: s = 1*3 … | |
Re: Hi, first of all, Python has modules that allow you to parse. I haven't used SAX, but I've used DOM. Here's the reference for all Structured Markup Processing Tools in Python: [url]http://docs.python.org/lib/markup.html[/url] Then, if your know the structure of your XML, the tags, the attributes, etc, it will be relatively … | |
Re: If I am right, you are opening a pipe and not closing it causes your stop. You need stdout, so grab it and then find the function opposite to Popen (in C for example you have proc = _popen and _pclose(proc)). I don'tknow the subprocess module, but I think this … |
The End.