939 Posted Topics
Re: Please wrap you code in [ code=python ] [ /code ] tags next time. Your algorithm seems fine according to the pseudo code you gave above. So I'm ging to show you how to determine if an integer is odd or even. [code=python] numStr = raw_input("Please enter an integer: ") … ![]() | |
Re: 1. wx.ID_ANY is a constant inside the wx module. It is used to pass into constructors that require an id when you don't want the resulting widget to have any specific id (you're telling it to give the widget any id that is available). Passing -1 in its place does … | |
I noticed a weird thing happening when i use this function. If the page i open is in latin-1 encoding, the bytes returned by this function would have some weird junk characters inserted in various places. However, if i use urlretrieve to fetch the page to disk, there is no … | |
Re: You need establish a pattern to follow in the source code that the team names follow before attempting to retrieve that information. My spanish is very bad, so i can't really help you find that pattern. But it should be pretty easy to find once you know what you are … | |
Re: This problem is really simple: 1. You can loop python strings like anyway other container. 2. You can convert a digit string ("1") to an integer (1) using int() I'm not even going to tell you how to do the rest. Go ahead and prove that you aren't lazy. | |
Re: What you want is a lamp, not wamp Here you go: [url]http://tinyurl.com/9qdkz2[/url] | |
Is there a gui library that has already been ported to python 3? I'm interested in using some of the new python 3 features in the back end for my project. | |
Re: I just implemented a web page class that would help you. It would be awesome if you can use it and give me some feedback (I'm built it for use by others). Let me know if to PM it to you. | |
Re: Naomi, what mariocatch means (I think) is that maybe you can tell us what theory you use for the chatbot's AI and maybe you can help you put it better into code. Either way, we need more details. | |
Re: 1. Get the character array from the C function (you can call C functions with the built-in ctypes module), and use [URL="http://www.wxpython.org/docs/api/wx-module.html#BitmapFromBuffer"]wx.BitmapFromBuffer[/URL] to get a wx.Bitmap object (please take note of the buffer format expected). 2. I don't know. 3. wxPython provides a [URL="http://wiki.wxpython.org/Timer"]wx.Timer[/URL] that may help you with that. | |
Is there a way to add a directory to the locations that python look at when you call __import__ ? I need to import some scripts from a user folder at runtime, and since __import__ doesn't accept absolute file names, I'd like to try this. Copying the script to the … | |
Re: I'll take a little piece of it too: Q3: 'end' is an argument of the Python2.6/3.0 print function. It tells the function what character to append to the output. I believe that by default it appends a newline character ('\n'), so end='' just tells it not to append anything. | |
Re: 2. They're all trash. Using python 3.0, you're going to be hard pressed to find libraries, as most ones haven't been ported over yet (it sucks, I know). I'm stuck using python 2.5 in a project because wxPython doesn't work with 3, and is buggy on 2.6. | |
Re: What you seem to want would require access to some kind of desktop composting engine. Windows didn't introduce a composition engine until Vista (Desktop Window Manager), so you can't actually see what's "behind" your window in earlier versions (at least in my understanding). And desktop composition isn't always guaranteed with … | |
Re: I'm pretty sure the http protocol doesn't allow write access. | |
Re: Actually, having the latest version is the problem here. Downgrade from python 2.6 to python 2.5 and the problem should be fixed. | |
Re: If you are running on .NET 3, you can use Lists, which are very easy: [code=C#] List<String> strings = new List<String>(); //initialise the list strings.Add(str); //Add an item int length = strings.Count; //how many strings are in the list. [/code] | |
Re: I always find myself using Geany whether I'm on Windows or Linux. It isn't built specifically for python, but it adapts well to python code. It's snappy, has some good tools, and doesn't get in your way. | |
Re: If you have Visual Studio installed, the redistributable dlls are in the VC\redist\[architecture]\*CRT folder in your visual studio program files. Consult the documentation for information on which libraries you are allowed to redistribute. | |
Is there a function in the Windows API I can use to get recent files opened by my application instead of just setting them? (Before you tell me; yes, I know it won't be hard to do myself.) | |
Re: On Windows I would use wmp, on Linux I would use gstreamer. Of course, we can't [I]really[/I] help you if you don't tell us more. | |
Re: No, they're not. Ironically, gasoline and diesel are both made from petroleum, so they both should be called petrol. Gas prices haven't gone down here. I believe it's because the government subsidizes the cost heavily. | |
Re: Isn't windows defender built in? The most you can do is disable it in the security center. I think that stops it from running at start-up. | |
Re: [QUOTE=Ancient Dragon;491580]I'll take a couple of these: [URL="http://mywiki.ws/The_World's_Most_Expensive_and_Useless_Things"][/URL][/QUOTE] :twisted: | |
Re: [QUOTE=platinum8;697892]I would like to become a player[/QUOTE] You mean like someone who isn't monogamous, unbeknown to his sex partner? | |
| |
Re: Of course they can, and it's no magic. If you're spanking new to php/mysql, you might want to consider a few warm-ups first before delving into this. Then, you can tackle them individually as smaller challenges (contact list importer, message system, friends list...) Alternatively, you can do a web search … | |
Re: I don't know about limiting the paper size. However, removing the header and footer from the printed document can be done with some CSS: Add this to your <head>: [code=html] <style media="print" type="text/css"> .no-print{display:None} </style> [/code] Then add [icode]class="no-print"[/icode] to your header/footer containers. Since the no-print style is targeted at … | |
Re: Use code tags. Shouldn't [code=html]<a href="action.php?id='.$num.'">Text to be displayed</a>[/code] be [code=html]<a href="action.php?id=<?php echo $num; ?>">Text to be displayed</a>[/code] ? I ask because you appear to be concatenating $num outside of a PHP block. | |
Re: [url]http://www.php.net/urldecode[/url] | |
Re: This constant back and forth about whether global warming is a myth or not is really getting old (a little mean spirited too). If being right is so important to you, I recommend you resolve to the following: 1. Stop arguing. 2. Wait for a few days/months/years according to whatever … | |
Re: You Are 45% British You're about as British as a half hearted Anglophile... in other words, a piss poor Brit. If you are indeed from Britain, you probably consider yourself a European more than anything else. If you're trying to pass for a Brit, you're going to have to try … | |
| |
Re: Try this: [url]http://www.php.net/exif_read_data[/url] | |
Re: When I try to access these specific files directly: [code]SpryAssets/SpryTabbedPanels.js SpryAssets/SpryTabbedPanels.css[/code] I get [icode]The system cannot find the file specified.[/icode]. So maybe you have not uploaded [I]all[/I] the files. | |
Re: Of course, Romasio, you fail to meet the OP's requirements. Let's not over-complicate the scenario. I would advise the OP to use one of the methods suggested in [URL="http://www.daniweb.com/forums/post511450-2.html"]#2[/URL]. | |
Re: While you can wrap at a certain amount of characters in plain text emails, I'm not certain about the ability to wrap at exactly 400 pixels. What you can do is send and html email instead, and put the text inside a container that is set to 400 pixels wide. | |
Re: Picking up an English text book could drastically improve your life. | |
Re: Suggestion: check the previous line and make sure its statement was terminated correctly. The line [icode]if (isset($_GET['p'] && $_GET['p'] == "login"){}[/icode] parses fine on my server. | |
Re: Oh my God man. Seriously, 10 seconds is beyond reach | |
Re: Add this to the page that URL1 points to: [code=javascript] window.location = url2; //the url you want to redirect to. [/code] | |
Re: I don't know flash well, but I suspect you'd have to use some flash ActionScript to do the counting for you. | |
Re: I wouldn't think so. This should be fairly easy for a competent programmer. | |
The End.