132 Posted Topics
Re: wow, i never knew how that worked. I always use the symbolic method (`chmod +rw`). So it's just a binary chart basically. R | W | X = 4 | 2 | 1 ----------------------- x`| x | = 4 + 2 = 6 that's awesome, and good to know. | |
Re: what is the size? and what kind of numbers are in the array (what does it contain)? | |
Re: that was just straight-up lazy. > does not have time to search for I was too busy > I wish you to help me in solving this homework translation: > hey I want to be a developer, but I don't want to learn how to develop. > will you do … | |
Re: could the problem be in the raspberry pi and gpio pins? does manually editing the sys/class/gpio related files work correctly? | |
![]() | Re: i saw a typo in your code. if its just from your post then I understand. typo: def stop(self): active_queues.remove(self.mialbox) # <-- MIALBOX on stop function instead of MAILBOX self.mailbox.put("shutdown") |
I would like to create my title image out of pure CSS3, but there is one feature that I'm not quite sure I can even do. Plus, the features that I know are possible don't seem to mix well. I don't know CSS very well, at least anything past the … | |
I was trying to edit a post that I made earlier, and the "Edit Post" link brought up the text edit mode, but did not have any "Save" or "Submit". Only "Cancel". Also, the "Edit Post" button was still active. When I clicked it the second time it just "refreshed" … | |
I know there are plenty of other places to get info or code snippets for **microcontroller programming** (especially **arduino**). Out of all the boards/sites I visit, I like the **DaniWeb** format the most. I was wondering if a **microcontroller** or **arduino** section could have a home here. Or would that … | |
I've added the necessary registry key to have my app run when windows loads: [B]Hkey_Local_Machine\Software\Microsoft\Windows\CurrentVersion\Run[/B] [B]MyProgram[/B] = [B]c:\MyDir\MyProgram.exe[/B] [I]..I've also tryed adding it to the Programs\StartUp folder.[/I] My app still won't load when windows does. Other apps do, and I was wondering what might be preventing my app, and [U]only … | |
Re: I almost wasn't going to reply to this, seeing as I don't consider myself a python expert and my advice may not count as much as other people's. It sounds like you might find an open-source project to work on. Not anything big, because I don't think the developers at … | |
Re: When I was researching on how to get the type of an object everything I read said "don't do type(), use isinstance() instead". Videos from people like Guido van Rossum, or others with a high standing in the python community always drop little comments like: "type() would work here, but … | |
Re: activate focus to the textbox after keypress. msdn instructions: http://support.microsoft.com/kb/822493 | |
Re: Not sure exactly what you're going for, but this is one way using xml.etree.ElementTree: import xml.etree.ElementTree as etree tree = etree.parse('My_XML_File.xml') for node in tree.getiterator(): if 'MessageId' in node.tag or 'ContentTitleText' in node.tag: # (tagname) (data) print node.tag + ': ' + node.text | |
Re: that `/` after videohp is an invalid url. I tested your code several different ways. `http://www.google.com/videohp/` doesn't open in my browser. `http://www.google.com/videohp` opens with urllib2 and a browser. for site in lst_: try: home = opener.open(site) except urllib2.HTTPError as exHttp: print "Http error: " + site except urllib2.URLError as exUrl: … | |
Re: one thing that i do to trim code down a little is leave out the == or != when i know I will be dealing with small integers, like: if proc.poll(): # non-zero return from process equates to true print("failure") else: # zero return from process equates to false print("success") … | |
Re: no module named DailyExpenses, pretty much means what it says. Something is definately wrong with one of the script names/locations. You have DailyExpenses.py or .pyc in the same folder as DailyExpensessave.py ? Not in a subfolder or anything? | |
Re: you said python right? while (something < otherthing): [do this stuff] [down here] and case switches become if, elif, & else. if (data): [do something with data] elif (timeout): [do something if timed out] else: # no data, no timeout, what do we do? [do something else] ...no offense, i … | |
Re: import os # <-i put these at the top of script except for rare occasions # make sure the file is there, could've entered bad card number if os.path.isfile(os.path.join(cardno, '.txt')): with open(os.path.join(cardno, '.txt'), 'r') as f: value = f.readline() try: # value was read in as string, casting to float … | |
This is a piece of code I wrote a long time ago when I saw someone make a "guess this scrambled word" game. The program didn't have to unscramble the word to know what the answer was, but I wanted to do it anyways. I wanted an algorithm that could … | |
Re: I experienced this too, pyTony reported it I think. I posted a long code snippet and when I went to edit it I couldn't get past about the 221st line. | |
I started using Python a few weeks ago, something finally clicked and I started writing tools for my personal use. I started writing something with a GUI using GTK and the code lines started multiplying rapidly, so I thought to myself "Am I commenting my source to death? How many … | |
This is a script that was supposed to be very basic, just running a command with my scripts arguments attached. I didn't realize that if user 'cj' opens firefox, when user 'root' does '**firefox -new-tab**' it doesn't work. Firefox will just open a new window, and thats exactly what I … | |
Re: i've only been using Python for a couple weeks now, I wrote a program in tKinter and it was okay (i used xrope as a gui designer). The GUI looked dated. But then I stumbled upon Glade 3 and GTK. It takes some getting used to, because I'm coming from … | |
Re: I don't know if this will help you or not, but I know **Python** is possible on the **iPhone** because I have it. I had to jailbreak my **iPhone**, and download **Python** from **Cydia**. It works well for command-line stuff, but as far as making a program with a **GUI** … | |
Re: I'm not sure what you mean by this, but maybe this will help? [CODE=VB]Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim fDLG As New OpenFileDialog fdlg.Title = "open" fdlg.InitialDirectory = "c:\" fdlg.Filter = "document files(*.RTF)|*.RTF|document files(*.doc)|*.doc" fdlg.FilterIndex = 1 fdlg.RestoreDirectory = True 'User Didn't Cancel? … | |
Re: I'm not exactly sure what you meant by this question. But from what I've gathered I wrote this bit of code. I hope it helps you. [code=vb]Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'I'm adding these items to the listbox, i don't … | |
Re: [code=vb] ' BASIC IDEA FOR CYCLING THRU PICTURES IN A DIRECTORY -Cj Welborn ' You might want to check the file extension to make ' sure its a valid file. like: ' If LCase(Strings.Right(sPictureFiles(iCurrentPicture),3)) <> "jpg" Then ' Msgbox("Wrong Format!") ' End If ' ....or use Select Case LCase(Strings.Right............ ' … ![]() | |
Re: I've been told that Express editions aren't good for publishing. they're more of a learning tool... | |
Re: [code] 'Get Executable path (may also be FireFox.exe or any other browser Dim sExePath as string = "C:\Program Files\Internet Explorer\iexplore.exe" 'Get URL to open, may be TextBox1.Text, or "www.google.com" Dim sURL as string = TextBox1.Text 'Start Process with URL as argument (Just like using command line argument to open URL) … | |
I was looking for a piece of code to show all users logged on to my system. What I mean by that is: only 1 person is ever truly logged in at my house, but there are sometimes other users "logged in" with programs running under their account. This is … |
The End.