132 Posted Topics

Member Avatar for cguan_77

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.

Member Avatar for chriswelborn
1
195
Member Avatar for wschamps42
Member Avatar for vmanes
0
248
Member Avatar for Samerases

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 …

Member Avatar for B0716L
-2
137
Member Avatar for syfr

could the problem be in the raspberry pi and gpio pins? does manually editing the sys/class/gpio related files work correctly?

Member Avatar for Gribouillis
0
961
Member Avatar for carlpike

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")

Member Avatar for chriswelborn
0
159
Member Avatar for chriswelborn

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 …

Member Avatar for <M/>
0
272
Member Avatar for chriswelborn

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" …

Member Avatar for Dani
0
843
Member Avatar for chriswelborn

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 …

Member Avatar for chriswelborn
0
318
Member Avatar for chriswelborn

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 …

Member Avatar for chriswelborn
0
528
Member Avatar for longtomjr

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 …

Member Avatar for longtomjr
0
198
Member Avatar for vegaseat

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 …

Member Avatar for HiHe
3
641
Member Avatar for t2nator

activate focus to the textbox after keypress. msdn instructions: http://support.microsoft.com/kb/822493

Member Avatar for TnTinMN
0
125
Member Avatar for tunisia

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

Member Avatar for tunisia
0
460
Member Avatar for inuasha

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: …

Member Avatar for snippsat
0
278
Member Avatar for alaa sam
Member Avatar for Nutster
0
136
Member Avatar for Octet

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") …

Member Avatar for Octet
0
180
Member Avatar for bdheeraj

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?

Member Avatar for sneekula
0
580
Member Avatar for welshly_2010

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 …

Member Avatar for vegaseat
0
7K
Member Avatar for fheppell

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 …

Member Avatar for Lucaci Andrew
0
162
Member Avatar for chriswelborn

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 …

Member Avatar for Reverend Jim
0
1K
Member Avatar for mike_2000_17

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.

Member Avatar for Dani
0
281
Member Avatar for chriswelborn

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 …

Member Avatar for chriswelborn
2
368
Member Avatar for chriswelborn

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 …

Member Avatar for chriswelborn
0
314
Member Avatar for veledrom

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 …

Member Avatar for HiHe
0
2K
Member Avatar for Ene Uran

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** …

Member Avatar for chriswelborn
1
148
Member Avatar for ananth3125

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? …

Member Avatar for chriswelborn
0
126
Member Avatar for khizer03

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 …

Member Avatar for chriswelborn
1
168
Member Avatar for ibpet11

[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............ ' …

Member Avatar for Unhnd_Exception
0
411
Member Avatar for maggoteer

I've been told that Express editions aren't good for publishing. they're more of a learning tool...

Member Avatar for GeekByChoiCe
0
107
Member Avatar for renzlo
Member Avatar for saj_amo

[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) …

Member Avatar for chriswelborn
0
928
Member Avatar for chriswelborn

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 …

0
218

The End.