|
MEAT TREAT posted:And it is already cemented in every "Enterprise" system. Python missed that boat. You know Python predates Java...
|
# ? Apr 23, 2010 02:36 |
|
|
# ? May 24, 2024 18:57 |
|
A A 2 3 5 8 K posted:Java was marketed by a multi-billion dollar company and was associated with a lot of stupid hype. MEAT TREAT posted:And it is already cemented in every "Enterprise" system. Python missed that boat.
|
# ? Apr 23, 2010 02:38 |
|
ThatNateGuy posted:Marketing and recognition were pretty much the same conclusion I came to myself. Do you guys think Python has all the necessary potential? Linux and Firefox found great success as a result of the community's actions. Can the same thing happen with Python? Not until python performs on par with java on CPU intensive tasks, which it doesn't always.
|
# ? Apr 23, 2010 02:47 |
|
king_kilr posted:You know Python predates Java... That doesn't have anything to do with what I said. Python missed the chance to be the "Enterprise" language. ThatNateGuy posted:Marketing and recognition were pretty much the same conclusion I came to myself. Do you guys think Python has all the necessary potential? Linux and Firefox found great success as a result of the community's actions. Can the same thing happen with Python?
|
# ? Apr 23, 2010 02:48 |
|
I used to write Java, and the less Java-like Python stays, the better.
|
# ? Apr 23, 2010 03:20 |
|
ThatNateGuy posted:What's the reason Python hasn't become as big as say Java? (2) Java has a solid spot in the "embedded web application that can be run as a stand-alone executable" niche Python is an absolute nightmare when it comes to #1. Especially when it comes to distributing to mac users. This problem is common with all interpreted languages, don't get me wrong, but it definitely weighs in heavily when I choose a language for a minor project I intend on distributing to the masses. Number 2 is Java's biggest strength over other languages, and it's really the only time I'd use Java for a personal project. At the end of the day they are two different tools best suited for different jobs. Edit: I am not a guru at all. Khorne fucked around with this message at 07:29 on Apr 23, 2010 |
# ? Apr 23, 2010 06:27 |
|
Appreciate all the info, ye gurus.
|
# ? Apr 23, 2010 06:44 |
|
Khorne posted:(1) Java applications are easy to distribute to the end user Wrong wrong wrong.
|
# ? Apr 23, 2010 13:52 |
|
I am aware of py2exe. I've used it. It's not bad for a reasonably sized project, but it leaves a lot to be desired for projects you code in a few hours. Annoying issues crop up like some users having dependency issues. I've also used PyQt. Not going there.
|
# ? Apr 23, 2010 14:45 |
|
Khorne posted:I am aware of py2exe. I've used it. It's not bad for a reasonably sized project, but it leaves a lot to be desired for projects you code in a few hours. Annoying issues crop up like some users having dependency issues. You're arguing about Python as an alternative to Java. No one writes and distributes tiny Java projects either.
|
# ? Apr 23, 2010 14:47 |
|
Thanks for the feedback everyone; no real surprises, but it's good to have data from actual users versus what my gut said.
|
# ? Apr 23, 2010 15:23 |
|
Ok practical question: what's the most efficient way for me to go about getting something like pushd added to the stdlib?
|
# ? Apr 23, 2010 17:32 |
|
I'm trying to edit a huge batch of java files. My basic goal is to edit them so that all of the instance variable declarations are at the top of the file rather than the bottom. I've done txt file editing in C before and some very basic bash scripting, but this seems more complicated. I've been told that Python would be a good way of going about it. My basic logic would be to scan the file line by line for any lines which contain public/private/protected as the first word, and which do not have any '(' in order to exclude constructors and methods. I would cut these lines and store them in an array. Then, I would go through the file again, and when I hit the first line containing a '{', I would go to the line below it, insert as many new lines as there were entries into my array, and then paste those entries into those new lines. Does this seem like a relatively doable task in Python given what I've described?
|
# ? Apr 23, 2010 17:37 |
|
I'd like to write a program that watches a folder for new files (jpg or raw images specifically) and updates the metadata with some additional information. I'd like for it to remember what the most recently updated file was and report if any files were added while the program wasn't running. Whats the best way to set up dynamic folder watching in python? edit: Incidentally, I've already read this and I'm a bit worried with some of his suggestions. I was wondering if anyone else had some ideas Farrok fucked around with this message at 18:27 on Apr 23, 2010 |
# ? Apr 23, 2010 18:24 |
|
Avenging Dentist posted:Ok practical question: what's the most efficient way for me to go about getting something like pushd added to the stdlib? Start with the python-ideas/python-stdlib-sig mailing lists.
|
# ? Apr 23, 2010 19:13 |
|
Farrok posted:I'd like to write a program that watches a folder for new files (jpg or raw images specifically) and updates the metadata with some additional information. I'd like for it to remember what the most recently updated file was and report if any files were added while the program wasn't running. Whats the best way to set up dynamic folder watching in python? Well, the first method can be implemented more cleanly with the set data type implemented in 2.4.
|
# ? Apr 23, 2010 22:48 |
|
Has anyone had success building python 2.6 on Solaris? From what I'm turning up on google, it seems like no one is using python on solaris past version 2.4, and I'm really hoping this isn't the case.
|
# ? Apr 24, 2010 01:21 |
|
Python 2.4, 2.5 and 2.6 are all available on OpenSolaris. In fact, 2.6 is the default version of /usr/bin/python edit: for Solaris 10, Google turned up this: http://blogs.everycity.co.uk/alasdair/2009/01/compiling-python-26-on-solaris-10/
|
# ? Apr 24, 2010 01:33 |
|
tripwire posted:Has anyone had success building python 2.6 on Solaris? From what I'm turning up on google, it seems like no one is using python on solaris past version 2.4, and I'm really hoping this isn't the case. I've built it on Solaris without any trouble. Grab the build toolchain and go, that's really all there is to it. The only external dependency was OpenSSL, but you can build without it if you don't need it.
|
# ? Apr 24, 2010 02:57 |
|
spankweasel posted:Python 2.4, 2.5 and 2.6 are all available on OpenSolaris. MaberMK posted:I've built it on Solaris without any trouble. Grab the build toolchain and go, that's really all there is to it. The only external dependency was OpenSSL, but you can build without it if you don't need it. Thanks guys, I gave it an initial try and gave up after not too much effort when it started barfing errors on me during the attempts to compile, it's good to know that other people haven't encountered much trouble building it.
|
# ? Apr 24, 2010 03:16 |
|
Avenging Dentist posted:Ok practical question: what's the most efficient way for me to go about getting something like pushd added to the stdlib? More details Actually, first - scope. If it's an addition to an existing stdlib module; then identifying the lead of that module is possible (and propose it to them). If there is no lead, and it's small, file a bug, with tests and docs to the tracker. +nosy me on it (so I can watch/advocate). If no one responds quickly, bring it up to python-dev (I'd give it 1 week). If it's larger (all new module) you should write a PEP (I can help) and send it to stdlib-sig; where I can also help out, once the discussion is "done" (should be quick) we can send it to python-dev for acceptance. Then it's code, test, docs and done.
|
# ? Apr 24, 2010 05:34 |
|
The only time I've ever come across a problem in python that I felt i could contribute was a few weeks ago I realized there was no way to get the maxlength value of a deque instance. It was either a missing feature that needed to be added, or the feature did exist, but just wasn't documented. Either way, I was like "yay i get to contribute something back". I went over to python.org and found out that literally it was fixed just days earlier, and will be added to 2.6.5 (or the latest beta of 2.7)... i looked around all the other bugs and not a single one I could even imagine where to even begin fixing... edit: also, one thing that really sucks about the python-ideas mailing list is that the only way to participate is to have it send you tons of email every day. It's not like other mailing lists out there which have a web interface (google groups or otherwise). I had an idea one that I was going to post to python-ideas but couldn't be bothered to remember to remove myself from the mailing list after my thread phizzled out. nbv4 fucked around with this message at 06:51 on Apr 24, 2010 |
# ? Apr 24, 2010 06:47 |
|
m0nk3yz posted:More details Where is that information? (The module would be os.) pushd would basically be used with "with" statements and on entry you'd cd into some dir and on exit you'd cd back to the old one. I always find it really annoying that I have to do that manually, especially when there might be exceptions thrown. Avenging Dentist fucked around with this message at 17:54 on Apr 24, 2010 |
# ? Apr 24, 2010 17:51 |
|
If I'm using a TCP socket with a server, there's not any way to tell if the server died ungracefully, correct? I'm guessing I need the server to send a heartbeat packet every so often to make sure it's still alive... Sorry if this is retarded, as I'm currently unfamiliar with sockets.
|
# ? Apr 24, 2010 19:56 |
|
Avenging Dentist posted:Where is that information? (The module would be os.) pushd would basically be used with "with" statements and on entry you'd cd into some dir and on exit you'd cd back to the old one. I always find it really annoying that I have to do that manually, especially when there might be exceptions thrown. I'd just file a bug, ideally with a different name though "pushd" isn't at all obvious to me.
|
# ? Apr 24, 2010 21:40 |
|
king_kilr posted:I'd just file a bug, ideally with a different name though "pushd" isn't at all obvious to me. pushd is because thats the name of the command in *NIX to do just that on the cli
|
# ? Apr 24, 2010 21:56 |
|
Profane Obituary! posted:pushd is because thats the name of the command in *NIX to do just that on the cli Oh. I run Linux as my full time OS and I had no idea.
|
# ? Apr 24, 2010 22:58 |
|
Profane Obituary! posted:pushd is because thats the name of the command in *NIX to do just that on the cli Windows, too.
|
# ? Apr 24, 2010 23:50 |
|
So Zed Shaw's been working on an introductory Python book. http://sheddingbikes.com/posts/1272132621.html
|
# ? Apr 24, 2010 23:59 |
|
tripwire posted:Windows, too. holy poo poo i never tried it on windows
|
# ? Apr 25, 2010 00:10 |
|
shrughes posted:So Zed Shaw's been working on an introductory Python book. Haha this rules: "Because this is a simple book we’ll assume you’re using a Mac OSX computer."
|
# ? Apr 25, 2010 01:41 |
|
tripwire posted:Windows, too. This owns. Too bad the rest of the Windows command line is atrocious.
|
# ? Apr 25, 2010 04:26 |
|
A A 2 3 5 8 K posted:Haha this rules: "Because this is a simple book we’ll assume you’re using a Mac OSX computer." Zed started writing yesterday, I'm pretty sure he'll be adding more targets as he goes.
|
# ? Apr 25, 2010 05:44 |
|
Avenging Dentist posted:This owns. Too bad the rest of the Windows command line is atrocious. I've never used this(dedicated linux user) but a friend raves about it. http://en.wikipedia.org/wiki/Windows_PowerShell
|
# ? Apr 25, 2010 08:44 |
|
Avenging Dentist posted:Where is that information? (The module would be os.) pushd would basically be used with "with" statements and on entry you'd cd into some dir and on exit you'd cd back to the old one. I always find it really annoying that I have to do that manually, especially when there might be exceptions thrown. http://svn.python.org/view/python/branches/py3k/Misc/maintainers.rst?revision=80328&view=markup Yeah, I know - intuitive, right? In any case, for this - file a bug with a patch+docs/tests. It's an enhancement, my gut says it makes sense in os.path.
|
# ? Apr 25, 2010 17:05 |
|
couldn't os.chdir just return the right object for the with statement: i.e with os.chdir('fooo'): ....
|
# ? Apr 25, 2010 17:11 |
|
I'm getting an error when trying to read/write files. destination= open( 'PersonTest2.txt', 'w' ) source= open( 'PersonTest.txt', 'r' ) I'm running my script in NetBeans 6.8 and have the file PersonTest.txt in the project folder. I'm also doing this on Windows 7 rather than a Linux OS. If I try to do a write on a nonexistent file named PersonTest2.txt, i.e. try to create a file for writing, I get the error message: >>>(13, 'EACCES', 'PersonTest2.txt')["IOError: (13, 'EACCES', 'PersonTest2.txt') If I switch it and try to open the file PersonTest.txt for reading, I get the error message: >>>(2, 'ENOENT', 'PersonTest.txt')["IOError: (2, 'ENOENT', 'PersonTest.txt') No idea what I'm doing wrong.
|
# ? Apr 25, 2010 19:46 |
|
armed2010 posted:I'm trying to edit a huge batch of java files. My basic goal is to edit them so that all of the instance variable declarations are at the top of the file rather than the bottom. I've done txt file editing in C before and some very basic bash scripting, but this seems more complicated. I've been told that Python would be a good way of going about it. In my attempt to make a script to do the above, I've hacked together a Python script. I'm not sure if it will actually work because I haven't been able to run it yet due to the problem mentioned above with opening files, but I feel like I'm on the right path as far as the logic goes. code:
Italian Stalin fucked around with this message at 23:19 on Apr 25, 2010 |
# ? Apr 25, 2010 20:25 |
|
armed2010 posted:If I try to do a write on a nonexistent file named PersonTest2.txt, i.e. try to create a file for writing, I get the error message: What's your working directory? Do you have write access? Maybe not if it's c:\python and you're on Windows 7.
|
# ? Apr 25, 2010 20:30 |
|
|
# ? May 24, 2024 18:57 |
|
A A 2 3 5 8 K posted:What's your working directory? Do you have write access? Maybe not if it's c:\python and you're on Windows 7. My working directory is a Netbeans project folder in My Documents, so it shouldn't be running into an issue with writing into C:\
|
# ? Apr 25, 2010 21:02 |