|
m0nk3yz posted:Interesting? It's pure awesome and win. I spoked to a few people about it today, and it's very very real. I could see this supplanting CPython-trunk quickly should they hit the goals for this year. So jealous of people already at PyCon, one more day of class then I come home and join you guys no Friday. Looking forward to your talks, perhaps I'll see you there.
|
# ? Mar 26, 2009 04:41 |
|
|
# ? May 12, 2024 19:54 |
|
I cry for my lack of PyCon, again. gently caress the accounting department, have fun guys.
|
# ? Mar 26, 2009 05:03 |
|
king_kilr posted:For those who are interested in VM work or just want their Python faster this seems to be an intersting project: http://code.google.com/p/unladen-swallow/ It would be awesome if they met all these goals (JIT & no GIL?!), but the pessimist in me says they'll lose steam before they reach any real results. I hope they prove me wrong.
|
# ? Mar 26, 2009 05:13 |
|
Scaevolus posted:It would be awesome if they met all these goals (JIT & no GIL?!), but the pessimist in me says they'll lose steam before they reach any real results. According to their site, they've got a release out and it's already 20% faster than cpython.
|
# ? Mar 26, 2009 05:17 |
|
Janin posted:According to their site, they've got a release out and it's already 20% faster than cpython. Where did you find that number? Their benchmark page appears devoid of benchmarks.
|
# ? Mar 26, 2009 13:50 |
|
Zombywuf posted:Where did you find that number? Their benchmark page appears devoid of benchmarks. http://code.google.com/p/unladen-swallow/wiki/Releases code:
|
# ? Mar 26, 2009 14:05 |
|
Scaevolus posted:It would be awesome if they met all these goals (JIT & no GIL?!), but the pessimist in me says they'll lose steam before they reach any real results. I too am a forever skeptic, however it appears that all of the group members are Google employees, and one of their members in a Cpython core contributer, so there's hope!
|
# ? Mar 26, 2009 16:13 |
|
Okay, I think I am retarded. I'm trying to pick up programming as a hobby and at the recommendation of Ask/Tell I am learning Python. I downloaded it last night, played around in IDLE for a half-hour, copy/pasted some stuff into it from the web to see what would happen, etc and it was cool. Fast forward to this morning and now I have brickwalled really really hard because of a problem that I can hardly even comprehend the existence of. IDLE will not run anything past the first line. I didn't have this problem yesterday, so I have zero clue what is causing this. For instance: code:
So... what am I doing wrong?
|
# ? Mar 26, 2009 16:30 |
|
Phrog posted:So... what am I doing wrong? It's evaluating the first line, which specifically waits for user input. So it then waits until it sees the next newline (normally the user would type in their name and hit enter) and once it does it stores that into name. So I bet if you just typed name you'd see "print 'Hi', name"
|
# ? Mar 26, 2009 16:41 |
|
Phrog posted:So... what am I doing wrong? Copying and pasting (what No Safe Word said ^^^) code:
code:
|
# ? Mar 26, 2009 16:43 |
|
Another Tkinter question: I want to display 4 buttons in a small window, each equal size, two packed against the top and filling the horizontal space, and two packed against the bottom. But, I'm not sure how to combine w.pack(side=LEFT) and w.pack(side=BOTTOM) into BOTTOM LEFT. The only way to stack buttons vertically is to use w.pack() with no args, but I need args to have some of them be horizontally stacked.
|
# ? Mar 27, 2009 20:55 |
|
Kire posted:Another Tkinter question: I want to display 4 buttons in a small window, each equal size, two packed against the top and filling the horizontal space, and two packed against the bottom. But, I'm not sure how to combine w.pack(side=LEFT) and w.pack(side=BOTTOM) into BOTTOM LEFT. Pack is not a very flexible way to manage your layout. Look into using grids
|
# ? Mar 28, 2009 00:12 |
|
I've got a question for you Python experts about a program I'm writing: I'm using matplotlib, SciPy, and PyWin32. Is it possible to make a single package out of my program plus these modules that will set itself up? My program is just a single .py, plus an .exe and some text files. If this is possible in Windows, is it also possible in OS X (without PyWin32, of course)? If it was possible to also include Python itself in this package that would be really nice, but it's not quite as important. I could just include a readme saying install this, then this, then this, and so on, but it would be a lot more convenient if it was just one installer (especially if I could make it a silent installer). This is the first real app I've ever written, so I'm a little lost.
|
# ? Mar 28, 2009 04:24 |
|
py2exe and py2app Will pack up a python program into a .exe and a .app. I've never personally used them but i do believe those are the standard for packing like that. If you don't want to do that, you should be able to use something like easy_install to package your product up, and then have it list dependencies. This will then download the things they don't already have, and use the things they already have installed on their system. Although im not sure if easy_install works in windows or Mac, i've only used it in Linux.
|
# ? Mar 28, 2009 06:57 |
|
How do I reference and use a object( an integer) in a function that is defined outside of it? For example: code:
|
# ? Mar 28, 2009 07:02 |
|
darknife posted:How do I reference and use a object( an integer) in a function that is defined outside of it? code:
Haha owned son! Though you added the cautionary tale. vvvv pokeyman fucked around with this message at 07:46 on Mar 28, 2009 |
# ? Mar 28, 2009 07:39 |
|
Because by using the variable, you're declaring guesses in the local scope. You need to say guesses is global.code:
EDIT : Too slow!
|
# ? Mar 28, 2009 07:40 |
|
hlfrk414 posted:Because by using the variable, you're declaring guesses in the local scope. You need to say guesses is global. Well, I know that using the same name is not good practice. I don't do that. It was just an example where I messed up on the names. And hlfrk; it doesn't work. The script won't run.
|
# ? Mar 28, 2009 07:54 |
|
WickedMetalHead posted:py2exe and py2app Will pack up a python program into a .exe and a .app. I've never personally used them but i do believe those are the standard for packing like that. Will py2exe and py2app work for modules that aren't part of the standard Python install?
|
# ? Mar 28, 2009 07:54 |
|
darknife posted:Well, I know that using the same name is not good practice. I don't do that. It was just an example where I messed up on the names. Ah, missed the next error in your code. You can't define a variable called guesses and then define a function called guesses as well. Well, you can, but it simply keeps the last assignment, which is assigning the function definition to the name guesses. Python can't tell the difference between the two (and for good reason.) So rename one or the other and it will work.
|
# ? Mar 28, 2009 08:42 |
|
darknife posted:Well, I know that using the same name is not good practice. I don't do that. It was just an example where I messed up on the names. Don't rewrite your code and ask us to debug that. Put your code in (or use pastebin or something if it's too long) so we can help you out. No point introducing yet another layer of abstraction.
|
# ? Mar 28, 2009 11:11 |
|
BeefofAges posted:Will py2exe and py2app work for modules that aren't part of the standard Python install?
|
# ? Mar 28, 2009 20:07 |
|
Bouquet posted:py2exe bundled up pyglet for me with no problem. It basically follows all the import statements and grabs things until there are no dependencies left. I am not sure about py2exe's ability to bundle things like icons/art assets/etc. I have not tried py2app, but I imagine it should be functionally pretty similar. Great, I'll have to try them on Monday. My program doesn't have a gui, so I'm not concerned about art assets or anything like that.
|
# ? Mar 28, 2009 20:10 |
|
Any nose users: I'm trying to import a module at runtime with __import__, I can make calls to the imported module (see m.hello()), but nose complains saying "OSError: No such file" when nose.runmodule() is executed.code:
epswing fucked around with this message at 21:41 on Mar 28, 2009 |
# ? Mar 28, 2009 21:31 |
|
For those curious as to why PyCon is the best conference ever, or wanting to see just what Mr. Monkeyz is up to: http://pycon.blip.tv/#1940650
|
# ? Mar 29, 2009 05:59 |
|
epswing posted:Hi. Anyway, I stepped through nose.runmodule() with pdb to find out what was going on. The issue is that you have something in the argv; run the script passing no arguments and it'll work just fine. Nose is examining the argv and doing something with it. BeefofAges posted:Will py2exe and py2app work for modules that aren't part of the standard Python install? py2app does, anyway. It even rewrites all of the python extension modules and the dylibs they depend on using macholib to make sure they work in the app bundle. It's pretty crazy. You might also have to use macports to install the development version of macholib, because the version that comes bundled on 10.5 isn't new enough for some dylibs. darknife posted:Also note that checking == True or == False is not only redundant, but can lead to false negatives.
|
# ? Mar 29, 2009 07:55 |
|
Habnabit posted:Hi. Thanks for taking a look, I appreciate it. Edit: Ahaha I just got the "" The nose guys might say something, if anyone's interested http://code.google.com/p/python-nose/issues/detail?id=247 Of course there's something in argv, I want to load an argv-specified module at runtime, that's the point So...what can I do here. Maybe clean out argv (if it's modifiable?) before it hits nose.runmodule()? Thanks again. epswing fucked around with this message at 16:18 on Mar 29, 2009 |
# ? Mar 29, 2009 16:12 |
|
I'm having an odd problem with IPython: the colors that it uses to print up code (in error and introspection) are unreadable in my terminal. So at first I did the usual - edited my settings in .ipython/ipytonrc. This had no effect. After some investigation, I find that you're now supposed to use .ipython/ipy_user_conf.py. Fine, edit that. Still has no effect. I'm baffled at this point. Any idea where I can look for or change the setting?
|
# ? Mar 31, 2009 11:29 |
|
I have an issue with getting Tkinter to execute a command on clicking a button widget:code:
|
# ? Mar 31, 2009 19:28 |
|
Kire posted:When I run it, it will print "Today bday happened" "Today occurence happened" and then the button for day1 or day2 won't print the message again when i press it, they just go dead and don't call the function. I don't want it to print anything when the program is run until the buttons are pressed, and then I want it to print the appropriate message. What's the issue? code:
Also, you have to use win.mainloop() to allow the application to remain open and listen for events.
|
# ? Apr 1, 2009 00:00 |
|
Is anyone familiar with this error?code:
(Before you ask why I'm using 2.5 and not 2.6, it's so that I can use matplotlib, which only supports 2.5) BeefofAges fucked around with this message at 07:44 on Apr 1, 2009 |
# ? Apr 1, 2009 07:27 |
|
BeefofAges posted:Is anyone familiar with this error? matplotlib works just fine for me on 2.6. Maybe it's that there's only binaries for up to 2.5.
|
# ? Apr 1, 2009 10:45 |
|
Modern Pragmatist posted:
Thanks, that worked.
|
# ? Apr 1, 2009 17:14 |
|
I'm trying to do some basic socket programming using Python 2.6. The data being sent is a simple string from an embedded device I'm working on. When I run the following code though, it only prints "Let's get this party started right...", and doesn't show the rest of the debug prints. When I hit Control+C to break the program, it then prints out the next two lines...what the hell is going on? (Run on Mac OS X)code:
|
# ? Apr 1, 2009 22:23 |
|
Take the commas off the ends of your print statements, they don't belong there.
|
# ? Apr 2, 2009 03:48 |
|
fge posted:Take the commas off the ends of your print statements, they don't belong there. what if he doesn't want newlines with his prints? if that is a direct copy paste, s.listen(1); <--- that may be acting weird, but I am not sure.
|
# ? Apr 2, 2009 05:28 |
|
deimos posted:what if he doesn't want newlines with his prints? I'm running his code, and those print lines with the commas after them won't show up; they only print after the commas are removed. I'm pretty sure he needs to use sys.stdout.write() or whatever it is if he wants to print without a newline.
|
# ? Apr 2, 2009 05:44 |
|
Try calling sys.stdout.flush() after your print statements, perhaps your stdout's got some sort of auto-flush on newlines behavior.fge posted:Take the commas off the ends of your print statements, they don't belong there. Commas just prevent newlines, they're fine.
|
# ? Apr 2, 2009 06:27 |
|
Janin posted:Commas just prevent newlines, they're fine. Yeah you're right. The commas work on my machine in a a different file, but not in his code for some reason. Weird.
|
# ? Apr 2, 2009 06:50 |
|
|
# ? May 12, 2024 19:54 |
|
I've been getting interested in Mono recently - I'm primarily OSX and Linux so the Windows-bound .Net just wasn't any good - and so I begane to wonder what the situation is with Python and Mono / etc. This means IronPython, yes? And can I run IronPython on a non-Windows platform? Their site didn't help me in answering this.
|
# ? Apr 2, 2009 09:31 |