ActiveState Community

Windows Vista

keeping variables local to a function

I'm trying to reduce a list of lists to a single list.

def flatten(x):
for i in x:
if isinstance(i , list):
flatten(i)
else:
result.append(i)
return result

I get this error message:

NameError: global name 'result' is not defined

I want the variables to stay local to the function.

Thanks, Gowan

Editing a PHP project on a shared hosting Web server

Hi,

My website, which is based on the WordPress CMS is located on a shared hosting Web server. My website development is based on PHP and WordPress, so I'm usually editing files that are within mywebsite.com/wp-content/plugins/mycode.php.

I would like to be able to utilize all the IDE features while editing files such as mycode.php. I mean, it would be nice if Komodo would realize that mycode.php is part of a bigger project/CMS.

Wrapped Tcl EXE crashes when loading byte compiled Tcl

I have the latest TclDevKit 8.5 and have wrapped a Tcl script and base-tk8.5-thread-win32-ix86.exe. When run, my wrapped script attempts to source unwrapped Tcl files. If those are clear text it works fine. But when they are byte compiled the application crashes. Any idea?
I'm compiling using tclcompiler.exe. And why is there a tclcompiler84.exe in the bin directory as well? Same problem occurs with that version too.

And I see the tbcload package is versioned 1.7. Yet the byte compiled code requires 1.6. Here's a sample:

if {[catch {package require tbcload 1.6} err] == 1} {

console input before any output?

when i run a ruby script in the komodo edit command output, any "gets" (standard console input) calls are processed and printed before all "puts" (standard console output) calls. example:

puts "first"
gets # i type "foo" here
puts "second"
gets # i type "bar" here
puts "third"

# results in:

foo
bar
first
second
third

is there any wqay to circumvent this?

command output tab on the right

can i somehow have the command output tab on the right? or change tab positions in general?

Komodo Edit Server Prefs

After a recent update to Komodo Edit (5.1.3, build 3592) my Server Prefs disappeared. I attempted to add/re-add an SFTP Server and it does not populate. I uninstalled/re-installed/uninstalled and manually whacked the Activestate/Komodo profile data (under AppData/Roaming/Activestate/KomodoEdit)... and reinstalled again. Still no joy.

Any ideas?

This is by far my favorite shell/perl/expect/html editor. Frickin' Awesome...

Thanks,

Shared Toolbox Auto-reload

I'm on a small web dev team and we've been using Komodo IDE since 4.x. Today we tried out the Shared Toolbox for the first time and it works great.

We actually implemented it using a shared Dropbox account and it works extremely well. Almost too well, though. Whenever one of our team members updates the shared toolbox (which happens somewhat frequently), we get a message asking to Reload or Overwrite the changes that were made. Of course, if any of the other developers hit "Overwrite" we've just lost the new additions. (Not to mention that it pops up in the middle of coding, too.)

perlXS

I'm following the perlxstut...

C:\>h2xs -A -n Mytest
Defaulting to backwards compatibility with perl 5.10.0
If you intend this module to be compatible with earlier perl versions, please
specify a minimum perl version with the -b option.

Writing Mytest/ppport.h
Writing Mytest/lib/Mytest.pm
Writing Mytest/Mytest.xs
Writing Mytest/Makefile.PL
Writing Mytest/README
Writing Mytest/t/Mytest.t
Writing Mytest/Changes
Writing Mytest/MANIFEST
C:\>cd Mytest

And wtf is that ?

C:\Mytest>nmake

Microsoft (R) Program Maintenance Utility Version 1.50

FULL Kommodo Editor Installation on a memory stick

I wanted to install both Perl and Kommodo Edit on a memorystick/external usb drive but Kommodo Edit puts during installation some stuff with admin rights 'locally' on the pc. Is there an installation option to have EVERYTHING on the USB stick ?

Custom Install of Activeperl

I am very new to ActiveState Perl. I am actually using both ActiveState Perl/ Python for development on Windows based platforms. I would like to role out some of my tools to a group of users. Is there a way to automate or push out the ActiveState Perl install? I would like everything to be automated from a users perspective, just one click everything is taken care of. Does anyone have experience with this, and/ or could you point me to some good documentation?

Thanks.